summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-08-16 12:04:21 -0400
committerAnthony G. Basile <blueness@gentoo.org>2016-08-16 12:04:21 -0400
commitdca9b24be0b2c2df44d46314b71d19910caae2e8 (patch)
treeaaa00b81fcc8a4c81c88eb2a04af0c56be67d7c5
parentgrsecurity-3.1-4.7-201608131240 (diff)
downloadhardened-patchset-dca9b24be0b2c2df44d46314b71d19910caae2e8.tar.gz
hardened-patchset-dca9b24be0b2c2df44d46314b71d19910caae2e8.tar.bz2
hardened-patchset-dca9b24be0b2c2df44d46314b71d19910caae2e8.zip
grsecurity-3.1-4.7-20160815184220160815
-rw-r--r--4.7.0/0000_README2
-rw-r--r--4.7.0/4420_grsecurity-3.1-4.7-201608151842.patch (renamed from 4.7.0/4420_grsecurity-3.1-4.7-201608131240.patch)37
2 files changed, 26 insertions, 13 deletions
diff --git a/4.7.0/0000_README b/4.7.0/0000_README
index f41c54f..fb3a8e5 100644
--- a/4.7.0/0000_README
+++ b/4.7.0/0000_README
@@ -2,7 +2,7 @@ README
-----------------------------------------------------------------------------
Individual Patch Descriptions:
-----------------------------------------------------------------------------
-Patch: 4420_grsecurity-3.1-4.7-201608131240.patch
+Patch: 4420_grsecurity-3.1-4.7-201608151842.patch
From: http://www.grsecurity.net
Desc: hardened-sources base patch from upstream grsecurity
diff --git a/4.7.0/4420_grsecurity-3.1-4.7-201608131240.patch b/4.7.0/4420_grsecurity-3.1-4.7-201608151842.patch
index d3e1770..9857890 100644
--- a/4.7.0/4420_grsecurity-3.1-4.7-201608131240.patch
+++ b/4.7.0/4420_grsecurity-3.1-4.7-201608151842.patch
@@ -956,7 +956,7 @@ index d50430c..01cc53b 100644
# but it is being used too early to link to meaningful stack_chk logic.
nossp_flags := $(call cc-option, -fno-stack-protector)
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
-index 9e10c45..330d7f2 100644
+index 9e10c45..2feb375 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -18,17 +18,41 @@
@@ -1199,7 +1199,7 @@ index 9e10c45..330d7f2 100644
+#undef __ATOMIC_OP
#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
-+#define atomic_xchg_unchecked(v, new) (xchg(&((v)->counter), new))
++#define atomic_xchg_unchecked(v, new) (xchg_unchecked(&((v)->counter), new))
#define atomic_inc(v) atomic_add(1, v)
+static inline void atomic_inc_unchecked(atomic_unchecked_t *v)
@@ -7892,7 +7892,7 @@ index 0a9d439..2b95815 100644
kexec is a system call that implements the ability to shutdown your
current kernel, and to start another kernel. It is like a reboot
diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h
-index ae0751e..70e03dc 100644
+index ae0751e..06b108a 100644
--- a/arch/powerpc/include/asm/atomic.h
+++ b/arch/powerpc/include/asm/atomic.h
@@ -9,9 +9,15 @@
@@ -8133,7 +8133,7 @@ index ae0751e..70e03dc 100644
+ return cmpxchg(&(v->counter), old, new);
+}
+
-+#define atomic_xchg_unchecked(v, new) (xchg(&((v)->counter), new))
++#define atomic_xchg_unchecked(v, new) (xchg_unchecked(&((v)->counter), new))
+
/**
* __atomic_add_unless - add unless the number is a given value
@@ -128204,7 +128204,7 @@ index 5bdab6b..9ae82fe 100644
#define pud_none(pud) 0
#define pud_bad(pud) 0
diff --git a/include/asm-generic/atomic-long.h b/include/asm-generic/atomic-long.h
-index 5e1f345..7104090 100644
+index 5e1f345..74a91f8 100644
--- a/include/asm-generic/atomic-long.h
+++ b/include/asm-generic/atomic-long.h
@@ -22,6 +22,12 @@
@@ -128413,7 +128413,7 @@ index 5e1f345..7104090 100644
#undef ATOMIC_LONG_INC_DEC_OP
-@@ -187,4 +229,58 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
+@@ -187,4 +229,59 @@ static inline long atomic_long_add_unless(atomic_long_t *l, long a, long u)
#define atomic_long_inc_not_zero(l) \
ATOMIC_LONG_PFX(_inc_not_zero)((ATOMIC_LONG_PFX(_t) *)(l))
@@ -128458,8 +128458,9 @@ index 5e1f345..7104090 100644
+#endif
+#define atomic_dec_unchecked(v) atomic_dec(v)
+#define atomic_cmpxchg_unchecked(v, o, n) atomic_cmpxchg((v), (o), (n))
++#ifndef atomic_xchg_unchecked
+#define atomic_xchg_unchecked(v, i) atomic_xchg((v), (i))
-+
++#endif
+#define atomic_long_read_unchecked(v) atomic_long_read(v)
+#define atomic_long_set_unchecked(v, i) atomic_long_set((v), (i))
+#define atomic_long_add_unchecked(i, v) atomic_long_add((i), (v))
@@ -129160,7 +129161,7 @@ index c1da539..1dcec55 100644
struct atmphy_ops {
int (*start)(struct atm_dev *dev);
diff --git a/include/linux/atomic.h b/include/linux/atomic.h
-index e451534..8686854 100644
+index e451534..1f808cc 100644
--- a/include/linux/atomic.h
+++ b/include/linux/atomic.h
@@ -91,6 +91,13 @@
@@ -129238,7 +129239,18 @@ index e451534..8686854 100644
#endif /* atomic64_cmpxchg_relaxed */
/* cmpxchg_relaxed */
-@@ -442,7 +475,7 @@
+@@ -431,6 +464,10 @@
+ #ifndef xchg
+ #define xchg(...) __atomic_op_fence(xchg, __VA_ARGS__)
+ #endif
++
++#ifndef xchg_unchecked
++#define xchg_unchecked(...) __atomic_op_fence(xchg_unchecked, __VA_ARGS__)
++#endif
+ #endif /* xchg_relaxed */
+
+ /**
+@@ -442,7 +479,7 @@
* Atomically adds @a to @v, so long as @v was not already @u.
* Returns non-zero if @v was not @u, and zero otherwise.
*/
@@ -166684,10 +166696,10 @@ index 0000000..7514850
+fi
diff --git a/scripts/gcc-plugins/initify_plugin.c b/scripts/gcc-plugins/initify_plugin.c
new file mode 100644
-index 0000000..4b554fa
+index 0000000..5a01d10
--- /dev/null
+++ b/scripts/gcc-plugins/initify_plugin.c
-@@ -0,0 +1,536 @@
+@@ -0,0 +1,537 @@
+/*
+ * Copyright 2015-2016 by Emese Revfy <re.emese@gmail.com>
+ * Licensed under the GPL v2, or (at your option) v3
@@ -166868,7 +166880,8 @@ index 0000000..4b554fa
+ int fntype_arg_len;
+ const_tree fndecl = gimple_call_fndecl(stmt);
+
-+ gcc_assert(DECL_ABSTRACT_ORIGIN(fndecl) == NULL_TREE);
++ if (DECL_ABSTRACT_ORIGIN(fndecl) != NULL_TREE)
++ return false;
+
+ if (is_syscall(fndecl))
+ return true;