Smack: Improve access check performance
authorCasey Schaufler <casey@schaufler-ca.com>
Thu, 23 May 2013 01:43:03 +0000 (18:43 -0700)
committerJan Cybulski <j.cybulski@samsung.com>
Mon, 7 Oct 2013 13:46:07 +0000 (15:46 +0200)
commit6a683a8a7b883b007ba8402de3ce08e49d9ada56
treebb5631d4a6b5e4c55acf466da04a73a9822978b2
parent9733a5a969dcb8b3a39d53c8f841b9fcbe5bed56
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

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Conflicts:

security/smack/smack_lsm.c

Change-Id: I87ac6dfaef0badb0dc31cfa56b1f9f68f6f4ae80
security/smack/smack.h
security/smack/smack_access.c
security/smack/smack_lsm.c
security/smack/smackfs.c