Skip to content

libsepol/cil: Line mark cleanup and fix

James Carter selinux 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 of 7 patches 4 repliesIn review
  2. v18 patches 4 repliesSuperseded

Changes in v2 from the cover letter

In patch 6, use cil_strpool_add("1") instead of "1"
In patch 7, fix confusing usage of pre_hll_expand and pre_hll_offset; initialize pre_hll_offset, change format specifiers in cil_tree.c to use %u instead of %d.

6 of 7 patches are in this archive. The cover letter announces 7.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7libsepol/cil: Check syntax of src_info statementlibsepol/cil/src/cil_build_ast.c+20 -40 replies
2/7libsepol/cil: Check the token type after getting the next tokenlibsepol/cil/src/cil_parser.c+4 -00 replies
3/7libsepol/cil: Check for valid line mark type immediatelylibsepol/cil/src/cil_parser.c+5 -90 replies
5/7libsepol/cil: Create common string-to-unsigned-integer functionslibsepol/cil/src/cil.c libsepol/cil/src/cil_build_ast.c libsepol/cil/src/cil_internal.h +1 more+69 -380 replies
6/7libsepol/cil: Add line mark kind and line number to src infolibsepol/cil/src/cil.c libsepol/cil/src/cil_build_ast.c libsepol/cil/src/cil_copy_ast.c +3 more+43 -260 replies
7/7libsepol/cil: Report correct high-level language line numberslibsepol/cil/src/cil_binary.c libsepol/cil/src/cil_build_ast.c libsepol/cil/src/cil_copy_ast.c +3 more+90 -580 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchNicolas Iooss
SeriesA-b
1/7
2/7
3/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH 0/7 v2] libsepol/cil: Line mark cleanup and fix

Patches 1-5 cleanup minor issues with CIL's line marks.

Patches 6-7 fix the way line mark works so that the correct line numbers will be given for nested line marks.

Patch 8 writes out line mark information when writing out the AST.

Changes in v2
In patch 6, use cil_strpool_add("1") instead of "1"
In patch 7, fix confusing usage of pre_hll_expand and pre_hll_offset; initialize pre_hll_offset, change format specifiers in cil_tree.c to use %u instead of %d.

James Carter (7):
libsepol/cil: Check syntax of src_info statement libsepol/cil: Check the token type after getting the next token libsepol/cil: Check for valid line mark type immediately libsepol/cil: Push line mark state first when processing a line mark libsepol/cil: Create common string-to-unsigned-integer functions libsepol/cil: Add line mark kind and line number to src info libsepol/cil: Report correct high-level language line numbers

 libsepol/cil/src/cil.c           |  70 ++++++++++++++++-
 libsepol/cil/src/cil_binary.c    |   9 ++-
 libsepol/cil/src/cil_build_ast.c |  77 ++++++++++--------
 libsepol/cil/src/cil_copy_ast.c  |   5 +-
 libsepol/cil/src/cil_internal.h  |   9 ++-
 libsepol/cil/src/cil_parser.c    | 129 +++++++++++++++----------------
 libsepol/cil/src/cil_tree.c      |  57 +++++++++-----
 libsepol/cil/src/cil_tree.h      |   4 +-
 8 files changed, 226 insertions(+), 134 deletions(-)
Signature · 1 line
2.31.1