diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2017-04-22 12:08:04 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2017-04-22 12:08:04 -0400 |
commit | a6383ddcf48aac166b64e6008cbceb4476975279 (patch) | |
tree | 378807c872bdda51eaeff69ff7752e95142c8710 /4.9.24/4427_force_XATTR_PAX_tmpfs.patch | |
parent | grsecurity-3.1-4.9.23-201704181901 (diff) | |
download | hardened-patchset-master.tar.gz hardened-patchset-master.tar.bz2 hardened-patchset-master.zip |
Diffstat (limited to '4.9.24/4427_force_XATTR_PAX_tmpfs.patch')
-rw-r--r-- | 4.9.24/4427_force_XATTR_PAX_tmpfs.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/4.9.24/4427_force_XATTR_PAX_tmpfs.patch b/4.9.24/4427_force_XATTR_PAX_tmpfs.patch new file mode 100644 index 0000000..3871139 --- /dev/null +++ b/4.9.24/4427_force_XATTR_PAX_tmpfs.patch @@ -0,0 +1,48 @@ +From: Anthony G. Basile <blueness@gentoo.org> + +For users that emerge without XATTR_PAX support enabled, we still want user.pax.flags +namespace supported on tmpfs so that the PaX markings survive emerge. + +diff -Naur a/mm/shmem.c b/mm/shmem.c +--- a/mm/shmem.c 2016-04-29 19:56:25.306101147 -0400 ++++ b/mm/shmem.c 2016-04-29 19:59:44.126104490 -0400 +@@ -3157,7 +3157,6 @@ + return simple_xattr_set(&info->xattrs, name, value, size, flags); + } + +-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS + static int shmem_user_xattr_handler_set(const struct xattr_handler *handler, + struct dentry *dentry, struct inode *inode, + const char *name, const void *value, +@@ -3173,7 +3172,6 @@ + name = xattr_full_name(handler, name); + return simple_xattr_set(&info->xattrs, name, value, size, flags); + } +-#endif + + static const struct xattr_handler shmem_security_xattr_handler = { + .prefix = XATTR_SECURITY_PREFIX, +@@ -3187,13 +3185,11 @@ + .set = shmem_xattr_handler_set, + }; + +-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS + static const struct xattr_handler shmem_user_xattr_handler = { + .prefix = XATTR_USER_PREFIX, + .get = shmem_xattr_handler_get, + .set = shmem_user_xattr_handler_set, + }; +-#endif + + static const struct xattr_handler *shmem_xattr_handlers[] = { + #ifdef CONFIG_TMPFS_POSIX_ACL +@@ -3203,9 +3199,7 @@ + &shmem_security_xattr_handler, + &shmem_trusted_xattr_handler, + +-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS + &shmem_user_xattr_handler, +-#endif + + NULL + }; |