Skip to content

Report raw context in AVCs + refactoring

Ondrej Mosnacek linux-audit selinux 1 version Applied

Status from this message: Merged, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest4 patches 9 repliesApplied

Changes in v3 from the cover letter

- do some minor refactoring while there
- move new fields to the end of the record
- introduce a new security_sid_to_context_inval() function to get the raw context instead of (ab)using strcmp() to check if the raw context is different from the effective one

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4selinux: inline some AVC functions used only oncesecurity/selinux/avc.c+58 -822 replies
2/4selinux: replace some BUG_ON()s with a WARN_ON()security/selinux/avc.c+3 -22 replies
3/4selinux: remove some useless BUG_ONssecurity/selinux/avc.c+0 -33 replies
4/4selinux: log invalid contexts in AVCssecurity/selinux/avc.c security/selinux/include/security.h security/selinux/ss/services.c+50 -52 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchStephen Smalley
1/4R-b
2/4R-b
3/4
4/4R-b

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

Read the v3 thread

Cover letter [PATCH v3 0/4] Report raw context in AVCs + refactoring

Changes in v3:
- do some minor refactoring while there
- move new fields to the end of the record
- introduce a new security_sid_to_context_inval() function to get the raw context instead of (ab)using strcmp() to check if the raw context is different from the effective one

v2: https://lore.kernel.org/selinux/[email protected]/T/
Changes in v2:
- rename new fields to *rawcon

v1: https://lore.kernel.org/selinux/[email protected]/T/

Ondrej Mosnacek (4):
selinux: inline some AVC functions used only once
selinux: replace some BUG_ON()s with a WARN_ON()
selinux: remove some useless BUG_ONs
selinux: log invalid contexts in AVCs

 security/selinux/avc.c              | 159 +++++++++++++---------------
 security/selinux/include/security.h |   3 +
 security/selinux/ss/services.c      |  37 ++++++-
 3 files changed, 109 insertions(+), 90 deletions(-)
Signature · 1 line
2.20.1