Smack: Improve access check performance
authorCasey Schaufler <casey@schaufler-ca.com>
Thu, 23 May 2013 01:43:03 +0000 (18:43 -0700)
committerChanho Park <parkch98@gmail.com>
Fri, 23 Jan 2015 14:18:36 +0000 (23:18 +0900)
commit8957b855b81e6c9b0592299d5b396da0fa20e64b
tree6902c67dda30fca54bff11cc5162cb26ec4e990f
parentc64078d0dd42c2bdca7b46fba2211bcaa59b59fe
Smack: Improve access check performance

Each Smack label that the kernel has seen is added to a
list of labels. The list of access rules for a given subject
label hangs off of the label list entry for the label.
This patch changes the structures that contain subject
labels to point at the label list entry rather that the
label itself. Doing so removes a label list lookup in
smk_access() that was accounting for the largest single
chunk of Smack overhead.

Targeted for git://git.gitorious.org/smack-next/kernel.git

Change-Id: I15f3cde6f0c3db9af056d35fc224d6295dff130c
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Ɓukasz Stelmach <l.stelmach@samsung.com>
security/smack/smack.h
security/smack/smack_access.c
security/smack/smack_lsm.c
security/smack/smackfs.c