summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include/path.h
diff options
context:
space:
mode:
authorJohn Johansen2017-05-23 12:25:14 +0200
committerJohn Johansen2017-06-08 20:29:34 +0200
commit4227c333f65cddc6c2f048e5b67cfe796b9df9a6 (patch)
tree4deee8d16246bc879036da19642451b8e7cdcde0 /security/apparmor/include/path.h
parentapparmor: allow profiles to provide info to disconnected paths (diff)
downloadkernel-qcow2-linux-4227c333f65cddc6c2f048e5b67cfe796b9df9a6.tar.gz
kernel-qcow2-linux-4227c333f65cddc6c2f048e5b67cfe796b9df9a6.tar.xz
kernel-qcow2-linux-4227c333f65cddc6c2f048e5b67cfe796b9df9a6.zip
apparmor: Move path lookup to using preallocated buffers
Dynamically allocating buffers is problematic and is an extra layer that is a potntial point of failure and can slow down mediation. Change path lookup to use the preallocated per cpu buffers. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include/path.h')
-rw-r--r--security/apparmor/include/path.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/include/path.h b/security/apparmor/include/path.h
index 78e4909dcc6a..05fb3305671e 100644
--- a/security/apparmor/include/path.h
+++ b/security/apparmor/include/path.h
@@ -23,10 +23,10 @@ enum path_flags {
PATH_CHROOT_NSCONNECT = 0x10, /* connect paths that are at ns root */
PATH_DELEGATE_DELETED = 0x08000, /* delegate deleted files */
- PATH_MEDIATE_DELETED = 0x10000, /* mediate deleted paths */
+ PATH_MEDIATE_DELETED = 0x10000, /* mediate deleted paths */
};
-int aa_path_name(const struct path *path, int flags, char **buffer,
+int aa_path_name(const struct path *path, int flags, char *buffer,
const char **name, const char **info,
const char *disconnected);