userspace: Implement new format of filename trans rules
Status from this message: Thanks, applied.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest2 patches 4 repliesApplied
- v52 patches 3 repliesSuperseded
- v42 patches 1 replySuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 2 patches | 0 replies | Superseded | |
| v2 | 2 patches | 9 replies | Superseded | |
| v1 | 2 patches | 15 replies | Superseded |
Changes in v6 from the cover letter
- simplify the interface of policydb_filetrans_insert()
- i.e. make it possible to pass NULL to name_alloc to simplify most callers
Patches in v6 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | libsepol,checkpolicy: optimize storage of filename transitionscheckpolicy/ checkpolicy/ libsepol/ +6 more | +210 | 2 replies | |
| 2/2 | libsepol: implement POLICYDB_VERSION_COMP_FTRANSlibsepol/ libsepol/ libsepol/ | +242 | 2 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Stephen Smalley |
|---|---|
| 1/2 | A-b |
| 2/2 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 0/2] userspace: Implement new format of filename trans rules
These patches are the userspace side of the following kernel commits:c3a276111ea2 ("selinux: optimize storage of filename transitions") [1] 430059024389 ("selinux: implement new format of filename transitions") [2].
The first patch changes libsepol's internal representation of filename transition rules in a way similar to the kernel commit.
The second patch then builds upon that and implements reading and writing of the new binary policy format that uses this representation also in the data layout.
See individual patches for more details.
NOTE: This series unfortunately breaks the build of setools. Moreover, when an existing build of setools dynamically links against the new libsepol, it segfaults. Sadly, there doesn't seem to be a nice way of handling this, since setools relies on non-public libsepol policydb API/ABI. There is a draft PR that adapts setools to these changes here:
https://github.com/SELinuxProject/setools/pull/50
See also this discussion about the setools impact:
https://lore.kernel.org/selinux/[email protected]/
Changes in v6:
- simplify the interface of policydb_filetrans_insert()
- i.e. make it possible to pass NULL to name_alloc to simplify most callers
Changes in v5:
- fix comment in filename_trans_read() to not change when being moved
- fix filename_trans_check_datum()
- destroy temporary ebitmaps at return
- actually iterate through datums
Changes in v4:
- rebased on top of latest master branch
Changes in v3:
- fixed the change in dispol.c to match the rest of the code
- renamed the helper functions to use the "_compat" suffix rather than "_old" and "_new"
Changes in v2:
- fixed counting rules when reading the new policy format
[1] https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git/commit/?id=c3a276111ea2572399281988b3129683e2a6b60b
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4300590243895ac39e8c97a2f5acd004dad8a42f
Ondrej Mosnacek (2):
libsepol,checkpolicy: optimize storage of filename transitions
libsepol: implement POLICYDB_VERSION_COMP_FTRANS
checkpolicy/policy_define.c | 49 +--- checkpolicy/test/dispol.c | 20 +- libsepol/cil/src/cil_binary.c | 26 +- libsepol/include/sepol/policydb/policydb.h | 18 +- libsepol/src/expand.c | 56 +--- libsepol/src/kernel_to_cil.c | 24 +- libsepol/src/kernel_to_conf.c | 24 +- libsepol/src/policydb.c | 314 +++++++++++++++++---- libsepol/src/write.c | 101 +++++-- 9 files changed, 433 insertions(+), 199 deletions(-)
Signature · 1 line
2.26.2