summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2013-09-12 13:29:47 -0400
committerAnthony G. Basile <blueness@gentoo.org>2013-09-12 13:29:47 -0400
commit54161092e44bc640aca2f56b45e4f7455995fb89 (patch)
treefe2fff2eaf21f75050a9dc0b14e028bc96512223 /3.2.51/4427_force_XATTR_PAX_tmpfs.patch
parent3.10.11: add missing patch from genpatches (diff)
downloadhardened-patchset-54161092e44bc640aca2f56b45e4f7455995fb89.tar.gz
hardened-patchset-54161092e44bc640aca2f56b45e4f7455995fb89.tar.bz2
hardened-patchset-54161092e44bc640aca2f56b45e4f7455995fb89.zip
Grsec/PaX: 2.9.1-3.2.50-201309101928
Diffstat (limited to '3.2.51/4427_force_XATTR_PAX_tmpfs.patch')
-rw-r--r--3.2.51/4427_force_XATTR_PAX_tmpfs.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/3.2.51/4427_force_XATTR_PAX_tmpfs.patch b/3.2.51/4427_force_XATTR_PAX_tmpfs.patch
new file mode 100644
index 0000000..8c7a533
--- /dev/null
+++ b/3.2.51/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
+@@ -1809,11 +1809,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 }
+ };
+@@ -1867,14 +1863,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
+
+ if (size == 0)
+ value = ""; /* empty EA, do not remove */