diff options
author | 2011-08-20 14:40:26 -0400 | |
---|---|---|
committer | 2011-08-20 14:40:26 -0400 | |
commit | 8c4bd2dcd8287f868c3a551e47ef9dabe2016e88 (patch) | |
tree | 5eda1d030c850d5413a3022397778622e1eefd12 | |
parent | Grsec/PaX: 2.2.2-2.6.32.45-201108172006 + 2.2.2-2.6.39.4-201108172006 (diff) | |
download | hardened-patchset-8c4bd2dcd8287f868c3a551e47ef9dabe2016e88.tar.gz hardened-patchset-8c4bd2dcd8287f868c3a551e47ef9dabe2016e88.tar.bz2 hardened-patchset-8c4bd2dcd8287f868c3a551e47ef9dabe2016e88.zip |
Grsec/PaX: 2.2.2-2.6.32.45-201108192305 + 2.2.2-2.6.39.4-20110819230520110819
-rw-r--r-- | 2.6.32/0000_README | 2 | ||||
-rw-r--r-- | 2.6.32/4420_grsecurity-2.2.2-2.6.32.45-201108192305.patch (renamed from 2.6.32/4420_grsecurity-2.2.2-2.6.32.45-201108172006.patch) | 66 | ||||
-rw-r--r-- | 2.6.39/0000_README | 2 | ||||
-rw-r--r-- | 2.6.39/4420_grsecurity-2.2.2-2.6.39.4-201108192305.patch (renamed from 2.6.39/4420_grsecurity-2.2.2-2.6.39.4-201108172006.patch) | 82 |
4 files changed, 93 insertions, 59 deletions
diff --git a/2.6.32/0000_README b/2.6.32/0000_README index 5429e0c..f4bf114 100644 --- a/2.6.32/0000_README +++ b/2.6.32/0000_README @@ -11,7 +11,7 @@ Patch: 1044_linux-2.6.32.45.patch From: http://www.kernel.org Desc: Linux 2.6.39.45 -Patch: 4420_grsecurity-2.2.2-2.6.32.45-201108172006.patch +Patch: 4420_grsecurity-2.2.2-2.6.32.45-201108192305.patch From: http://www.grsecurity.net Desc: hardened-sources base patch from upstream grsecurity diff --git a/2.6.32/4420_grsecurity-2.2.2-2.6.32.45-201108172006.patch b/2.6.32/4420_grsecurity-2.2.2-2.6.32.45-201108192305.patch index 7ab60b1..26eb4f1 100644 --- a/2.6.32/4420_grsecurity-2.2.2-2.6.32.45-201108172006.patch +++ b/2.6.32/4420_grsecurity-2.2.2-2.6.32.45-201108192305.patch @@ -3600,7 +3600,7 @@ diff -urNp linux-2.6.32.45/arch/sh/mm/mmap.c linux-2.6.32.45/arch/sh/mm/mmap.c /* diff -urNp linux-2.6.32.45/arch/sparc/include/asm/atomic_64.h linux-2.6.32.45/arch/sparc/include/asm/atomic_64.h --- linux-2.6.32.45/arch/sparc/include/asm/atomic_64.h 2011-03-27 14:31:47.000000000 -0400 -+++ linux-2.6.32.45/arch/sparc/include/asm/atomic_64.h 2011-07-13 22:22:56.000000000 -0400 ++++ linux-2.6.32.45/arch/sparc/include/asm/atomic_64.h 2011-08-18 23:11:34.000000000 -0400 @@ -14,18 +14,40 @@ #define ATOMIC64_INIT(i) { (i) } @@ -3672,15 +3672,18 @@ diff -urNp linux-2.6.32.45/arch/sparc/include/asm/atomic_64.h linux-2.6.32.45/ar /* * atomic_inc_and_test - increment and test -@@ -50,6 +88,7 @@ extern long atomic64_sub_ret(long, atomi +@@ -50,6 +88,10 @@ extern long atomic64_sub_ret(long, atomi * other cases. */ #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) -+#define atomic_inc_and_test_unchecked(v) (atomic_inc_return_unchecked(v) == 0) ++static inline int atomic_inc_and_test_unchecked(atomic_unchecked_t *v) ++{ ++ return atomic_inc_return_unchecked(v) == 0; ++} #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) #define atomic_sub_and_test(i, v) (atomic_sub_ret(i, v) == 0) -@@ -59,30 +98,59 @@ extern long atomic64_sub_ret(long, atomi +@@ -59,30 +101,65 @@ extern long atomic64_sub_ret(long, atomi #define atomic64_dec_and_test(v) (atomic64_sub_ret(1, v) == 0) #define atomic_inc(v) atomic_add(1, v) @@ -3709,9 +3712,15 @@ diff -urNp linux-2.6.32.45/arch/sparc/include/asm/atomic_64.h linux-2.6.32.45/ar #define atomic64_add_negative(i, v) (atomic64_add_ret(i, v) < 0) #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) -+#define atomic_cmpxchg_unchecked(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) ++static inline int atomic_cmpxchg_unchecked(atomic_unchecked_t *v, int old, int new) ++{ ++ return cmpxchg(&v->counter, old, new); ++} #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) -+#define atomic_xchg_unchecked(v, new) (xchg(&((v)->counter), new)) ++static inline int atomic_xchg_unchecked(atomic_unchecked_t *v, int new) ++{ ++ return xchg(&v->counter, new); ++} static inline int atomic_add_unless(atomic_t *v, int a, int u) { @@ -3744,7 +3753,14 @@ diff -urNp linux-2.6.32.45/arch/sparc/include/asm/atomic_64.h linux-2.6.32.45/ar } #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) -@@ -93,17 +161,28 @@ static inline int atomic_add_unless(atom +@@ -90,20 +167,35 @@ static inline int atomic_add_unless(atom + #define atomic64_cmpxchg(v, o, n) \ + ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) + #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) ++static inline long atomic64_xchg_unchecked(atomic64_unchecked_t *v, long new) ++{ ++ return xchg(&v->counter, new); ++} static inline long atomic64_add_unless(atomic64_t *v, long a, long u) { @@ -3909,7 +3925,7 @@ diff -urNp linux-2.6.32.45/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.32.45/arc diff -urNp linux-2.6.32.45/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.45/arch/sparc/include/asm/spinlock_64.h --- linux-2.6.32.45/arch/sparc/include/asm/spinlock_64.h 2011-03-27 14:31:47.000000000 -0400 -+++ linux-2.6.32.45/arch/sparc/include/asm/spinlock_64.h 2011-05-04 17:56:20.000000000 -0400 ++++ linux-2.6.32.45/arch/sparc/include/asm/spinlock_64.h 2011-08-18 23:19:30.000000000 -0400 @@ -92,14 +92,19 @@ static inline void __raw_spin_lock_flags /* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */ @@ -3932,7 +3948,7 @@ diff -urNp linux-2.6.32.45/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.45/ " cas [%2], %0, %1\n" " cmp %0, %1\n" " bne,pn %%icc, 1b\n" -@@ -112,7 +117,7 @@ static void inline arch_read_lock(raw_rw +@@ -112,10 +117,10 @@ static void inline arch_read_lock(raw_rw " .previous" : "=&r" (tmp1), "=&r" (tmp2) : "r" (lock) @@ -3940,7 +3956,11 @@ diff -urNp linux-2.6.32.45/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.45/ + : "memory", "cc"); } - static int inline arch_read_trylock(raw_rwlock_t *lock) +-static int inline arch_read_trylock(raw_rwlock_t *lock) ++static inline int arch_read_trylock(raw_rwlock_t *lock) + { + int tmp1, tmp2; + @@ -123,7 +128,12 @@ static int inline arch_read_trylock(raw_ "1: ldsw [%2], %0\n" " brlz,a,pn %0, 2f\n" @@ -3994,6 +4014,15 @@ diff -urNp linux-2.6.32.45/arch/sparc/include/asm/spinlock_64.h linux-2.6.32.45/ { __asm__ __volatile__( " stw %%g0, [%0]" +@@ -186,7 +201,7 @@ static void inline arch_write_unlock(raw + : "memory"); + } + +-static int inline arch_write_trylock(raw_rwlock_t *lock) ++static inline int arch_write_trylock(raw_rwlock_t *lock) + { + unsigned long mask, tmp1, tmp2, result; + diff -urNp linux-2.6.32.45/arch/sparc/include/asm/thread_info_32.h linux-2.6.32.45/arch/sparc/include/asm/thread_info_32.h --- linux-2.6.32.45/arch/sparc/include/asm/thread_info_32.h 2011-03-27 14:31:47.000000000 -0400 +++ linux-2.6.32.45/arch/sparc/include/asm/thread_info_32.h 2011-06-04 20:46:01.000000000 -0400 @@ -4909,13 +4938,14 @@ diff -urNp linux-2.6.32.45/arch/sparc/lib/atomic_64.S linux-2.6.32.45/arch/sparc bne,pn %xcc, 2f diff -urNp linux-2.6.32.45/arch/sparc/lib/ksyms.c linux-2.6.32.45/arch/sparc/lib/ksyms.c --- linux-2.6.32.45/arch/sparc/lib/ksyms.c 2011-03-27 14:31:47.000000000 -0400 -+++ linux-2.6.32.45/arch/sparc/lib/ksyms.c 2011-04-17 15:56:46.000000000 -0400 -@@ -144,12 +144,17 @@ EXPORT_SYMBOL(__downgrade_write); ++++ linux-2.6.32.45/arch/sparc/lib/ksyms.c 2011-08-19 23:05:14.000000000 -0400 +@@ -144,12 +144,18 @@ EXPORT_SYMBOL(__downgrade_write); /* Atomic counter implementation. */ EXPORT_SYMBOL(atomic_add); +EXPORT_SYMBOL(atomic_add_unchecked); EXPORT_SYMBOL(atomic_add_ret); ++EXPORT_SYMBOL(atomic_add_ret_unchecked); EXPORT_SYMBOL(atomic_sub); +EXPORT_SYMBOL(atomic_sub_unchecked); EXPORT_SYMBOL(atomic_sub_ret); @@ -24014,8 +24044,16 @@ diff -urNp linux-2.6.32.45/crypto/gf128mul.c linux-2.6.32.45/crypto/gf128mul.c diff -urNp linux-2.6.32.45/crypto/serpent.c linux-2.6.32.45/crypto/serpent.c --- linux-2.6.32.45/crypto/serpent.c 2011-03-27 14:31:47.000000000 -0400 -+++ linux-2.6.32.45/crypto/serpent.c 2011-05-16 21:46:57.000000000 -0400 -@@ -224,6 +224,8 @@ static int serpent_setkey(struct crypto_ ++++ linux-2.6.32.45/crypto/serpent.c 2011-08-18 23:59:56.000000000 -0400 +@@ -21,6 +21,7 @@ + #include <asm/byteorder.h> + #include <linux/crypto.h> + #include <linux/types.h> ++#include <linux/sched.h> + + /* Key is padded to the maximum of 256 bits before round key generation. + * Any key length <= 256 bits (32 bytes) is allowed by the algorithm. +@@ -224,6 +225,8 @@ static int serpent_setkey(struct crypto_ u32 r0,r1,r2,r3,r4; int i; diff --git a/2.6.39/0000_README b/2.6.39/0000_README index a258060..38058ed 100644 --- a/2.6.39/0000_README +++ b/2.6.39/0000_README @@ -3,7 +3,7 @@ README Individual Patch Descriptions: ----------------------------------------------------------------------------- -Patch: 4420_grsecurity-2.2.2-2.6.39.4-201108172006.patch +Patch: 4420_grsecurity-2.2.2-2.6.39.4-201108192305.patch From: http://www.grsecurity.net Desc: hardened-sources base patch from upstream grsecurity diff --git a/2.6.39/4420_grsecurity-2.2.2-2.6.39.4-201108172006.patch b/2.6.39/4420_grsecurity-2.2.2-2.6.39.4-201108192305.patch index ae61b48..6d92b4a 100644 --- a/2.6.39/4420_grsecurity-2.2.2-2.6.39.4-201108172006.patch +++ b/2.6.39/4420_grsecurity-2.2.2-2.6.39.4-201108192305.patch @@ -2880,7 +2880,7 @@ diff -urNp linux-2.6.39.4/arch/sh/mm/mmap.c linux-2.6.39.4/arch/sh/mm/mmap.c /* diff -urNp linux-2.6.39.4/arch/sparc/include/asm/atomic_64.h linux-2.6.39.4/arch/sparc/include/asm/atomic_64.h --- linux-2.6.39.4/arch/sparc/include/asm/atomic_64.h 2011-05-19 00:06:34.000000000 -0400 -+++ linux-2.6.39.4/arch/sparc/include/asm/atomic_64.h 2011-08-05 20:34:06.000000000 -0400 ++++ linux-2.6.39.4/arch/sparc/include/asm/atomic_64.h 2011-08-18 23:17:16.000000000 -0400 @@ -14,18 +14,40 @@ #define ATOMIC64_INIT(i) { (i) } @@ -2952,15 +2952,18 @@ diff -urNp linux-2.6.39.4/arch/sparc/include/asm/atomic_64.h linux-2.6.39.4/arch /* * atomic_inc_and_test - increment and test -@@ -50,6 +88,7 @@ extern long atomic64_sub_ret(long, atomi +@@ -50,6 +88,10 @@ extern long atomic64_sub_ret(long, atomi * other cases. */ #define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) -+#define atomic_inc_and_test_unchecked(v) (atomic_inc_return_unchecked(v) == 0) ++static inline int atomic_inc_and_test_unchecked(atomic_unchecked_t *v) ++{ ++ return atomic_inc_return_unchecked(v) == 0; ++} #define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) #define atomic_sub_and_test(i, v) (atomic_sub_ret(i, v) == 0) -@@ -59,30 +98,59 @@ extern long atomic64_sub_ret(long, atomi +@@ -59,30 +101,65 @@ extern long atomic64_sub_ret(long, atomi #define atomic64_dec_and_test(v) (atomic64_sub_ret(1, v) == 0) #define atomic_inc(v) atomic_add(1, v) @@ -2989,9 +2992,15 @@ diff -urNp linux-2.6.39.4/arch/sparc/include/asm/atomic_64.h linux-2.6.39.4/arch #define atomic64_add_negative(i, v) (atomic64_add_ret(i, v) < 0) #define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) -+#define atomic_cmpxchg_unchecked(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) ++static inline int atomic_cmpxchg_unchecked(atomic_unchecked_t *v, int old, int new) ++{ ++ return cmpxchg(&v->counter, old, new); ++} #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) -+#define atomic_xchg_unchecked(v, new) (xchg(&((v)->counter), new)) ++static inline int atomic_xchg_unchecked(atomic_unchecked_t *v, int new) ++{ ++ return xchg(&v->counter, new); ++} static inline int atomic_add_unless(atomic_t *v, int a, int u) { @@ -3024,7 +3033,14 @@ diff -urNp linux-2.6.39.4/arch/sparc/include/asm/atomic_64.h linux-2.6.39.4/arch } #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) -@@ -93,17 +161,28 @@ static inline int atomic_add_unless(atom +@@ -90,20 +167,35 @@ static inline int atomic_add_unless(atom + #define atomic64_cmpxchg(v, o, n) \ + ((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n))) + #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) ++static inline long atomic64_xchg_unchecked(atomic64_unchecked_t *v, long new) ++{ ++ return xchg(&v->counter, new); ++} static inline long atomic64_add_unless(atomic64_t *v, long a, long u) { @@ -3155,7 +3171,7 @@ diff -urNp linux-2.6.39.4/arch/sparc/include/asm/pgtsrmmu.h linux-2.6.39.4/arch/ diff -urNp linux-2.6.39.4/arch/sparc/include/asm/spinlock_64.h linux-2.6.39.4/arch/sparc/include/asm/spinlock_64.h --- linux-2.6.39.4/arch/sparc/include/asm/spinlock_64.h 2011-05-19 00:06:34.000000000 -0400 -+++ linux-2.6.39.4/arch/sparc/include/asm/spinlock_64.h 2011-08-05 19:44:33.000000000 -0400 ++++ linux-2.6.39.4/arch/sparc/include/asm/spinlock_64.h 2011-08-18 23:17:16.000000000 -0400 @@ -92,14 +92,19 @@ static inline void arch_spin_lock_flags( /* Multi-reader locks, these are much saner than the 32-bit Sparc ones... */ @@ -4075,13 +4091,14 @@ diff -urNp linux-2.6.39.4/arch/sparc/lib/atomic_64.S linux-2.6.39.4/arch/sparc/l bne,pn %xcc, BACKOFF_LABEL(2f, 1b) diff -urNp linux-2.6.39.4/arch/sparc/lib/ksyms.c linux-2.6.39.4/arch/sparc/lib/ksyms.c --- linux-2.6.39.4/arch/sparc/lib/ksyms.c 2011-05-19 00:06:34.000000000 -0400 -+++ linux-2.6.39.4/arch/sparc/lib/ksyms.c 2011-08-05 19:44:33.000000000 -0400 -@@ -142,12 +142,17 @@ EXPORT_SYMBOL(__downgrade_write); ++++ linux-2.6.39.4/arch/sparc/lib/ksyms.c 2011-08-19 23:06:32.000000000 -0400 +@@ -142,12 +142,18 @@ EXPORT_SYMBOL(__downgrade_write); /* Atomic counter implementation. */ EXPORT_SYMBOL(atomic_add); +EXPORT_SYMBOL(atomic_add_unchecked); EXPORT_SYMBOL(atomic_add_ret); ++EXPORT_SYMBOL(atomic_add_ret_unchecked); EXPORT_SYMBOL(atomic_sub); +EXPORT_SYMBOL(atomic_sub_unchecked); EXPORT_SYMBOL(atomic_sub_ret); @@ -32451,23 +32468,17 @@ diff -urNp linux-2.6.39.4/drivers/staging/tty/stallion.c linux-2.6.39.4/drivers/ if (copy_from_user(&stl_dummyport, arg, sizeof(struct stlport))) return -EFAULT; portp = stl_getport(stl_dummyport.brdnr, stl_dummyport.panelnr, -diff -urNp linux-2.6.39.4/drivers/staging/usbip/stub_dev.c linux-2.6.39.4/drivers/staging/usbip/stub_dev.c ---- linux-2.6.39.4/drivers/staging/usbip/stub_dev.c 2011-05-19 00:06:34.000000000 -0400 -+++ linux-2.6.39.4/drivers/staging/usbip/stub_dev.c 2011-08-13 20:32:52.000000000 -0400 -@@ -357,9 +357,11 @@ static struct stub_device *stub_device_a - - init_waitqueue_head(&sdev->tx_waitq); - -- sdev->ud.eh_ops.shutdown = stub_shutdown_connection; -- sdev->ud.eh_ops.reset = stub_device_reset; -- sdev->ud.eh_ops.unusable = stub_device_unusable; -+ pax_open_kernel(); -+ *(void **)&sdev->ud.eh_ops.shutdown = stub_shutdown_connection; -+ *(void **)&sdev->ud.eh_ops.reset = stub_device_reset; -+ *(void **)&sdev->ud.eh_ops.unusable = stub_device_unusable; -+ pax_close_kernel(); +diff -urNp linux-2.6.39.4/drivers/staging/usbip/usbip_common.h linux-2.6.39.4/drivers/staging/usbip/usbip_common.h +--- linux-2.6.39.4/drivers/staging/usbip/usbip_common.h 2011-05-19 00:06:34.000000000 -0400 ++++ linux-2.6.39.4/drivers/staging/usbip/usbip_common.h 2011-08-18 23:21:09.000000000 -0400 +@@ -367,7 +367,7 @@ struct usbip_device { + void (*shutdown)(struct usbip_device *); + void (*reset)(struct usbip_device *); + void (*unusable)(struct usbip_device *); +- } eh_ops; ++ } __no_const eh_ops; + }; - usbip_start_eh(&sdev->ud); diff -urNp linux-2.6.39.4/drivers/staging/usbip/vhci.h linux-2.6.39.4/drivers/staging/usbip/vhci.h --- linux-2.6.39.4/drivers/staging/usbip/vhci.h 2011-05-19 00:06:34.000000000 -0400 @@ -32483,7 +32494,7 @@ diff -urNp linux-2.6.39.4/drivers/staging/usbip/vhci.h linux-2.6.39.4/drivers/st * NOTE: diff -urNp linux-2.6.39.4/drivers/staging/usbip/vhci_hcd.c linux-2.6.39.4/drivers/staging/usbip/vhci_hcd.c --- linux-2.6.39.4/drivers/staging/usbip/vhci_hcd.c 2011-05-19 00:06:34.000000000 -0400 -+++ linux-2.6.39.4/drivers/staging/usbip/vhci_hcd.c 2011-08-13 20:33:49.000000000 -0400 ++++ linux-2.6.39.4/drivers/staging/usbip/vhci_hcd.c 2011-08-18 23:22:51.000000000 -0400 @@ -536,7 +536,7 @@ static void vhci_tx_urb(struct urb *urb) return; } @@ -32502,22 +32513,7 @@ diff -urNp linux-2.6.39.4/drivers/staging/usbip/vhci_hcd.c linux-2.6.39.4/driver if (unlink->seqnum == 0xffff) usbip_uinfo("seqnum max\n"); -@@ -965,9 +965,11 @@ static void vhci_device_init(struct vhci - - init_waitqueue_head(&vdev->waitq_tx); - -- vdev->ud.eh_ops.shutdown = vhci_shutdown_connection; -- vdev->ud.eh_ops.reset = vhci_device_reset; -- vdev->ud.eh_ops.unusable = vhci_device_unusable; -+ pax_open_kernel(); -+ *(void **)&vdev->ud.eh_ops.shutdown = vhci_shutdown_connection; -+ *(void **)&vdev->ud.eh_ops.reset = vhci_device_reset; -+ *(void **)&vdev->ud.eh_ops.unusable = vhci_device_unusable; -+ pax_close_kernel(); - - usbip_start_eh(&vdev->ud); - } -@@ -992,7 +994,7 @@ static int vhci_start(struct usb_hcd *hc +@@ -992,7 +992,7 @@ static int vhci_start(struct usb_hcd *hc vdev->rhport = rhport; } |