Author: arekm                        Date: Sat Jan  8 09:51:59 2011 GMT
Module: packages                      Tag: GRSECURITY_RAW
---- Log message:
http://www.grsecurity.net/~spender/grsecurity-2.2.1-2.6.36.2-201101052002.patch

---- Files affected:
packages/kernel:
   kernel-grsec_full.patch (1.3.2.50 -> 1.3.2.51) 

---- Diffs:

================================================================
Index: packages/kernel/kernel-grsec_full.patch
diff -u packages/kernel/kernel-grsec_full.patch:1.3.2.50 
packages/kernel/kernel-grsec_full.patch:1.3.2.51
--- packages/kernel/kernel-grsec_full.patch:1.3.2.50    Tue Dec 21 21:24:49 2010
+++ packages/kernel/kernel-grsec_full.patch     Sat Jan  8 10:51:44 2011
@@ -6459,22 +6459,6 @@
                "setc %%bl\n\t"
                "popl %%ebp\n\t"
                "popl %%edi\n\t"
-diff -urNp linux-2.6.36.2/arch/x86/include/asm/asm.h 
linux-2.6.36.2/arch/x86/include/asm/asm.h
---- linux-2.6.36.2/arch/x86/include/asm/asm.h  2010-10-20 16:30:22.000000000 
-0400
-+++ linux-2.6.36.2/arch/x86/include/asm/asm.h  2010-12-09 20:24:53.000000000 
-0500
-@@ -37,6 +37,12 @@
- #define _ASM_SI               __ASM_REG(si)
- #define _ASM_DI               __ASM_REG(di)
- 
-+#ifdef CONFIG_X86_32
-+#define _ASM_INTO     "into"
-+#else
-+#define _ASM_INTO     "int $4"
-+#endif
-+
- /* Exception table entry */
- #ifdef __ASSEMBLY__
- # define _ASM_EXTABLE(from,to)            \
 diff -urNp linux-2.6.36.2/arch/x86/include/asm/atomic64_32.h 
linux-2.6.36.2/arch/x86/include/asm/atomic64_32.h
 --- linux-2.6.36.2/arch/x86/include/asm/atomic64_32.h  2010-10-20 
16:30:22.000000000 -0400
 +++ linux-2.6.36.2/arch/x86/include/asm/atomic64_32.h  2010-12-09 
20:24:53.000000000 -0500
@@ -6807,7 +6791,7 @@
  #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
 diff -urNp linux-2.6.36.2/arch/x86/include/asm/atomic.h 
linux-2.6.36.2/arch/x86/include/asm/atomic.h
 --- linux-2.6.36.2/arch/x86/include/asm/atomic.h       2010-10-20 
16:30:22.000000000 -0400
-+++ linux-2.6.36.2/arch/x86/include/asm/atomic.h       2010-12-09 
20:24:53.000000000 -0500
++++ linux-2.6.36.2/arch/x86/include/asm/atomic.h       2010-12-31 
14:21:17.000000000 -0500
 @@ -22,7 +22,18 @@
   */
  static inline int atomic_read(const atomic_t *v)
@@ -6857,7 +6841,7 @@
 +#ifdef CONFIG_PAX_REFCOUNT
 +                   "jno 0f\n"
 +                   LOCK_PREFIX "subl %1,%0\n"
-+                   _ASM_INTO "\n0:\n"
++                   "int $4\n0:\n"
 +                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
@@ -6888,7 +6872,7 @@
 +#ifdef CONFIG_PAX_REFCOUNT
 +                   "jno 0f\n"
 +                   LOCK_PREFIX "addl %1,%0\n"
-+                   _ASM_INTO "\n0:\n"
++                   "int $4\n0:\n"
 +                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
@@ -6919,7 +6903,7 @@
 +#ifdef CONFIG_PAX_REFCOUNT
 +                   "jno 0f\n"
 +                   LOCK_PREFIX "addl %2,%0\n"
-+                   _ASM_INTO "\n0:\n"
++                   "int $4\n0:\n"
 +                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
@@ -6937,7 +6921,7 @@
 +#ifdef CONFIG_PAX_REFCOUNT
 +                   "jno 0f\n"
 +                   LOCK_PREFIX "decl %0\n"
-+                   _ASM_INTO "\n0:\n"
++                   "int $4\n0:\n"
 +                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
@@ -6966,7 +6950,7 @@
 +#ifdef CONFIG_PAX_REFCOUNT
 +                   "jno 0f\n"
 +                   LOCK_PREFIX "incl %0\n"
-+                   _ASM_INTO "\n0:\n"
++                   "int $4\n0:\n"
 +                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
@@ -6995,7 +6979,7 @@
 +#ifdef CONFIG_PAX_REFCOUNT
 +                   "jno 0f\n"
 +                   LOCK_PREFIX "incl %0\n"
-+                   _ASM_INTO "\n0:\n"
++                   "int $4\n0:\n"
 +                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
@@ -7013,7 +6997,7 @@
 +#ifdef CONFIG_PAX_REFCOUNT
 +                   "jno 0f\n"
 +                   LOCK_PREFIX "decl %0\n"
-+                   _ASM_INTO "\n0:\n"
++                   "int $4\n0:\n"
 +                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
@@ -7031,7 +7015,7 @@
 +#ifdef CONFIG_PAX_REFCOUNT
 +                   "jno 0f\n"
 +                   LOCK_PREFIX "subl %2,%0\n"
-+                   _ASM_INTO "\n0:\n"
++                   "int $4\n0:\n"
 +                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
@@ -7048,7 +7032,7 @@
 +#ifdef CONFIG_PAX_REFCOUNT
 +                   "jno 0f\n"
 +                   "movl %0, %1\n"
-+                   _ASM_INTO "\n0:\n"
++                   "int $4\n0:\n"
 +                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
@@ -7115,7 +7099,7 @@
 +#ifdef CONFIG_PAX_REFCOUNT
 +                           "jno 0f\n"
 +                           "subl %2,%0\n"
-+                           _ASM_INTO "\n0:\n"
++                           "int $4\n0:\n"
 +                           _ASM_EXTABLE(0b, 0b)
 +#endif
 +
@@ -7712,8 +7696,8 @@
  void kvm_mmu_module_exit(void);
 diff -urNp linux-2.6.36.2/arch/x86/include/asm/local.h 
linux-2.6.36.2/arch/x86/include/asm/local.h
 --- linux-2.6.36.2/arch/x86/include/asm/local.h        2010-10-20 
16:30:22.000000000 -0400
-+++ linux-2.6.36.2/arch/x86/include/asm/local.h        2010-12-09 
20:24:53.000000000 -0500
-@@ -18,26 +18,90 @@ typedef struct {
++++ linux-2.6.36.2/arch/x86/include/asm/local.h        2010-12-31 
14:21:17.000000000 -0500
+@@ -18,26 +18,58 @@ typedef struct {
  
  static inline void local_inc(local_t *l)
  {
@@ -7721,18 +7705,10 @@
 +      asm volatile(_ASM_INC "%0\n"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   _ASM_DEC "%0\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
                     : "+m" (l->a.counter));
@@ -7744,18 +7720,10 @@
 +      asm volatile(_ASM_DEC "%0\n"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   _ASM_INC "%0\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
                     : "+m" (l->a.counter));
@@ -7767,18 +7735,10 @@
 +      asm volatile(_ASM_ADD "%1,%0\n"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   _ASM_SUB "%1,%0\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
                     : "+m" (l->a.counter)
@@ -7791,24 +7751,16 @@
 +      asm volatile(_ASM_SUB "%1,%0\n"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   _ASM_ADD "%1,%0\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
                     : "+m" (l->a.counter)
                     : "ir" (i));
  }
-@@ -55,7 +119,24 @@ static inline int local_sub_and_test(lon
+@@ -55,7 +87,16 @@ static inline int local_sub_and_test(lon
  {
        unsigned char c;
  
@@ -7816,25 +7768,17 @@
 +      asm volatile(_ASM_SUB "%2,%0\n"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   _ASM_ADD "%2,%0\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
 +                   "sete %1\n"
                     : "+m" (l->a.counter), "=qm" (c)
                     : "ir" (i) : "memory");
        return c;
-@@ -73,7 +154,24 @@ static inline int local_dec_and_test(loc
+@@ -73,7 +114,16 @@ static inline int local_dec_and_test(loc
  {
        unsigned char c;
  
@@ -7842,25 +7786,17 @@
 +      asm volatile(_ASM_DEC "%0\n"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   _ASM_INC "%0\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
 +                   "sete %1\n"
                     : "+m" (l->a.counter), "=qm" (c)
                     : : "memory");
        return c != 0;
-@@ -91,7 +189,24 @@ static inline int local_inc_and_test(loc
+@@ -91,7 +141,16 @@ static inline int local_inc_and_test(loc
  {
        unsigned char c;
  
@@ -7868,25 +7804,17 @@
 +      asm volatile(_ASM_INC "%0\n"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   _ASM_DEC "%0\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
 +                   "sete %1\n"
                     : "+m" (l->a.counter), "=qm" (c)
                     : : "memory");
        return c != 0;
-@@ -110,7 +225,24 @@ static inline int local_add_negative(lon
+@@ -110,7 +169,16 @@ static inline int local_add_negative(lon
  {
        unsigned char c;
  
@@ -7894,25 +7822,17 @@
 +      asm volatile(_ASM_ADD "%2,%0\n"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   _ASM_SUB "%2,%0\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
 +                   "sets %1\n"
                     : "+m" (l->a.counter), "=qm" (c)
                     : "ir" (i) : "memory");
        return c;
-@@ -133,7 +265,23 @@ static inline long local_add_return(long
+@@ -133,7 +201,15 @@ static inline long local_add_return(long
  #endif
        /* Modern 486+ processor */
        __i = i;
@@ -7920,18 +7840,10 @@
 +      asm volatile(_ASM_XADD "%0, %1\n"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   _ASM_MOV "%0,%1\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
                     : "+r" (i), "+m" (l->a.counter)
@@ -8204,20 +8116,6 @@
  #endif
  
  #endif /* _ASM_X86_MODULE_H */
-diff -urNp linux-2.6.36.2/arch/x86/include/asm/page_32_types.h 
linux-2.6.36.2/arch/x86/include/asm/page_32_types.h
---- linux-2.6.36.2/arch/x86/include/asm/page_32_types.h        2010-10-20 
16:30:22.000000000 -0400
-+++ linux-2.6.36.2/arch/x86/include/asm/page_32_types.h        2010-12-09 
20:24:53.000000000 -0500
-@@ -15,6 +15,10 @@
-  */
- #define __PAGE_OFFSET         _AC(CONFIG_PAGE_OFFSET, UL)
- 
-+#ifdef CONFIG_PAX_PAGEEXEC
-+#define CONFIG_ARCH_TRACK_EXEC_LIMIT 1
-+#endif
-+
- #ifdef CONFIG_4KSTACKS
- #define THREAD_ORDER  0
- #else
 diff -urNp linux-2.6.36.2/arch/x86/include/asm/page_64_types.h 
linux-2.6.36.2/arch/x86/include/asm/page_64_types.h
 --- linux-2.6.36.2/arch/x86/include/asm/page_64_types.h        2010-10-20 
16:30:22.000000000 -0400
 +++ linux-2.6.36.2/arch/x86/include/asm/page_64_types.h        2010-12-09 
20:24:53.000000000 -0500
@@ -8934,192 +8832,98 @@
  void nmi_shootdown_cpus(nmi_shootdown_cb callback);
 diff -urNp linux-2.6.36.2/arch/x86/include/asm/rwsem.h 
linux-2.6.36.2/arch/x86/include/asm/rwsem.h
 --- linux-2.6.36.2/arch/x86/include/asm/rwsem.h        2010-10-20 
16:30:22.000000000 -0400
-+++ linux-2.6.36.2/arch/x86/include/asm/rwsem.h        2010-12-09 
20:24:53.000000000 -0500
-@@ -118,10 +118,26 @@ static inline void __down_read(struct rw
++++ linux-2.6.36.2/arch/x86/include/asm/rwsem.h        2010-12-31 
14:21:17.000000000 -0500
+@@ -118,6 +118,14 @@ static inline void __down_read(struct rw
  {
        asm volatile("# beginning down_read\n\t"
                     LOCK_PREFIX _ASM_INC "(%1)\n\t"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   LOCK_PREFIX _ASM_DEC "(%1)\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
                     /* adds 0x00000001 */
--                   "  jns        1f\n"
-+                   "  jns        2f\n"
+                    "  jns        1f\n"
                     "  call call_rwsem_down_read_failed\n"
--                   "1:\n\t"
-+                   "2:\n\t"
-                    "# ending down_read\n\t"
-                    : "+m" (sem->count)
-                    : "a" (sem)
-@@ -136,13 +152,29 @@ static inline int __down_read_trylock(st
-       rwsem_count_t result, tmp;
-       asm volatile("# beginning __down_read_trylock\n\t"
-                    "  mov          %0,%1\n\t"
--                   "1:\n\t"
-+                   "2:\n\t"
+@@ -139,6 +147,14 @@ static inline int __down_read_trylock(st
+                    "1:\n\t"
                     "  mov          %1,%2\n\t"
                     "  add          %3,%2\n\t"
--                   "  jle          2f\n\t"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   "sub %3,%2\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
-+                   "  jle          3f\n\t"
+                    "  jle          2f\n\t"
                     LOCK_PREFIX "  cmpxchg  %2,%0\n\t"
--                   "  jnz          1b\n\t"
--                   "2:\n\t"
-+                   "  jnz          2b\n\t"
-+                   "3:\n\t"
-                    "# ending __down_read_trylock\n\t"
-                    : "+m" (sem->count), "=&a" (result), "=&r" (tmp)
-                    : "i" (RWSEM_ACTIVE_READ_BIAS)
-@@ -158,12 +190,28 @@ static inline void __down_write_nested(s
+                    "  jnz          1b\n\t"
+@@ -158,6 +174,14 @@ static inline void __down_write_nested(s
        rwsem_count_t tmp;
        asm volatile("# beginning down_write\n\t"
                     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   "mov %1,(%2)\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
                     /* adds 0xffff0001, returns the old value */
                     "  test      %1,%1\n\t"
                     /* was the count 0 before? */
--                   "  jz        1f\n"
-+                   "  jz        2f\n"
-                    "  call call_rwsem_down_write_failed\n"
--                   "1:\n"
-+                   "2:\n"
-                    "# ending down_write"
-                    : "+m" (sem->count), "=d" (tmp)
-                    : "a" (sem), "1" (RWSEM_ACTIVE_WRITE_BIAS)
-@@ -196,10 +244,26 @@ static inline void __up_read(struct rw_s
+@@ -196,6 +220,14 @@ static inline void __up_read(struct rw_s
        rwsem_count_t tmp;
        asm volatile("# beginning __up_read\n\t"
                     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   "mov %1,(%2)\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
                     /* subtracts 1, returns the old value */
--                   "  jns        1f\n\t"
-+                   "  jns        2f\n\t"
+                    "  jns        1f\n\t"
                     "  call call_rwsem_wake\n" /* expects old value in %edx */
--                   "1:\n"
-+                   "2:\n"
-                    "# ending __up_read\n"
-                    : "+m" (sem->count), "=d" (tmp)
-                    : "a" (sem), "1" (-RWSEM_ACTIVE_READ_BIAS)
-@@ -214,10 +278,26 @@ static inline void __up_write(struct rw_
+@@ -214,6 +246,14 @@ static inline void __up_write(struct rw_
        rwsem_count_t tmp;
        asm volatile("# beginning __up_write\n\t"
                     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   "mov %1,(%2)\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
                     /* subtracts 0xffff0001, returns the old value */
--                   "  jns        1f\n\t"
-+                   "  jns        2f\n\t"
+                    "  jns        1f\n\t"
                     "  call call_rwsem_wake\n" /* expects old value in %edx */
--                   "1:\n\t"
-+                   "2:\n\t"
-                    "# ending __up_write\n"
-                    : "+m" (sem->count), "=d" (tmp)
-                    : "a" (sem), "1" (-RWSEM_ACTIVE_WRITE_BIAS)
-@@ -231,13 +311,29 @@ static inline void __downgrade_write(str
+@@ -231,6 +271,14 @@ static inline void __downgrade_write(str
  {
        asm volatile("# beginning __downgrade_write\n\t"
                     LOCK_PREFIX _ASM_ADD "%2,(%1)\n\t"
 +
 +#ifdef CONFIG_PAX_REFCOUNT
-+#ifdef CONFIG_X86_32
-+                   "into\n0:\n"
-+#else
 +                   "jno 0f\n"
-+                   "int $4\n0:\n"
-+#endif
-+                   ".pushsection .fixup,\"ax\"\n"
-+                   "1:\n"
 +                   LOCK_PREFIX _ASM_SUB "%2,(%1)\n"
-+                   "jmp 0b\n"
-+                   ".popsection\n"
-+                   _ASM_EXTABLE(0b, 1b)
++                   "int $4\n0:\n"
++                   _ASM_EXTABLE(0b, 0b)
 +#endif
 +
                     /*
                      * transitions 0xZZZZ0001 -> 0xYYYY0001 (i386)
                      *     0xZZZZZZZZ00000001 -> 0xYYYYYYYY00000001 (x86_64)
-                     */
--                   "  jns       1f\n\t"
-+                   "  jns       2f\n\t"
-                    "  call call_rwsem_downgrade_wake\n"
--                   "1:\n\t"
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-grsec_full.patch?r1=1.3.2.50&r2=1.3.2.51&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to