Skip to content

Support multiple identical genfscon

Pierre-Hugues Husson selinux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1Delete identical genfscon-slibsepol/cil/src/cil_post.c+11 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] Support multiple identical genfscon

secilc has a multiple_decls option to allow for multiple type declarations.
The next step is to allow multiple samples of the same rules. This commit does this on genfscon

One usecase is Android/Project Treble:
With Project Treble, vendor might include rules included in later in framework.
In order to be able to update the framework in this case, we need to remove identical rules.

I have several pending questions before considering merging:

Should the "compact" function be somewhere else? Or perhaps there is already some variant available?
Should the "compact" function simply take a cil_sort rather than a C array? Should we compact all types indifferently?
If so, we need to guarantee that the _compare function returns 0 only when the types rules are identical, and not just the same match rule. Is this already the case?
How is memory allocation done/will compact impact the release of the memory? In my understanding this is just one big chunk, so the size isn't used when free-ing, so it should be ok

Pierre-Hugues Husson (1):
Delete identical genfscon-s

 libsepol/cil/src/cil_post.c | 11 +++++++++++
 1 file changed, 11 insertions(+)
Signature · 1 line
2.15.1