summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-01-23 15:50:19 -0500
committerAnthony G. Basile <blueness@gentoo.org>2015-01-23 15:50:19 -0500
commitc617d17450287c48b74a9eb88cb370ec317eb7d5 (patch)
tree45e303a45784ebf316b72c8a7c764bea9a75b582 /3.14.29/4427_force_XATTR_PAX_tmpfs.patch
parentGrsec/PaX: 3.0-{3.2.66,3.14.28,3.18.2}-201501142325 (diff)
downloadhardened-patchset-c617d17450287c48b74a9eb88cb370ec317eb7d5.tar.gz
hardened-patchset-c617d17450287c48b74a9eb88cb370ec317eb7d5.tar.bz2
hardened-patchset-c617d17450287c48b74a9eb88cb370ec317eb7d5.zip
Grsec/PaX: 3.0-{3.2.66,3.14.29,3.18.3}-20150121194420150121
Diffstat (limited to '3.14.29/4427_force_XATTR_PAX_tmpfs.patch')
-rw-r--r--3.14.29/4427_force_XATTR_PAX_tmpfs.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/3.14.29/4427_force_XATTR_PAX_tmpfs.patch b/3.14.29/4427_force_XATTR_PAX_tmpfs.patch
new file mode 100644
index 0000000..aa540ad
--- /dev/null
+++ b/3.14.29/4427_force_XATTR_PAX_tmpfs.patch
@@ -0,0 +1,35 @@
+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 2013-06-11 21:00:18.000000000 -0400
++++ b/mm/shmem.c 2013-06-11 21:08:18.000000000 -0400
+@@ -2240,11 +2240,7 @@
+ static int shmem_xattr_validate(const char *name)
+ {
+ struct { const char *prefix; size_t len; } arr[] = {
+-
+-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
+ { XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN},
+-#endif
+-
+ { XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN },
+ { XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN }
+ };
+@@ -2300,14 +2296,12 @@
+ if (err)
+ return err;
+
+-#ifdef CONFIG_PAX_XATTR_PAX_FLAGS
+ if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) {
+ if (strcmp(name, XATTR_NAME_PAX_FLAGS))
+ return -EOPNOTSUPP;
+ if (size > 8)
+ return -EINVAL;
+ }
+-#endif
+
+ return simple_xattr_set(&info->xattrs, name, value, size, flags);
+ }