LSM: shrink sizeof LSM specific portion of common_audit_data
authorEric Paris <eparis@redhat.com>
Tue, 3 Apr 2012 16:37:02 +0000 (09:37 -0700)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 13:07:03 +0000 (18:07 +0530)
commit1906a8391c091209becad955f95b6f5e5bdab0f3
tree4e529a87a236bef26e8de48c27c4f3baf7f4ab5a
parente912a1930bbc7bf049183f37adc0f95047ca5248
LSM: shrink sizeof LSM specific portion of common_audit_data

Linus found that the gigantic size of the common audit data caused a big
perf hit on something as simple as running stat() in a loop.  This patch
requires LSMs to declare the LSM specific portion separately rather than
doing it in a union.  Thus each LSM can be responsible for shrinking their
portion and don't have to pay a penalty just because other LSMs have a
bigger space requirement.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 files changed:
include/linux/lsm_audit.h
security/apparmor/audit.c
security/apparmor/capability.c
security/apparmor/file.c
security/apparmor/include/audit.h
security/apparmor/ipc.c
security/apparmor/lib.c
security/apparmor/lsm.c
security/apparmor/policy.c
security/apparmor/policy_unpack.c
security/apparmor/resource.c
security/selinux/avc.c
security/selinux/hooks.c
security/selinux/include/avc.h
security/smack/smack.h
security/smack/smack_access.c