[gentoo-commits] proj/linux-patches:3.12 commit in: /

2017-03-18 Thread Mike Pagano
commit: ecfcba17a87836b8411e9ab848e164acfbd458c4
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Mar 18 15:32:53 2017 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Mar 18 15:32:53 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ecfcba17

Linux patch 3.12.72

 _README  |4 +
 1071_linux-3.12.72.patch | 1994 ++
 2 files changed, 1998 insertions(+)

diff --git a/_README b/_README
index 8a27c91..7b1e939 100644
--- a/_README
+++ b/_README
@@ -330,6 +330,10 @@ Patch:  1070_linux-3.12.71.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.71
 
+Patch:  1071_linux-3.12.72.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.72
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1071_linux-3.12.72.patch b/1071_linux-3.12.72.patch
new file mode 100644
index 000..25ca718
--- /dev/null
+++ b/1071_linux-3.12.72.patch
@@ -0,0 +1,1994 @@
+diff --git a/Makefile b/Makefile
+index f9da868f99a8..6c85a569c1fa 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 71
++SUBLEVEL = 72
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/mips/cavium-octeon/octeon-memcpy.S 
b/arch/mips/cavium-octeon/octeon-memcpy.S
+index 64e08df51d65..8b7004132491 100644
+--- a/arch/mips/cavium-octeon/octeon-memcpy.S
 b/arch/mips/cavium-octeon/octeon-memcpy.S
+@@ -208,18 +208,18 @@ EXC( STORE   t2, UNIT(6)(dst),   s_exc_p10u)
+   ADD src, src, 16*NBYTES
+ EXC(  STORE   t3, UNIT(7)(dst),   s_exc_p9u)
+   ADD dst, dst, 16*NBYTES
+-EXC(  LOADt0, UNIT(-8)(src),  l_exc_copy)
+-EXC(  LOADt1, UNIT(-7)(src),  l_exc_copy)
+-EXC(  LOADt2, UNIT(-6)(src),  l_exc_copy)
+-EXC(  LOADt3, UNIT(-5)(src),  l_exc_copy)
++EXC(  LOADt0, UNIT(-8)(src),  l_exc_copy_rewind16)
++EXC(  LOADt1, UNIT(-7)(src),  l_exc_copy_rewind16)
++EXC(  LOADt2, UNIT(-6)(src),  l_exc_copy_rewind16)
++EXC(  LOADt3, UNIT(-5)(src),  l_exc_copy_rewind16)
+ EXC(  STORE   t0, UNIT(-8)(dst),  s_exc_p8u)
+ EXC(  STORE   t1, UNIT(-7)(dst),  s_exc_p7u)
+ EXC(  STORE   t2, UNIT(-6)(dst),  s_exc_p6u)
+ EXC(  STORE   t3, UNIT(-5)(dst),  s_exc_p5u)
+-EXC(  LOADt0, UNIT(-4)(src),  l_exc_copy)
+-EXC(  LOADt1, UNIT(-3)(src),  l_exc_copy)
+-EXC(  LOADt2, UNIT(-2)(src),  l_exc_copy)
+-EXC(  LOADt3, UNIT(-1)(src),  l_exc_copy)
++EXC(  LOADt0, UNIT(-4)(src),  l_exc_copy_rewind16)
++EXC(  LOADt1, UNIT(-3)(src),  l_exc_copy_rewind16)
++EXC(  LOADt2, UNIT(-2)(src),  l_exc_copy_rewind16)
++EXC(  LOADt3, UNIT(-1)(src),  l_exc_copy_rewind16)
+ EXC(  STORE   t0, UNIT(-4)(dst),  s_exc_p4u)
+ EXC(  STORE   t1, UNIT(-3)(dst),  s_exc_p3u)
+ EXC(  STORE   t2, UNIT(-2)(dst),  s_exc_p2u)
+@@ -383,6 +383,10 @@ done:
+nop
+   END(memcpy)
+ 
++l_exc_copy_rewind16:
++  /* Rewind src and dst by 16*NBYTES for l_exc_copy */
++  SUB src, src, 16*NBYTES
++  SUB dst, dst, 16*NBYTES
+ l_exc_copy:
+   /*
+* Copy bytes from src until faulting load address (or until a
+diff --git a/arch/mips/include/asm/checksum.h 
b/arch/mips/include/asm/checksum.h
+index ac3d2b8a20d4..d48cf440010c 100644
+--- a/arch/mips/include/asm/checksum.h
 b/arch/mips/include/asm/checksum.h
+@@ -155,7 +155,9 @@ static inline __wsum csum_tcpudp_nofold(__be32 saddr,
+   "   daddu   %0, %4  \n"
+   "   dsll32  $1, %0, 0   \n"
+   "   daddu   %0, $1  \n"
++  "   sltu$1, %0, $1  \n"
+   "   dsra32  %0, %0, 0   \n"
++  "   addu%0, $1  \n"
+ #endif
+   "   .setpop"
+   : "=r" (sum)
+diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
+index ddc76103e78c..77e938d34f44 100644
+--- a/arch/mips/kernel/process.c
 b/arch/mips/kernel/process.c
+@@ -217,11 +217,9 @@ struct mips_frame_info {
+ #define J_TARGET(pc,target)   \
+   (((unsigned long)(pc) & 0xf000) | ((target) << 2))
+ 
+-static inline int is_ra_save_ins(union mips_instruction *ip)
++static inline int is_ra_save_ins(union mips_instruction *ip, int *poff)
+ {
+ #ifdef CONFIG_CPU_MICROMIPS
+-  union mips_instruction mmi;
+-
+   /*
+* swsp ra,offset
+* swm16 reglist,offset(sp)
+@@ -231,29 +229,71 @@ static inline int is_ra_save_ins(union mips_instruction 
*ip)
+*
+* microMIPS is way more fun...
+*/
+-  if (mm_insn_16bit(ip->halfword[0])) {
+-  mmi.word = (ip->halfword[0] << 16);
+-  return ((mmi.mm16_r5_format.opcode == mm_swsp16_op &&
+-   mmi.mm16_r5_format.rt == 31) ||
+-  (mmi.mm16_m_format.opcode == 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2017-03-09 Thread Mike Pagano
commit: 5a3c2c16a6d0eb0c726b98af9ed28cca9c25a872
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Mar 10 00:38:00 2017 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Mar 10 00:38:00 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5a3c2c16

Linux patch 3.12.71

 _README  |4 +
 1070_linux-3.12.71.patch | 3728 ++
 2 files changed, 3732 insertions(+)

diff --git a/_README b/_README
index 89b165d..8a27c91 100644
--- a/_README
+++ b/_README
@@ -326,6 +326,10 @@ Patch:  1069_linux-3.12.70.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.70
 
+Patch:  1070_linux-3.12.71.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.71
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1070_linux-3.12.71.patch b/1070_linux-3.12.71.patch
new file mode 100644
index 000..e6e53a2
--- /dev/null
+++ b/1070_linux-3.12.71.patch
@@ -0,0 +1,3728 @@
+diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
+index 64c6734da6d8..1ebce8682832 100644
+--- a/Documentation/kernel-parameters.txt
 b/Documentation/kernel-parameters.txt
+@@ -1013,6 +1013,10 @@ bytes respectively. Such letter suffixes can also be 
entirely omitted.
+   When zero, profiling data is discarded and associated
+   debugfs files are removed at module unload time.
+ 
++  goldfish[X86] Enable the goldfish android emulator platform.
++  Don't use this when you are not running on the
++  android emulator
++
+   gpt [EFI] Forces disk with valid GPT signature but
+   invalid Protective MBR to be treated as GPT.
+ 
+diff --git a/Makefile b/Makefile
+index d0e6e38ee77b..f9da868f99a8 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 70
++SUBLEVEL = 71
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arc/kernel/unaligned.c b/arch/arc/kernel/unaligned.c
+index 7ff5b5c183bb..2cc82b6ec23d 100644
+--- a/arch/arc/kernel/unaligned.c
 b/arch/arc/kernel/unaligned.c
+@@ -240,8 +240,9 @@ int misaligned_fixup(unsigned long address, struct pt_regs 
*regs,
+   if (state.fault)
+   goto fault;
+ 
++  /* clear any remanants of delay slot */
+   if (delay_mode(regs)) {
+-  regs->ret = regs->bta;
++  regs->ret = regs->bta & ~1U;
+   regs->status32 &= ~STATUS_DE_MASK;
+   } else {
+   regs->ret += state.instr_len;
+diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
+index ec33df500f86..93e6b7ea81b9 100644
+--- a/arch/arm/kernel/ptrace.c
 b/arch/arm/kernel/ptrace.c
+@@ -600,7 +600,7 @@ static int gpr_set(struct task_struct *target,
+  const void *kbuf, const void __user *ubuf)
+ {
+   int ret;
+-  struct pt_regs newregs;
++  struct pt_regs newregs = *task_pt_regs(target);
+ 
+   ret = user_regset_copyin(, , , ,
+,
+diff --git a/arch/parisc/include/asm/bitops.h 
b/arch/parisc/include/asm/bitops.h
+index 8c9b631d2a78..8c00e6c06266 100644
+--- a/arch/parisc/include/asm/bitops.h
 b/arch/parisc/include/asm/bitops.h
+@@ -6,7 +6,7 @@
+ #endif
+ 
+ #include 
+-#include /* for BITS_PER_LONG/SHIFT_PER_LONG */
++#include 
+ #include 
+ #include 
+ 
+@@ -16,6 +16,12 @@
+  * to include/asm-i386/bitops.h or kerneldoc
+  */
+ 
++#if __BITS_PER_LONG == 64
++#define SHIFT_PER_LONG 6
++#else
++#define SHIFT_PER_LONG 5
++#endif
++
+ #define CHOP_SHIFTCOUNT(x) (((unsigned long) (x)) & (BITS_PER_LONG - 1))
+ 
+ 
+diff --git a/arch/parisc/include/uapi/asm/bitsperlong.h 
b/arch/parisc/include/uapi/asm/bitsperlong.h
+index 75196b415d3f..540c94de4427 100644
+--- a/arch/parisc/include/uapi/asm/bitsperlong.h
 b/arch/parisc/include/uapi/asm/bitsperlong.h
+@@ -9,10 +9,8 @@
+  */
+ #if (defined(__KERNEL__) && defined(CONFIG_64BIT)) || defined (__LP64__)
+ #define __BITS_PER_LONG 64
+-#define SHIFT_PER_LONG 6
+ #else
+ #define __BITS_PER_LONG 32
+-#define SHIFT_PER_LONG 5
+ #endif
+ 
+ #include 
+diff --git a/arch/parisc/include/uapi/asm/swab.h 
b/arch/parisc/include/uapi/asm/swab.h
+index e78403b129ef..928e1bbac98f 100644
+--- a/arch/parisc/include/uapi/asm/swab.h
 b/arch/parisc/include/uapi/asm/swab.h
+@@ -1,6 +1,7 @@
+ #ifndef _PARISC_SWAB_H
+ #define _PARISC_SWAB_H
+ 
++#include 
+ #include 
+ #include 
+ 
+@@ -38,7 +39,7 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 
x)
+ }
+ #define __arch_swab32 __arch_swab32
+ 
+-#if BITS_PER_LONG > 32
++#if __BITS_PER_LONG > 32
+ /*
+ ** From "PA-RISC 2.0 Architecture", HP Professional Books.
+ ** See Appendix I page 8 , "Endian Byte Swapping".
+@@ -61,6 +62,6 @@ static inline 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2017-03-02 Thread Mike Pagano
commit: cb3b01f7738f06c55acc240961d846aeed82808c
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Mar  2 16:16:08 2017 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Mar  2 16:35:48 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=cb3b01f7

Enable crypto API for systemd as its required for systemd versions >= 233. See 
bug #611368.

 4567_distro-Gentoo-Kconfig.patch | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch
index 4a88040..b8a 100644
--- a/4567_distro-Gentoo-Kconfig.patch
+++ b/4567_distro-Gentoo-Kconfig.patch
@@ -7,9 +7,9 @@
 +source "distro/Kconfig"
 +
  source "arch/$SRCARCH/Kconfig"
 /dev/null  2017-02-18 04:25:56.900821893 -0500
-+++ b/distro/Kconfig   2017-02-18 10:41:16.512328155 -0500
-@@ -0,0 +1,142 @@
+--- /dev/null  2017-03-02 01:55:04.096566155 -0500
 b/distro/Kconfig   2017-03-02 11:12:05.049448255 -0500
+@@ -0,0 +1,145 @@
 +menu "Gentoo Linux"
 +
 +config GENTOO_LINUX
@@ -114,6 +114,9 @@
 +  select BLK_DEV_BSG
 +  select CGROUPS
 +  select CHECKPOINT_RESTORE
++  select CRYPTO_HMAC 
++  select CRYPTO_SHA256
++  select CRYPTO_USER_API_HASH
 +  select DEVPTS_MULTIPLE_INSTANCES
 +  select DMIID if X86_32 || X86_64 || X86
 +  select EPOLL



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2017-03-02 Thread Mike Pagano
commit: a0195eee5d311ba2990ed47190a16c410001d9cd
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Feb 18 20:36:37 2017 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Mar  2 16:35:34 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a0195eee

For GENTOO_LINUX_INIT_SYSTEMD don't add DMIID for non X86 architectures. See 
bug #609590.

 4567_distro-Gentoo-Kconfig.patch | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch
index acb0972..4a88040 100644
--- a/4567_distro-Gentoo-Kconfig.patch
+++ b/4567_distro-Gentoo-Kconfig.patch
@@ -7,8 +7,8 @@
 +source "distro/Kconfig"
 +
  source "arch/$SRCARCH/Kconfig"
 /dev/null  2016-11-15 00:56:18.320838834 -0500
-+++ b/distro/Kconfig   2016-11-16 06:24:29.457357409 -0500
+--- /dev/null  2017-02-18 04:25:56.900821893 -0500
 b/distro/Kconfig   2017-02-18 10:41:16.512328155 -0500
 @@ -0,0 +1,142 @@
 +menu "Gentoo Linux"
 +
@@ -115,7 +115,7 @@
 +  select CGROUPS
 +  select CHECKPOINT_RESTORE
 +  select DEVPTS_MULTIPLE_INSTANCES
-+  select DMIID
++  select DMIID if X86_32 || X86_64 || X86
 +  select EPOLL
 +  select FANOTIFY
 +  select FHANDLE



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-12-18 Thread Mike Pagano
commit: b41ed69413efc35bee2e4278eca367eaf59f8e1f
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Dec 19 00:43:27 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Dec 19 00:43:27 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b41ed694

Remove redundant patch.

 _README  |  4 --
 1520_fix-race-condition-in-packet-set-ring.patch | 62 
 2 files changed, 66 deletions(-)

diff --git a/_README b/_README
index bb6a8f9..9b876d4 100644
--- a/_README
+++ b/_README
@@ -330,10 +330,6 @@ Patch:  
1510_fs-enable-link-security-restrictions-by-default.patch
 From:   
http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/
 Desc:   Enable link security restrictions by default
 
-Patch:  1520_fix-race-condition-in-packet-set-ring.patch
-From:   
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=84ac7260236a49c79eede91617700174c2c19b0c
-Desc:   packet: fix race condition in packet_set_ring. CVE-2016-8655. Bug 
#601926.
-
 Patch:  1700_enable-thinkpad-micled.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=449248
 Desc:   Enable mic mute led in thinkpads

diff --git a/1520_fix-race-condition-in-packet-set-ring.patch 
b/1520_fix-race-condition-in-packet-set-ring.patch
deleted file mode 100644
index d85527f..000
--- a/1520_fix-race-condition-in-packet-set-ring.patch
+++ /dev/null
@@ -1,62 +0,0 @@
 a/net/packet/af_packet.c   2016-12-07 18:10:25.785812861 -0500
-+++ b/net/packet/af_packet.c   2016-12-07 18:18:45.597933525 -0500
-@@ -3648,19 +3648,25 @@ packet_setsockopt(struct socket *sock, i
- 
-   if (optlen != sizeof(val))
-   return -EINVAL;
--  if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)
--  return -EBUSY;
-   if (copy_from_user(, optval, sizeof(val)))
-   return -EFAULT;
-   switch (val) {
-   case TPACKET_V1:
-   case TPACKET_V2:
-   case TPACKET_V3:
--  po->tp_version = val;
--  return 0;
-+  break;
-   default:
-   return -EINVAL;
-   }
-+  lock_sock(sk);
-+  if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) {
-+  ret = -EBUSY;
-+  } else {
-+  po->tp_version = val;
-+  ret = 0;
-+  }
-+  release_sock(sk);
-+  return ret;
-   }
-   case PACKET_RESERVE:
-   {
-@@ -4164,6 +4170,7 @@ static int packet_set_ring(struct sock *
-   /* Added to avoid minimal code churn */
-   struct tpacket_req *req = _u->req;
- 
-+  lock_sock(sk);
-   /* Opening a Tx-ring is NOT supported in TPACKET_V3 */
-   if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) {
-   net_warn_ratelimited("Tx-ring is not supported.\n");
-@@ -4245,8 +4252,6 @@ static int packet_set_ring(struct sock *
-   goto out;
-   }
- 
--  lock_sock(sk);
--
-   /* Detach socket from network */
-   spin_lock(>bind_lock);
-   was_running = po->running;
-@@ -4294,11 +4299,11 @@ static int packet_set_ring(struct sock *
-   if (!tx_ring)
-   prb_shutdown_retire_blk_timer(po, rb_queue);
-   }
--  release_sock(sk);
- 
-   if (pg_vec)
-   free_pg_vec(pg_vec, order, req->tp_block_nr);
- out:
-+  release_sock(sk);
-   return err;
- }
- 



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-12-18 Thread Mike Pagano
commit: eaef47e8b89daedd16983012997986b33004186d
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Dec 18 20:59:19 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Dec 18 20:59:19 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=eaef47e8

Linux patch 3.12.69

 _README  |4 +
 1068_linux-3.12.69.patch | 1536 ++
 2 files changed, 1540 insertions(+)

diff --git a/_README b/_README
index 866b122..bb6a8f9 100644
--- a/_README
+++ b/_README
@@ -310,6 +310,10 @@ Patch:  1066_linux-3.12.67.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.67
 
+Patch:  1066_linux-3.12.68.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.68
+
 Patch:  1067_linux-3.12.68.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.68

diff --git a/1068_linux-3.12.69.patch b/1068_linux-3.12.69.patch
new file mode 100644
index 000..504780f
--- /dev/null
+++ b/1068_linux-3.12.69.patch
@@ -0,0 +1,1536 @@
+diff --git a/Makefile b/Makefile
+index 6d86f39be8ce..f355c0e24cd6 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 68
++SUBLEVEL = 69
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c
+index e751dbc527e2..7e9dfc4fcc23 100644
+--- a/arch/sparc/kernel/signal_32.c
 b/arch/sparc/kernel/signal_32.c
+@@ -88,7 +88,7 @@ asmlinkage void do_sigreturn(struct pt_regs *regs)
+   sf = (struct signal_frame __user *) regs->u_regs[UREG_FP];
+ 
+   /* 1. Make sure we are not getting garbage from the user */
+-  if (!invalid_frame_pointer(sf, sizeof(*sf)))
++  if (invalid_frame_pointer(sf, sizeof(*sf)))
+   goto segv_and_exit;
+ 
+   if (get_user(ufp, >info.si_regs.u_regs[UREG_FP]))
+@@ -149,7 +149,7 @@ asmlinkage void do_rt_sigreturn(struct pt_regs *regs)
+ 
+   synchronize_user_stack();
+   sf = (struct rt_signal_frame __user *) regs->u_regs[UREG_FP];
+-  if (!invalid_frame_pointer(sf, sizeof(*sf)))
++  if (invalid_frame_pointer(sf, sizeof(*sf)))
+   goto segv;
+ 
+   if (get_user(ufp, >regs.u_regs[UREG_FP]))
+diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
+index 4650a3840305..a648a8e66f0d 100644
+--- a/arch/sparc/mm/init_64.c
 b/arch/sparc/mm/init_64.c
+@@ -807,8 +807,10 @@ struct mdesc_mblock {
+ };
+ static struct mdesc_mblock *mblocks;
+ static int num_mblocks;
++static int find_numa_node_for_addr(unsigned long pa,
++ struct node_mem_mask *pnode_mask);
+ 
+-static unsigned long ra_to_pa(unsigned long addr)
++static unsigned long __init ra_to_pa(unsigned long addr)
+ {
+   int i;
+ 
+@@ -824,8 +826,11 @@ static unsigned long ra_to_pa(unsigned long addr)
+   return addr;
+ }
+ 
+-static int find_node(unsigned long addr)
++static int __init find_node(unsigned long addr)
+ {
++  static bool search_mdesc = true;
++  static struct node_mem_mask last_mem_mask = { ~0UL, ~0UL };
++  static int last_index;
+   int i;
+ 
+   addr = ra_to_pa(addr);
+@@ -835,13 +840,30 @@ static int find_node(unsigned long addr)
+   if ((addr & p->mask) == p->val)
+   return i;
+   }
+-  /* The following condition has been observed on LDOM guests.*/
+-  WARN_ONCE(1, "find_node: A physical address doesn't match a NUMA node"
+-  " rule. Some physical memory will be owned by node 0.");
+-  return 0;
++  /* The following condition has been observed on LDOM guests because
++   * node_masks only contains the best latency mask and value.
++   * LDOM guest's mdesc can contain a single latency group to
++   * cover multiple address range. Print warning message only if the
++   * address cannot be found in node_masks nor mdesc.
++   */
++  if ((search_mdesc) &&
++  ((addr & last_mem_mask.mask) != last_mem_mask.val)) {
++  /* find the available node in the mdesc */
++  last_index = find_numa_node_for_addr(addr, _mem_mask);
++  numadbg("find_node: latency group for address 0x%lx is %d\n",
++  addr, last_index);
++  if ((last_index < 0) || (last_index >= num_node_masks)) {
++  /* WARN_ONCE() and use default group 0 */
++  WARN_ONCE(1, "find_node: A physical address doesn't 
match a NUMA node rule. Some physical memory will be owned by node 0.");
++  search_mdesc = false;
++  last_index = 0;
++  }
++  }
++
++  return last_index;
+ }
+ 
+-static u64 memblock_nid_range(u64 start, u64 end, int *nid)
++static u64 __init memblock_nid_range(u64 start, u64 end, int *nid)
+ {
+   *nid = find_node(start);
+   start += PAGE_SIZE;
+@@ -1150,6 +1172,41 @@ static struct mdesc_mlgroup * __init find_mlgroup(u64 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-12-08 Thread Mike Pagano
commit: db24a13c10ab6eb294f0ac692702cd67868d374e
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Dec  9 00:41:37 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Dec  9 00:41:37 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=db24a13c

Fix race condition in packet_set_ring. CVE-2016-8655. Bug #601926.

 _README  |  4 ++
 1520_fix-race-condition-in-packet-set-ring.patch | 62 
 2 files changed, 66 insertions(+)

diff --git a/_README b/_README
index b783e9c..866b122 100644
--- a/_README
+++ b/_README
@@ -326,6 +326,10 @@ Patch:  
1510_fs-enable-link-security-restrictions-by-default.patch
 From:   
http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/
 Desc:   Enable link security restrictions by default
 
+Patch:  1520_fix-race-condition-in-packet-set-ring.patch
+From:   
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=84ac7260236a49c79eede91617700174c2c19b0c
+Desc:   packet: fix race condition in packet_set_ring. CVE-2016-8655. Bug 
#601926.
+
 Patch:  1700_enable-thinkpad-micled.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=449248
 Desc:   Enable mic mute led in thinkpads

diff --git a/1520_fix-race-condition-in-packet-set-ring.patch 
b/1520_fix-race-condition-in-packet-set-ring.patch
new file mode 100644
index 000..d85527f
--- /dev/null
+++ b/1520_fix-race-condition-in-packet-set-ring.patch
@@ -0,0 +1,62 @@
+--- a/net/packet/af_packet.c   2016-12-07 18:10:25.785812861 -0500
 b/net/packet/af_packet.c   2016-12-07 18:18:45.597933525 -0500
+@@ -3648,19 +3648,25 @@ packet_setsockopt(struct socket *sock, i
+ 
+   if (optlen != sizeof(val))
+   return -EINVAL;
+-  if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)
+-  return -EBUSY;
+   if (copy_from_user(, optval, sizeof(val)))
+   return -EFAULT;
+   switch (val) {
+   case TPACKET_V1:
+   case TPACKET_V2:
+   case TPACKET_V3:
+-  po->tp_version = val;
+-  return 0;
++  break;
+   default:
+   return -EINVAL;
+   }
++  lock_sock(sk);
++  if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) {
++  ret = -EBUSY;
++  } else {
++  po->tp_version = val;
++  ret = 0;
++  }
++  release_sock(sk);
++  return ret;
+   }
+   case PACKET_RESERVE:
+   {
+@@ -4164,6 +4170,7 @@ static int packet_set_ring(struct sock *
+   /* Added to avoid minimal code churn */
+   struct tpacket_req *req = _u->req;
+ 
++  lock_sock(sk);
+   /* Opening a Tx-ring is NOT supported in TPACKET_V3 */
+   if (!closing && tx_ring && (po->tp_version > TPACKET_V2)) {
+   net_warn_ratelimited("Tx-ring is not supported.\n");
+@@ -4245,8 +4252,6 @@ static int packet_set_ring(struct sock *
+   goto out;
+   }
+ 
+-  lock_sock(sk);
+-
+   /* Detach socket from network */
+   spin_lock(>bind_lock);
+   was_running = po->running;
+@@ -4294,11 +4299,11 @@ static int packet_set_ring(struct sock *
+   if (!tx_ring)
+   prb_shutdown_retire_blk_timer(po, rb_queue);
+   }
+-  release_sock(sk);
+ 
+   if (pg_vec)
+   free_pg_vec(pg_vec, order, req->tp_block_nr);
+ out:
++  release_sock(sk);
+   return err;
+ }
+ 



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-11-25 Thread Mike Pagano
commit: 7e3b918aa46a1a6055e46189049d0abf292f3f33
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Nov 25 23:24:25 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Nov 25 23:24:25 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=7e3b918a

Update gentoo kconfig patch adding CHECKPOINT_RESTORE for 
GENTOO_LINUX_INIT_SYSTEMD. See bug #598623.

 4567_distro-Gentoo-Kconfig.patch | 49 +---
 1 file changed, 41 insertions(+), 8 deletions(-)

diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch
index 690454a..acb0972 100644
--- a/4567_distro-Gentoo-Kconfig.patch
+++ b/4567_distro-Gentoo-Kconfig.patch
@@ -1,5 +1,5 @@
 a/Kconfig  2014-04-02 09:45:05.389224541 -0400
-+++ b/Kconfig  2014-04-02 09:45:39.269224273 -0400
+--- a/Kconfig  2016-07-01 19:22:17.117439707 -0400
 b/Kconfig  2016-07-01 19:21:54.371440596 -0400
 @@ -8,4 +8,6 @@ config SRCARCH
string
option env="SRCARCH"
@@ -7,9 +7,9 @@
 +source "distro/Kconfig"
 +
  source "arch/$SRCARCH/Kconfig"
 a/distro/Kconfig   1969-12-31 19:00:00.0 -0500
-+++ b/distro/Kconfig   2015-01-02 13:54:45.589830665 -0500
-@@ -0,0 +1,109 @@
+--- /dev/null  2016-11-15 00:56:18.320838834 -0500
 b/distro/Kconfig   2016-11-16 06:24:29.457357409 -0500
+@@ -0,0 +1,142 @@
 +menu "Gentoo Linux"
 +
 +config GENTOO_LINUX
@@ -30,9 +30,10 @@
 +
 +  depends on GENTOO_LINUX
 +  default y if GENTOO_LINUX
-+  
++
 +  select DEVTMPFS
 +  select TMPFS
++  select UNIX
 +
 +  select MMU
 +  select SHMEM
@@ -51,7 +52,32 @@
 +  boot process; if not available, it causes sysfs and udev to 
malfunction.
 +
 +  To ensure Gentoo Linux boots, it is best to leave this setting 
enabled;
-+  if you run a custom setup, you could consider whether to 
disable this. 
++  if you run a custom setup, you could consider whether to 
disable this.
++
++config GENTOO_LINUX_PORTAGE
++  bool "Select options required by Portage features"
++
++  depends on GENTOO_LINUX
++  default y if GENTOO_LINUX
++
++  select CGROUPS
++  select NAMESPACES
++  select IPC_NS
++  select NET_NS
++  select SYSVIPC
++
++  help
++  This enables options required by various Portage FEATURES.
++  Currently this selects:
++
++  CGROUPS (required for FEATURES=cgroup)
++  IPC_NS  (required for FEATURES=ipc-sandbox)
++  NET_NS  (required for FEATURES=network-sandbox)
++  SYSVIPC (required by IPC_NS)
++   
++
++  It is highly recommended that you leave this enabled as these 
FEATURES
++  are, or will soon be, enabled by default.
 +
 +menu "Support for init systems, system and service managers"
 +  visible if GENTOO_LINUX
@@ -87,17 +113,24 @@
 +  select AUTOFS4_FS
 +  select BLK_DEV_BSG
 +  select CGROUPS
++  select CHECKPOINT_RESTORE
 +  select DEVPTS_MULTIPLE_INSTANCES
++  select DMIID
 +  select EPOLL
 +  select FANOTIFY
 +  select FHANDLE
 +  select INOTIFY_USER
++  select IPV6
 +  select NET
-+  select NET_NS 
++  select NET_NS
 +  select PROC_FS
++  select SECCOMP
++  select SECCOMP_FILTER
 +  select SIGNALFD
 +  select SYSFS
 +  select TIMERFD
++  select TMPFS_POSIX_ACL
++  select TMPFS_XATTR
 +
 +  select ANON_INODES
 +  select BLOCK



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-11-10 Thread Mike Pagano
commit: 552490bf4090bcf87c75d5faba3a9f7351760986
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Nov 11 00:58:13 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Nov 11 00:58:13 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=552490bf

Linux patch 3.12.67

 _README  |4 +
 1066_linux-3.12.67.patch | 2912 ++
 2 files changed, 2916 insertions(+)

diff --git a/_README b/_README
index 930d266..1f30ddb 100644
--- a/_README
+++ b/_README
@@ -306,6 +306,10 @@ Patch:  1065_linux-3.12.66.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.66
 
+Patch:  1066_linux-3.12.67.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.67
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1066_linux-3.12.67.patch b/1066_linux-3.12.67.patch
new file mode 100644
index 000..238465a
--- /dev/null
+++ b/1066_linux-3.12.67.patch
@@ -0,0 +1,2912 @@
+diff --git a/Makefile b/Makefile
+index eb81ece69d00..32dbd8513eee 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 66
++SUBLEVEL = 67
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arc/kernel/signal.c b/arch/arc/kernel/signal.c
+index a0c63fc48457..ca6bcd132a14 100644
+--- a/arch/arc/kernel/signal.c
 b/arch/arc/kernel/signal.c
+@@ -80,13 +80,14 @@ static int restore_usr_regs(struct pt_regs *regs, struct 
rt_sigframe __user *sf)
+   int err;
+ 
+   err = __copy_from_user(, >uc.uc_sigmask, sizeof(set));
+-  if (!err)
+-  set_current_blocked();
+-
+   err |= __copy_from_user(regs, &(sf->uc.uc_mcontext.regs.scratch),
+   sizeof(sf->uc.uc_mcontext.regs.scratch));
++  if (err)
++  return err;
+ 
+-  return err;
++  set_current_blocked();
++
++  return 0;
+ }
+ 
+ static inline int is_do_ss_needed(unsigned int magic)
+diff --git a/arch/metag/include/asm/atomic.h b/arch/metag/include/asm/atomic.h
+index 307ecd2bd9a1..d7d6b9e53e44 100644
+--- a/arch/metag/include/asm/atomic.h
 b/arch/metag/include/asm/atomic.h
+@@ -38,6 +38,7 @@
+ #define atomic_dec(v) atomic_sub(1, (v))
+ 
+ #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
++#define atomic_dec_if_positive(v)   atomic_sub_if_positive(1, v)
+ 
+ #define smp_mb__before_atomic_dec()   barrier()
+ #define smp_mb__after_atomic_dec()barrier()
+@@ -46,8 +47,6 @@
+ 
+ #endif
+ 
+-#define atomic_dec_if_positive(v)   atomic_sub_if_positive(1, v)
+-
+ #include 
+ 
+ #endif /* __ASM_METAG_ATOMIC_H */
+diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h
+index 5e6cd0947393..a288de2199d8 100644
+--- a/arch/mips/include/asm/ptrace.h
 b/arch/mips/include/asm/ptrace.h
+@@ -73,7 +73,7 @@ static inline int is_syscall_success(struct pt_regs *regs)
+ 
+ static inline long regs_return_value(struct pt_regs *regs)
+ {
+-  if (is_syscall_success(regs))
++  if (is_syscall_success(regs) || !user_mode(regs))
+   return regs->regs[2];
+   else
+   return -regs->regs[2];
+diff --git a/arch/powerpc/kernel/eeh_driver.c 
b/arch/powerpc/kernel/eeh_driver.c
+index d3a132c9127c..33d998fda24e 100644
+--- a/arch/powerpc/kernel/eeh_driver.c
 b/arch/powerpc/kernel/eeh_driver.c
+@@ -697,6 +697,14 @@ static void eeh_handle_special_event(void)
+ 
+   /* Notify all devices to be down */
+   bus = eeh_pe_bus_get(phb_pe);
++  if (!bus) {
++  pr_err("%s: Cannot find PCI bus for "
++ "PHB#%d-PE#%x\n",
++ __func__,
++ pe->phb->global_number,
++ pe->addr);
++  break;
++  }
+   eeh_pe_dev_traverse(pe,
+   eeh_report_failure, NULL);
+   pcibios_remove_pci_devices(bus);
+diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
+index 8213ee1eb05a..1def48da21b2 100644
+--- a/arch/powerpc/kernel/nvram_64.c
 b/arch/powerpc/kernel/nvram_64.c
+@@ -288,7 +288,7 @@ int __init nvram_remove_partition(const char *name, int 
sig,
+ 
+   /* Make partition a free partition */
+   part->header.signature = NVRAM_SIG_FREE;
+-  strncpy(part->header.name, "", 12);
++  memset(part->header.name, 'w', 12);
+   part->header.checksum = nvram_checksum(>header);
+   rc = nvram_write_header(part);
+   if (rc <= 0) {
+@@ -306,8 +306,8 @@ int 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-09-09 Thread Mike Pagano
commit: 9b4cf106e7975c5b800be8bfd7c2db3dfe4b49a5
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Sep  9 19:24:54 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Sep  9 19:24:54 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9b4cf106

Linux patch 3.12.63

 _README  |4 +
 1062_linux-3.12.63.patch | 3390 ++
 2 files changed, 3394 insertions(+)

diff --git a/_README b/_README
index 4de8594..4456afb 100644
--- a/_README
+++ b/_README
@@ -290,6 +290,10 @@ Patch:  1061_linux-3.12.62.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.62
 
+Patch:  1062_linux-3.12.63.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.63
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1062_linux-3.12.63.patch b/1062_linux-3.12.63.patch
new file mode 100644
index 000..05e1590
--- /dev/null
+++ b/1062_linux-3.12.63.patch
@@ -0,0 +1,3390 @@
+diff --git a/Documentation/scsi/scsi_eh.txt b/Documentation/scsi/scsi_eh.txt
+index 6ff16b620d84..c08b62d63afa 100644
+--- a/Documentation/scsi/scsi_eh.txt
 b/Documentation/scsi/scsi_eh.txt
+@@ -255,19 +255,23 @@ scmd->allowed.
+ 
+  3. scmd recovered
+ ACTION: scsi_eh_finish_cmd() is invoked to EH-finish scmd
+-  - shost->host_failed--
+   - clear scmd->eh_eflags
+   - scsi_setup_cmd_retry()
+   - move from local eh_work_q to local eh_done_q
+ LOCKING: none
++CONCURRENCY: at most one thread per separate eh_work_q to
++   keep queue manipulation lockless
+ 
+  4. EH completes
+ ACTION: scsi_eh_flush_done_q() retries scmds or notifies upper
+-  layer of failure.
++  layer of failure. May be called concurrently but must have
++  a no more than one thread per separate eh_work_q to
++  manipulate the queue locklessly
+   - scmd is removed from eh_done_q and scmd->eh_entry is cleared
+   - if retry is necessary, scmd is requeued using
+   scsi_queue_insert()
+   - otherwise, scsi_finish_command() is invoked for scmd
++  - zero shost->host_failed
+ LOCKING: queue or finish function performs appropriate locking
+ 
+ 
+diff --git a/Makefile b/Makefile
+index b742e9075b78..0908fae943a1 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 62
++SUBLEVEL = 63
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arc/kernel/stacktrace.c b/arch/arc/kernel/stacktrace.c
+index 9c9e1d3ec5fe..0ebb921e8786 100644
+--- a/arch/arc/kernel/stacktrace.c
 b/arch/arc/kernel/stacktrace.c
+@@ -131,7 +131,7 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs 
*regs,
+* prelogue is setup (callee regs saved and then fp set and not other
+* way around
+*/
+-  pr_warn("CONFIG_ARC_DW2_UNWIND needs to be enabled\n");
++  pr_warn_once("CONFIG_ARC_DW2_UNWIND needs to be enabled\n");
+   return 0;
+ 
+ #endif
+diff --git a/arch/arm/include/asm/pgtable-3level.h 
b/arch/arm/include/asm/pgtable-3level.h
+index 8afa39f81477..0f153b62d253 100644
+--- a/arch/arm/include/asm/pgtable-3level.h
 b/arch/arm/include/asm/pgtable-3level.h
+@@ -237,8 +237,11 @@ PMD_BIT_FUNC(mkyoung,   |= PMD_SECT_AF);
+ #define pfn_pmd(pfn,prot) (__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | 
pgprot_val(prot)))
+ #define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot)
+ 
+-/* represent a notpresent pmd by zero, this is used by pmdp_invalidate */
+-#define pmd_mknotpresent(pmd) (__pmd(0))
++/* represent a notpresent pmd by faulting entry, this is used by 
pmdp_invalidate */
++static inline pmd_t pmd_mknotpresent(pmd_t pmd)
++{
++  return __pmd(pmd_val(pmd) & ~L_PMD_SECT_VALID);
++}
+ 
+ static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
+ {
+diff --git a/arch/arm/kernel/sys_oabi-compat.c 
b/arch/arm/kernel/sys_oabi-compat.c
+index 3e94811690ce..a0aee80b608d 100644
+--- a/arch/arm/kernel/sys_oabi-compat.c
 b/arch/arm/kernel/sys_oabi-compat.c
+@@ -275,8 +275,12 @@ asmlinkage long sys_oabi_epoll_wait(int epfd,
+   mm_segment_t fs;
+   long ret, err, i;
+ 
+-  if (maxevents <= 0 || maxevents > (INT_MAX/sizeof(struct epoll_event)))
++  if (maxevents <= 0 ||
++  maxevents > (INT_MAX/sizeof(*kbuf)) ||
++  maxevents > (INT_MAX/sizeof(*events)))
+   return -EINVAL;
++  if (!access_ok(VERIFY_WRITE, events, sizeof(*events) * maxevents))
++  return -EFAULT;
+   kbuf = kmalloc(sizeof(*kbuf) * maxevents, GFP_KERNEL);
+   if (!kbuf)
+   return -ENOMEM;
+@@ -313,6 +317,8 @@ asmlinkage long sys_oabi_semtimedop(int semid,
+ 
+   if (nsops < 1 || nsops > SEMOPM)
+   return -EINVAL;
++  if (!access_ok(VERIFY_READ, tsops, sizeof(*tsops) * nsops))
++  

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-07-22 Thread Mike Pagano
commit: bc466f94adf6e1cde4bee6b1d765d4706b5152c1
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Jul 22 23:30:32 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Jul 22 23:30:32 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=bc466f94

Linux patch 3.12.62

 _README  |4 +
 1061_linux-3.12.62.patch | 4643 ++
 2 files changed, 4647 insertions(+)

diff --git a/_README b/_README
index d9fd762..4de8594 100644
--- a/_README
+++ b/_README
@@ -286,6 +286,10 @@ Patch:  1060_linux-3.12.61.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.61
 
+Patch:  1061_linux-3.12.62.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.62
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1061_linux-3.12.62.patch b/1061_linux-3.12.62.patch
new file mode 100644
index 000..33b8b03
--- /dev/null
+++ b/1061_linux-3.12.62.patch
@@ -0,0 +1,4643 @@
+diff --git a/Makefile b/Makefile
+index 59cb9a750d78..b742e9075b78 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 61
++SUBLEVEL = 62
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arm/include/asm/pgtable-2level.h 
b/arch/arm/include/asm/pgtable-2level.h
+index c98c9c89b95c..3f1b3a4150b6 100644
+--- a/arch/arm/include/asm/pgtable-2level.h
 b/arch/arm/include/asm/pgtable-2level.h
+@@ -162,6 +162,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long 
addr)
+ }
+ 
+ #define pmd_bad(pmd)  (pmd_val(pmd) & 2)
++#define pmd_present(pmd)  (pmd_val(pmd))
+ 
+ #define copy_pmd(pmdpd,pmdps) \
+   do {\
+diff --git a/arch/arm/include/asm/pgtable-3level.h 
b/arch/arm/include/asm/pgtable-3level.h
+index 6a171d0afc12..8afa39f81477 100644
+--- a/arch/arm/include/asm/pgtable-3level.h
 b/arch/arm/include/asm/pgtable-3level.h
+@@ -209,6 +209,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long 
addr)
+   : !!(pmd_val(pmd) & (val)))
+ #define pmd_isclear(pmd, val) (!(pmd_val(pmd) & (val)))
+ 
++#define pmd_present(pmd)  (pmd_isset((pmd), L_PMD_SECT_VALID))
+ #define pmd_young(pmd)(pmd_isset((pmd), PMD_SECT_AF))
+ 
+ #define __HAVE_ARCH_PMD_WRITE
+diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
+index a348bfd34f66..5bdf9864fb00 100644
+--- a/arch/arm/include/asm/pgtable.h
 b/arch/arm/include/asm/pgtable.h
+@@ -182,7 +182,6 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
+ #define pgd_offset_k(addr)pgd_offset(_mm, addr)
+ 
+ #define pmd_none(pmd) (!pmd_val(pmd))
+-#define pmd_present(pmd)  (pmd_val(pmd))
+ 
+ static inline pte_t *pmd_page_vaddr(pmd_t pmd)
+ {
+diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
+index 0dd3b79b15c3..ec33df500f86 100644
+--- a/arch/arm/kernel/ptrace.c
 b/arch/arm/kernel/ptrace.c
+@@ -733,8 +733,8 @@ static int vfp_set(struct task_struct *target,
+   if (ret)
+   return ret;
+ 
+-  vfp_flush_hwstate(thread);
+   thread->vfpstate.hard = new_vfp;
++  vfp_flush_hwstate(thread);
+ 
+   return 0;
+ }
+diff --git a/arch/mips/include/asm/kvm_host.h 
b/arch/mips/include/asm/kvm_host.h
+index 4d6fa0bf1305..883a162083af 100644
+--- a/arch/mips/include/asm/kvm_host.h
 b/arch/mips/include/asm/kvm_host.h
+@@ -349,6 +349,7 @@ struct kvm_mips_tlb {
+ #define KVM_MIPS_GUEST_TLB_SIZE 64
+ struct kvm_vcpu_arch {
+   void *host_ebase, *guest_ebase;
++  int (*vcpu_run)(struct kvm_run *run, struct kvm_vcpu *vcpu);
+   unsigned long host_stack;
+   unsigned long host_gp;
+ 
+diff --git a/arch/mips/include/asm/processor.h 
b/arch/mips/include/asm/processor.h
+index 3605b844ad87..efe9964ea9b4 100644
+--- a/arch/mips/include/asm/processor.h
 b/arch/mips/include/asm/processor.h
+@@ -51,7 +51,7 @@ extern unsigned int vced_count, vcei_count;
+  * User space process size: 2GB. This is hardcoded into a few places,
+  * so don't change it unless you know what you are doing.
+  */
+-#define TASK_SIZE 0x7fff8000UL
++#define TASK_SIZE 0x8000UL
+ #endif
+ 
+ #ifdef __KERNEL__
+diff --git a/arch/mips/kvm/kvm_locore.S b/arch/mips/kvm/kvm_locore.S
+index ba5ce99c021d..d1fa2a57218b 100644
+--- a/arch/mips/kvm/kvm_locore.S
 b/arch/mips/kvm/kvm_locore.S
+@@ -229,6 +229,7 @@ FEXPORT(__kvm_mips_load_k0k1)
+ 
+   /* Jump to guest */
+   eret
++EXPORT(__kvm_mips_vcpu_run_end)
+ 
+ VECTOR(MIPSX(exception), unknown)
+ /*
+diff --git a/arch/mips/kvm/kvm_mips.c b/arch/mips/kvm/kvm_mips.c
+index 7e7de1f2b8ed..08972791edb4 100644
+--- a/arch/mips/kvm/kvm_mips.c
 b/arch/mips/kvm/kvm_mips.c
+@@ -347,6 +347,15 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, 
unsigned int id)
+   

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-06-20 Thread Mike Pagano
commit: e65b826c5b6d4f93e10e568d082bb7e45b80805a
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Jun 20 19:58:48 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Jun 20 19:58:48 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=e65b826c

Linux patch 3.12.61

 _README  |4 +
 1060_linux-3.12.61.patch | 1697 ++
 2 files changed, 1701 insertions(+)

diff --git a/_README b/_README
index b2378f8..d9fd762 100644
--- a/_README
+++ b/_README
@@ -282,6 +282,10 @@ Patch:  1059_linux-3.12.60.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.60
 
+Patch:  1060_linux-3.12.61.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.61
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1060_linux-3.12.61.patch b/1060_linux-3.12.61.patch
new file mode 100644
index 000..8caea85
--- /dev/null
+++ b/1060_linux-3.12.61.patch
@@ -0,0 +1,1697 @@
+diff --git a/Makefile b/Makefile
+index 8dedf316dd48..59cb9a750d78 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 60
++SUBLEVEL = 61
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arc/mm/tlbex.S b/arch/arc/mm/tlbex.S
+index cf7d7d9ad695..98837a2bfd5e 100644
+--- a/arch/arc/mm/tlbex.S
 b/arch/arc/mm/tlbex.S
+@@ -89,7 +89,7 @@ ex_saved_reg1:
+ #ifdef CONFIG_SMP
+   sr  r0, [ARC_REG_SCRATCH_DATA0] ; freeup r0 to code with
+   GET_CPU_ID  r0  ; get to per cpu scratch mem,
+-  lsl r0, r0, L1_CACHE_SHIFT  ; cache line wide per cpu
++  asl r0, r0, L1_CACHE_SHIFT  ; cache line wide per cpu
+   add r0, @ex_saved_reg1, r0
+ #else
+   str0, [@ex_saved_reg1]
+@@ -108,7 +108,7 @@ ex_saved_reg1:
+ .macro TLBMISS_RESTORE_REGS
+ #ifdef CONFIG_SMP
+   GET_CPU_ID  r0  ; get to per cpu scratch mem
+-  lsl r0, r0, L1_CACHE_SHIFT  ; each is cache line wide
++  asl r0, r0, L1_CACHE_SHIFT  ; each is cache line wide
+   add r0, @ex_saved_reg1, r0
+   ld_s  r3, [r0,12]
+   ld_s  r2, [r0, 8]
+@@ -220,7 +220,7 @@ ex_saved_reg1:
+ 
+ .macro CONV_PTE_TO_TLB
+   andr3, r0, PTE_BITS_RWX ;   r w x
+-  lslr2, r3, 3; r w x 0 0 0
++  aslr2, r3, 3; Kr Kw Kx 0  0  0 (GLOBAL, kernel only)
+   and.f  0,  r0, _PAGE_GLOBAL
+   or.z   r2, r2, r3   ; r w x r w x
+ 
+diff --git a/arch/mips/ath79/early_printk.c b/arch/mips/ath79/early_printk.c
+index b955fafc58ba..d1adc59af5bf 100644
+--- a/arch/mips/ath79/early_printk.c
 b/arch/mips/ath79/early_printk.c
+@@ -31,13 +31,15 @@ static inline void prom_putchar_wait(void __iomem *reg, 
u32 mask, u32 val)
+   } while (1);
+ }
+ 
++#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
++
+ static void prom_putchar_ar71xx(unsigned char ch)
+ {
+   void __iomem *base = (void __iomem *)(KSEG1ADDR(AR71XX_UART_BASE));
+ 
+-  prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE);
++  prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY);
+   __raw_writel(ch, base + UART_TX * 4);
+-  prom_putchar_wait(base + UART_LSR * 4, UART_LSR_THRE, UART_LSR_THRE);
++  prom_putchar_wait(base + UART_LSR * 4, BOTH_EMPTY, BOTH_EMPTY);
+ }
+ 
+ static void prom_putchar_ar933x(unsigned char ch)
+diff --git a/arch/mips/include/uapi/asm/siginfo.h 
b/arch/mips/include/uapi/asm/siginfo.h
+index 88e292b7719e..9997e4d48d70 100644
+--- a/arch/mips/include/uapi/asm/siginfo.h
 b/arch/mips/include/uapi/asm/siginfo.h
+@@ -46,13 +46,13 @@ typedef struct siginfo {
+ 
+   /* kill() */
+   struct {
+-  pid_t _pid; /* sender's pid */
++  __kernel_pid_t _pid;/* sender's pid */
+   __ARCH_SI_UID_T _uid;   /* sender's uid */
+   } _kill;
+ 
+   /* POSIX.1b timers */
+   struct {
+-  timer_t _tid;   /* timer id */
++  __kernel_timer_t _tid;  /* timer id */
+   int _overrun;   /* overrun count */
+   char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
+   sigval_t _sigval;   /* same as below */
+@@ -61,26 +61,26 @@ typedef struct siginfo {
+ 
+   /* POSIX.1b signals */
+   struct {
+-  pid_t _pid; /* sender's pid */
++  __kernel_pid_t _pid;/* sender's pid */
+   __ARCH_SI_UID_T _uid;   /* sender's uid */
+   sigval_t _sigval;
+   } _rt;
+ 
+   /* SIGCHLD */
+   struct {
+-  pid_t _pid; /* which child */
++   

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-05-24 Thread Mike Pagano
commit: a481927cb9e7dd1d92cec3fda3662f4b293d4518
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue May 24 11:58:27 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue May 24 11:58:27 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a481927c

Linux patch 3.12.60

 _README  |4 +
 1059_linux-3.12.60.patch | 2460 ++
 2 files changed, 2464 insertions(+)

diff --git a/_README b/_README
index fdbff05..b2378f8 100644
--- a/_README
+++ b/_README
@@ -278,6 +278,10 @@ Patch:  1058_linux-3.12.59.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.59
 
+Patch:  1059_linux-3.12.60.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.60
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1059_linux-3.12.60.patch b/1059_linux-3.12.60.patch
new file mode 100644
index 000..9d9f893
--- /dev/null
+++ b/1059_linux-3.12.60.patch
@@ -0,0 +1,2460 @@
+diff --git a/MAINTAINERS b/MAINTAINERS
+index 44881abcfb06..b321dc0d 100644
+--- a/MAINTAINERS
 b/MAINTAINERS
+@@ -3165,8 +3165,8 @@ F:   Documentation/x86/efi-stub.txt
+ F:arch/ia64/kernel/efi.c
+ F:arch/x86/boot/compressed/eboot.[ch]
+ F:arch/x86/include/asm/efi.h
+-F:arch/x86/platform/efi/*
+-F:drivers/firmware/efi/*
++F:arch/x86/platform/efi/
++F:drivers/firmware/efi/
+ F:include/linux/efi*.h
+ 
+ EFI VARIABLE FILESYSTEM
+diff --git a/Makefile b/Makefile
+index d683fdba9e8a..8dedf316dd48 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 59
++SUBLEVEL = 60
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arm/mach-omap2/cpuidle34xx.c 
b/arch/arm/mach-omap2/cpuidle34xx.c
+index e18709d3b95d..38e1bdcaf015 100644
+--- a/arch/arm/mach-omap2/cpuidle34xx.c
 b/arch/arm/mach-omap2/cpuidle34xx.c
+@@ -34,6 +34,7 @@
+ #include "pm.h"
+ #include "control.h"
+ #include "common.h"
++#include "soc.h"
+ 
+ /* Mach specific information to be recorded in the C-state driver_data */
+ struct omap3_idle_statedata {
+@@ -322,6 +323,69 @@ static struct cpuidle_driver omap3_idle_driver = {
+   .safe_state_index = 0,
+ };
+ 
++/*
++ * Numbers based on measurements made in October 2009 for PM optimized kernel
++ * with CPU freq enabled on device Nokia N900. Assumes OPP2 (main idle OPP,
++ * and worst case latencies).
++ */
++static struct cpuidle_driver omap3430_idle_driver = {
++  .name = "omap3430_idle",
++  .owner= THIS_MODULE,
++  .states = {
++  {
++  .enter= omap3_enter_idle_bm,
++  .exit_latency = 110 + 162,
++  .target_residency = 5,
++  .name = "C1",
++  .desc = "MPU ON + CORE ON",
++  },
++  {
++  .enter= omap3_enter_idle_bm,
++  .exit_latency = 106 + 180,
++  .target_residency = 309,
++  .name = "C2",
++  .desc = "MPU ON + CORE ON",
++  },
++  {
++  .enter= omap3_enter_idle_bm,
++  .exit_latency = 107 + 410,
++  .target_residency = 46057,
++  .name = "C3",
++  .desc = "MPU RET + CORE ON",
++  },
++  {
++  .enter= omap3_enter_idle_bm,
++  .exit_latency = 121 + 3374,
++  .target_residency = 46057,
++  .name = "C4",
++  .desc = "MPU OFF + CORE ON",
++  },
++  {
++  .enter= omap3_enter_idle_bm,
++  .exit_latency = 855 + 1146,
++  .target_residency = 46057,
++  .name = "C5",
++  .desc = "MPU RET + CORE RET",
++  },
++  {
++  .enter= omap3_enter_idle_bm,
++  .exit_latency = 7580 + 4134,
++  .target_residency = 484329,
++  .name = "C6",
++  .desc = "MPU OFF + CORE RET",
++  },
++  {
++  .enter= omap3_enter_idle_bm,
++  .exit_latency = 7505 + 15274,
++  .target_residency = 484329,
++  .name = "C7",
++  .desc = "MPU OFF + CORE OFF",
++  },
++  },
++  

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-04-28 Thread Mike Pagano
commit: 248ced9dfcb08afe949a95f1918d25eac762ec40
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Apr 28 14:05:14 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Apr 28 14:05:14 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=248ced9d

Removal of redundant patchset

 _README|  4 ---
 ..._write-to-first-call-sb_start_write_try-a.patch | 32 --
 2 files changed, 36 deletions(-)

diff --git a/_README b/_README
index ee2e2fc..fdbff05 100644
--- a/_README
+++ b/_README
@@ -294,10 +294,6 @@ Patch:  1700_enable-thinkpad-micled.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=449248
 Desc:   Enable mic mute led in thinkpads
 
-Patch:  1900_modify-pipe_write-to-first-call-sb_start_write_try-a.patch
-From:   https://bugs.gentoo.org/show_bug.cgi?id=493002
-Desc:   Modify pipe_write to first call sb_start_write_try(),skip time update 
on fail 
-
 Patch:  2400_kcopy-patch-for-infiniband-driver.patch
 From:   Alexey Shvetsov 
 Desc:   Zero copy for infiniband psm userspace driver

diff --git a/1900_modify-pipe_write-to-first-call-sb_start_write_try-a.patch 
b/1900_modify-pipe_write-to-first-call-sb_start_write_try-a.patch
deleted file mode 100644
index 67dedaf..000
--- a/1900_modify-pipe_write-to-first-call-sb_start_write_try-a.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 34d651f7979e35fde9a4f77adc26a7e8c1e3e54a Mon Sep 17 00:00:00 2001
-From: Dmitry Monakhov 
-Date: Tue, 10 Dec 2013 10:05:10 -0500
-Subject: [PATCH] Modify pipe_write to first call sb_start_write_try() and upon
- encountering a frozen fs, skip the time update. See kernel bug #65701 and
- Gentoo Kernel bug #493002.
-
-Signed-off-by: Mike Pagano 

- fs/pipe.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/fs/pipe.c b/fs/pipe.c
-index 0e0752e..78fd0d0 100644
 a/fs/pipe.c
-+++ b/fs/pipe.c
-@@ -663,10 +663,11 @@ out:
-   wake_up_interruptible_sync_poll(>wait, POLLIN | 
POLLRDNORM);
-   kill_fasync(>fasync_readers, SIGIO, POLL_IN);
-   }
--  if (ret > 0) {
-+  if (ret > 0 && sb_start_write_trylock(file_inode(filp)->i_sb)) {
-   int err = file_update_time(filp);
-   if (err)
-   ret = err;
-+  sb_end_write(file_inode(filp)->i_sb);
-   }
-   return ret;
- }
--- 
-1.8.3.2
-



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-04-28 Thread Mike Pagano
commit: 33b1f3fe8faab86370b4dac54a65e3747091bd09
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Apr 28 12:28:25 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Apr 28 12:28:25 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=33b1f3fe

Fix 3.12.59 patch.

 1058_linux-3.12.59.patch | Bin 24492 -> 94565 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/1058_linux-3.12.59.patch b/1058_linux-3.12.59.patch
index 18686a4..3e5e813 100644
Binary files a/1058_linux-3.12.59.patch and b/1058_linux-3.12.59.patch differ



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-04-27 Thread Mike Pagano
commit: b8ee1d0746b7d9dfe99be1b558eb2d42f2bc3859
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Apr 27 19:40:32 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Apr 27 19:40:32 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b8ee1d07

Linux patch 3.12.59

 _README  |   4 
 1058_linux-3.12.59.patch | Bin 0 -> 24492 bytes
 2 files changed, 4 insertions(+)

diff --git a/_README b/_README
index fce2e2e..ee2e2fc 100644
--- a/_README
+++ b/_README
@@ -274,6 +274,10 @@ Patch:  1057_linux-3.12.58.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.58
 
+Patch:  1058_linux-3.12.59.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.59
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1058_linux-3.12.59.patch b/1058_linux-3.12.59.patch
new file mode 100644
index 000..18686a4
Binary files /dev/null and b/1058_linux-3.12.59.patch differ



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-04-13 Thread Mike Pagano
commit: 919c9e885db8879430c8b46baaf90cd8318cdb36
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Apr 13 23:51:43 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Apr 13 23:51:43 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=919c9e88

Linux patch 3.12.58

 _README  |4 +
 1057_linux-3.12.58.patch | 3347 ++
 2 files changed, 3351 insertions(+)

diff --git a/_README b/_README
index 5531cd4..fce2e2e 100644
--- a/_README
+++ b/_README
@@ -270,6 +270,10 @@ Patch:  1056_linux-3.12.57.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.57
 
+Patch:  1057_linux-3.12.58.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.58
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1057_linux-3.12.58.patch b/1057_linux-3.12.58.patch
new file mode 100644
index 000..4785f31
--- /dev/null
+++ b/1057_linux-3.12.58.patch
@@ -0,0 +1,3347 @@
+diff --git a/Makefile b/Makefile
+index af4cfc008e64..591c9e731538 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 57
++SUBLEVEL = 58
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/s390/include/asm/mmu_context.h 
b/arch/s390/include/asm/mmu_context.h
+index 9f973d8de90e..f61e21848845 100644
+--- a/arch/s390/include/asm/mmu_context.h
 b/arch/s390/include/asm/mmu_context.h
+@@ -17,12 +17,15 @@ static inline int init_new_context(struct task_struct *tsk,
+ {
+   atomic_set(>context.attach_count, 0);
+   mm->context.flush_mm = 0;
+-  mm->context.asce_bits = _ASCE_TABLE_LENGTH | _ASCE_USER_BITS;
++  mm->context.has_pgste = 0;
++  if (mm->context.asce_limit == 0) {
++  /* context created by exec, set asce limit to 4TB */
++  mm->context.asce_bits = _ASCE_TABLE_LENGTH | _ASCE_USER_BITS;
+ #ifdef CONFIG_64BIT
+-  mm->context.asce_bits |= _ASCE_TYPE_REGION3;
++  mm->context.asce_bits |= _ASCE_TYPE_REGION3;
+ #endif
+-  mm->context.has_pgste = 0;
+-  mm->context.asce_limit = STACK_TOP_MAX;
++  mm->context.asce_limit = STACK_TOP_MAX;
++  }
+   crst_table_init((unsigned long *) mm->pgd, pgd_entry_type(mm));
+   return 0;
+ }
+@@ -75,10 +78,6 @@ static inline void activate_mm(struct mm_struct *prev,
+ static inline void arch_dup_mmap(struct mm_struct *oldmm,
+struct mm_struct *mm)
+ {
+-#ifdef CONFIG_64BIT
+-  if (oldmm->context.asce_limit < mm->context.asce_limit)
+-  crst_table_downgrade(mm, oldmm->context.asce_limit);
+-#endif
+ }
+ 
+ static inline void arch_exit_mmap(struct mm_struct *mm)
+diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
+index 3df3bd544492..1768d4083f74 100644
+--- a/arch/um/drivers/mconsole_kern.c
 b/arch/um/drivers/mconsole_kern.c
+@@ -133,7 +133,7 @@ void mconsole_proc(struct mc_request *req)
+   ptr += strlen("proc");
+   ptr = skip_spaces(ptr);
+ 
+-  file = file_open_root(mnt->mnt_root, mnt, ptr, O_RDONLY);
++  file = file_open_root(mnt->mnt_root, mnt, ptr, O_RDONLY, 0);
+   if (IS_ERR(file)) {
+   mconsole_reply(req, "Failed to open file", 1, 0);
+   printk(KERN_ERR "open /proc/%s: %ld\n", ptr, PTR_ERR(file));
+diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
+index 1d2091a226bc..29559831c94f 100644
+--- a/arch/x86/include/asm/apic.h
 b/arch/x86/include/asm/apic.h
+@@ -699,8 +699,8 @@ static inline void entering_irq(void)
+ 
+ static inline void entering_ack_irq(void)
+ {
+-  ack_APIC_irq();
+   entering_irq();
++  ack_APIC_irq();
+ }
+ 
+ static inline void exiting_irq(void)
+diff --git a/arch/x86/include/asm/xen/hypervisor.h 
b/arch/x86/include/asm/xen/hypervisor.h
+index d866959e5685..d2ad00a42234 100644
+--- a/arch/x86/include/asm/xen/hypervisor.h
 b/arch/x86/include/asm/xen/hypervisor.h
+@@ -57,4 +57,6 @@ static inline bool xen_x2apic_para_available(void)
+ }
+ #endif
+ 
++extern void xen_set_iopl_mask(unsigned mask);
++
+ #endif /* _ASM_X86_XEN_HYPERVISOR_H */
+diff --git a/arch/x86/kernel/cpu/perf_event.h 
b/arch/x86/kernel/cpu/perf_event.h
+index 53bd2726f4cd..82833ed3c1d2 100644
+--- a/arch/x86/kernel/cpu/perf_event.h
 b/arch/x86/kernel/cpu/perf_event.h
+@@ -430,6 +430,7 @@ struct x86_pmu {
+   pebs_active :1,
+   pebs_broken :1;
+   int pebs_record_size;
++  int pebs_buffer_size;
+   void(*drain_pebs)(struct pt_regs *regs);
+   struct event_constraint *pebs_constraints;
+   void(*pebs_aliases)(struct perf_event *event);
+@@ -687,6 +688,8 @@ void intel_pmu_lbr_init_atom(void);
+ 
+ void intel_pmu_lbr_init_snb(void);
+ 
++void 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-03-19 Thread Mike Pagano
commit: 7a6332fd8a40d691c130fd3f32d19fddb581c10b
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Mar 18 18:55:08 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Mar 18 18:55:08 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=7a6332fd

Linux patch 3.12.57

 _README  |4 +
 1056_linux-3.12.57.patch | 3229 ++
 2 files changed, 3233 insertions(+)

diff --git a/_README b/_README
index 3d5d7bf..5531cd4 100644
--- a/_README
+++ b/_README
@@ -266,6 +266,10 @@ Patch:  1055_linux-3.12.56.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.56
 
+Patch:  1056_linux-3.12.57.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.57
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1056_linux-3.12.57.patch b/1056_linux-3.12.57.patch
new file mode 100644
index 000..49c86a6
--- /dev/null
+++ b/1056_linux-3.12.57.patch
@@ -0,0 +1,3229 @@
+diff --git a/Documentation/filesystems/efivarfs.txt 
b/Documentation/filesystems/efivarfs.txt
+index c477af086e65..686a64bba775 100644
+--- a/Documentation/filesystems/efivarfs.txt
 b/Documentation/filesystems/efivarfs.txt
+@@ -14,3 +14,10 @@ filesystem.
+ efivarfs is typically mounted like this,
+ 
+   mount -t efivarfs none /sys/firmware/efi/efivars
++
++Due to the presence of numerous firmware bugs where removing non-standard
++UEFI variables causes the system firmware to fail to POST, efivarfs
++files that are not well-known standardized variables are created
++as immutable files.  This doesn't prevent removal - "chattr -i" will work -
++but it does prevent this kind of failure from being accomplished
++accidentally.
+diff --git a/Makefile b/Makefile
+index 34049410c565..af4cfc008e64 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 56
++SUBLEVEL = 57
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
+index 524841f02803..45c2cb00e180 100644
+--- a/arch/mips/kernel/traps.c
 b/arch/mips/kernel/traps.c
+@@ -681,15 +681,15 @@ static int simulate_sync(struct pt_regs *regs, unsigned 
int opcode)
+ asmlinkage void do_ov(struct pt_regs *regs)
+ {
+   enum ctx_state prev_state;
+-  siginfo_t info;
++  siginfo_t info = {
++  .si_signo = SIGFPE,
++  .si_code = FPE_INTOVF,
++  .si_addr = (void __user *)regs->cp0_epc,
++  };
+ 
+   prev_state = exception_enter();
+   die_if_kernel("Integer overflow", regs);
+ 
+-  info.si_code = FPE_INTOVF;
+-  info.si_signo = SIGFPE;
+-  info.si_errno = 0;
+-  info.si_addr = (void __user *) regs->cp0_epc;
+   force_sig_info(SIGFPE, , current);
+   exception_exit(prev_state);
+ }
+@@ -790,7 +790,7 @@ out:
+ static void do_trap_or_bp(struct pt_regs *regs, unsigned int code,
+   const char *str)
+ {
+-  siginfo_t info;
++  siginfo_t info = { 0 };
+   char b[40];
+ 
+ #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
+@@ -817,7 +817,6 @@ static void do_trap_or_bp(struct pt_regs *regs, unsigned 
int code,
+   else
+   info.si_code = FPE_INTOVF;
+   info.si_signo = SIGFPE;
+-  info.si_errno = 0;
+   info.si_addr = (void __user *) regs->cp0_epc;
+   force_sig_info(SIGFPE, , current);
+   break;
+diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
+index 6ee59a0eb268..48b4cf6b2a24 100644
+--- a/arch/powerpc/kernel/module_64.c
 b/arch/powerpc/kernel/module_64.c
+@@ -192,7 +192,7 @@ static void dedotify(Elf64_Sym *syms, unsigned int 
numsyms, char *strtab)
+   if (syms[i].st_shndx == SHN_UNDEF) {
+   char *name = strtab + syms[i].st_name;
+   if (name[0] == '.')
+-  memmove(name, name+1, strlen(name));
++  syms[i].st_name++;
+   }
+   }
+ }
+diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
+index 92a2e9333620..b74ac9c5710b 100644
+--- a/arch/x86/ia32/ia32entry.S
 b/arch/x86/ia32/ia32entry.S
+@@ -422,6 +422,7 @@ ENTRY(ia32_syscall)
+   /*CFI_REL_OFFSETcs,CS-RIP*/
+   CFI_REL_OFFSET  rip,RIP-RIP
+   PARAVIRT_ADJUST_EXCEPTION_FRAME
++  ASM_CLAC/* Do this early to minimize exposure */
+   SWAPGS
+   /*
+* No need to follow this irqs on/off section: the syscall
+diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
+index 33120100ff5e..06bd995071de 100644
+--- a/arch/x86/kernel/acpi/sleep.c
 b/arch/x86/kernel/acpi/sleep.c
+@@ -16,6 +16,7 @@
+ #include 
+ #include 
+ 
++#include 
+ #include "../../realmode/rm/wakeup.h"
+ #include "sleep.h"
+ 
+@@ -96,7 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-03-09 Thread Mike Pagano
commit: db757024a135f0fa6729f44fbb65df6be9985e64
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Mar  9 13:50:19 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Mar  9 13:50:19 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=db757024

Linux patch 3.12.56

 _README  |4 +
 1055_linux-3.12.56.patch | 4241 ++
 2 files changed, 4245 insertions(+)

diff --git a/_README b/_README
index 1c7c3c7..3d5d7bf 100644
--- a/_README
+++ b/_README
@@ -262,6 +262,10 @@ Patch:  1054_linux-3.12.55.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.55
 
+Patch:  1055_linux-3.12.56.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.56
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1055_linux-3.12.56.patch b/1055_linux-3.12.56.patch
new file mode 100644
index 000..840d33f
--- /dev/null
+++ b/1055_linux-3.12.56.patch
@@ -0,0 +1,4241 @@
+diff --git a/Documentation/networking/ip-sysctl.txt 
b/Documentation/networking/ip-sysctl.txt
+index 7d8dc93fe2eb..3e5b1b5466e5 100644
+--- a/Documentation/networking/ip-sysctl.txt
 b/Documentation/networking/ip-sysctl.txt
+@@ -1156,6 +1156,14 @@ accept_ra_defrtr - BOOLEAN
+   Functional default: enabled if accept_ra is enabled.
+   disabled if accept_ra is disabled.
+ 
++accept_ra_min_hop_limit - INTEGER
++  Minimum hop limit Information in Router Advertisement.
++
++  Hop limit Information in Router Advertisement less than this
++  variable shall be ignored.
++
++  Default: 1
++
+ accept_ra_pinfo - BOOLEAN
+   Learn Prefix Information in Router Advertisement.
+ 
+diff --git a/Makefile b/Makefile
+index 417164d9cd46..34049410c565 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 55
++SUBLEVEL = 56
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arm/boot/dts/wm8650.dtsi b/arch/arm/boot/dts/wm8650.dtsi
+index 7525982262ac..2897c1ac47d8 100644
+--- a/arch/arm/boot/dts/wm8650.dtsi
 b/arch/arm/boot/dts/wm8650.dtsi
+@@ -187,6 +187,15 @@
+   interrupts = <43>;
+   };
+ 
++  sdhc@d800a000 {
++  compatible = "wm,wm8505-sdhc";
++  reg = <0xd800a000 0x400>;
++  interrupts = <20>, <21>;
++  clocks = <>;
++  bus-width = <4>;
++  sdon-inverted;
++  };
++
+   fb: fb@d8050800 {
+   compatible = "wm,wm8505-fb";
+   reg = <0xd8050800 0x200>;
+diff --git a/arch/sparc/kernel/sys_sparc_64.c 
b/arch/sparc/kernel/sys_sparc_64.c
+index d188c591f2d6..608f9390396e 100644
+--- a/arch/sparc/kernel/sys_sparc_64.c
 b/arch/sparc/kernel/sys_sparc_64.c
+@@ -411,7 +411,7 @@ out:
+ 
+ SYSCALL_DEFINE1(sparc64_personality, unsigned long, personality)
+ {
+-  int ret;
++  long ret;
+ 
+   if (personality(current->personality) == PER_LINUX32 &&
+   personality(personality) == PER_LINUX)
+diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
+index 337518c5042a..b412c62486f0 100644
+--- a/arch/um/os-Linux/start_up.c
 b/arch/um/os-Linux/start_up.c
+@@ -95,6 +95,8 @@ static int start_ptraced_child(void)
+ {
+   int pid, n, status;
+ 
++  fflush(stdout);
++
+   pid = fork();
+   if (pid == 0)
+   ptrace_child();
+diff --git a/block/partitions/mac.c b/block/partitions/mac.c
+index 76d8ba6379a9..bd5b91465230 100644
+--- a/block/partitions/mac.c
 b/block/partitions/mac.c
+@@ -32,7 +32,7 @@ int mac_partition(struct parsed_partitions *state)
+   Sector sect;
+   unsigned char *data;
+   int slot, blocks_in_map;
+-  unsigned secsize;
++  unsigned secsize, datasize, partoffset;
+ #ifdef CONFIG_PPC_PMAC
+   int found_root = 0;
+   int found_root_goodness = 0;
+@@ -50,10 +50,14 @@ int mac_partition(struct parsed_partitions *state)
+   }
+   secsize = be16_to_cpu(md->block_size);
+   put_dev_sector(sect);
+-  data = read_part_sector(state, secsize/512, );
++  datasize = round_down(secsize, 512);
++  data = read_part_sector(state, datasize / 512, );
+   if (!data)
+   return -1;
+-  part = (struct mac_partition *) (data + secsize%512);
++  partoffset = secsize % 512;
++  if (partoffset + sizeof(*part) > datasize)
++  return -1;
++  part = (struct mac_partition *) (data + partoffset);
+   if (be16_to_cpu(part->signature) != MAC_PARTITION_MAGIC) {
+   put_dev_sector(sect);
+   return 0;   /* not a MacOS disk */
+diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
+index 136803c47cdb..96e5ed188636 100644

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-02-15 Thread Mike Pagano
commit: 488850749b4c4278a1faeeeca07f65803e067e75
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Feb 15 19:19:54 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Feb 15 19:19:54 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=48885074

Linux patch 3.12.54

 _README  |4 +
 1053_linux-3.12.54.patch | 2174 ++
 2 files changed, 2178 insertions(+)

diff --git a/_README b/_README
index 27b9211..54bac92 100644
--- a/_README
+++ b/_README
@@ -254,6 +254,10 @@ Patch:  1052_linux-3.12.53.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.53
 
+Patch:  1053_linux-3.12.54.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.54
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1053_linux-3.12.54.patch b/1053_linux-3.12.54.patch
new file mode 100644
index 000..4045383
--- /dev/null
+++ b/1053_linux-3.12.54.patch
@@ -0,0 +1,2174 @@
+diff --git a/Makefile b/Makefile
+index 3a572ff5b8e3..0d86c6da7d7e 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 53
++SUBLEVEL = 54
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arm/include/asm/ftrace.h b/arch/arm/include/asm/ftrace.h
+index f89515adac60..2bb8cac28b9e 100644
+--- a/arch/arm/include/asm/ftrace.h
 b/arch/arm/include/asm/ftrace.h
+@@ -45,7 +45,7 @@ void *return_address(unsigned int);
+ 
+ #else
+ 
+-extern inline void *return_address(unsigned int level)
++static inline void *return_address(unsigned int level)
+ {
+   return NULL;
+ }
+diff --git a/arch/arm/kernel/return_address.c 
b/arch/arm/kernel/return_address.c
+index fafedd86885d..98ea4b7eb406 100644
+--- a/arch/arm/kernel/return_address.c
 b/arch/arm/kernel/return_address.c
+@@ -59,15 +59,6 @@ void *return_address(unsigned int level)
+ 
+ #else /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) */
+ 
+-#if defined(CONFIG_ARM_UNWIND)
+-#warning "TODO: return_address should use unwind tables"
+-#endif
+-
+-void *return_address(unsigned int level)
+-{
+-  return NULL;
+-}
+-
+ #endif /* if defined(CONFIG_FRAME_POINTER) && !defined(CONFIG_ARM_UNWIND) / 
else */
+ 
+ EXPORT_SYMBOL_GPL(return_address);
+diff --git a/arch/arm64/include/asm/kvm_emulate.h 
b/arch/arm64/include/asm/kvm_emulate.h
+index 2b01e2bdb7ef..a79bcce9b66d 100644
+--- a/arch/arm64/include/asm/kvm_emulate.h
 b/arch/arm64/include/asm/kvm_emulate.h
+@@ -86,11 +86,13 @@ static inline void vcpu_set_thumb(struct kvm_vcpu *vcpu)
+   *vcpu_cpsr(vcpu) |= COMPAT_PSR_T_BIT;
+ }
+ 
++/*
++ * vcpu_reg should always be passed a register number coming from a
++ * read of ESR_EL2. Otherwise, it may give the wrong result on AArch32
++ * with banked registers.
++ */
+ static inline unsigned long *vcpu_reg(const struct kvm_vcpu *vcpu, u8 reg_num)
+ {
+-  if (vcpu_mode_is_32bit(vcpu))
+-  return vcpu_reg32(vcpu, reg_num);
+-
+   return (unsigned long *)_gp_regs(vcpu)->regs.regs[reg_num];
+ }
+ 
+diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
+index ee79a1a6e965..9b9d651446ba 100644
+--- a/arch/arm64/kernel/ptrace.c
 b/arch/arm64/kernel/ptrace.c
+@@ -51,6 +51,12 @@
+  */
+ void ptrace_disable(struct task_struct *child)
+ {
++  /*
++   * This would be better off in core code, but PTRACE_DETACH has
++   * grown its fair share of arch-specific worts and changing it
++   * is likely to cause regressions on obscure architectures.
++   */
++  user_disable_single_step(child);
+ }
+ 
+ #ifdef CONFIG_HAVE_HW_BREAKPOINT
+diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
+index 24bf1563c3bd..59411c933393 100644
+--- a/arch/arm64/kernel/setup.c
 b/arch/arm64/kernel/setup.c
+@@ -365,6 +365,10 @@ static int c_show(struct seq_file *m, void *v)
+   seq_printf(m, "processor\t: %d\n", i);
+ #endif
+ 
++  seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
++ loops_per_jiffy / (50UL/HZ),
++ loops_per_jiffy / (5000UL/HZ) % 100);
++
+   /*
+* Dump out the common processor features in a single line.
+* Userspace should read the hwcaps with getauxval(AT_HWCAP)
+diff --git a/arch/arm64/kvm/inject_fault.c b/arch/arm64/kvm/inject_fault.c
+index 86825f8883de..f527a37ac979 100644
+--- a/arch/arm64/kvm/inject_fault.c
 b/arch/arm64/kvm/inject_fault.c
+@@ -48,7 +48,7 @@ static void prepare_fault32(struct kvm_vcpu *vcpu, u32 mode, 
u32 vect_offset)
+ 
+   /* Note: These now point to the banked copies */
+   *vcpu_spsr(vcpu) = new_spsr_value;
+-  *vcpu_reg(vcpu, 14) = *vcpu_pc(vcpu) + return_offset;
++  *vcpu_reg32(vcpu, 14) = *vcpu_pc(vcpu) + return_offset;
+ 
+   /* Branch to exception vector */
+   if 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-01-31 Thread Mike Pagano
commit: a7ca0939dc7e39edf65eba8207bab7dafe56fa3b
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Jan 31 23:48:49 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Jan 31 23:48:49 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a7ca0939

Linux patch 3.12.53

 _README  |4 +
 1052_linux-3.12.53.patch | 1128 ++
 2 files changed, 1132 insertions(+)

diff --git a/_README b/_README
index 6e9c22c..d9d82c3 100644
--- a/_README
+++ b/_README
@@ -250,6 +250,10 @@ Patch:  1051_linux-3.12.52.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.52
 
+Patch:  1052_linux-3.12.53.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.53
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1052_linux-3.12.53.patch b/1052_linux-3.12.53.patch
new file mode 100644
index 000..3eefc18
--- /dev/null
+++ b/1052_linux-3.12.53.patch
@@ -0,0 +1,1128 @@
+diff --git a/MAINTAINERS b/MAINTAINERS
+index ffcaf975bed7..44881abcfb06 100644
+--- a/MAINTAINERS
 b/MAINTAINERS
+@@ -8151,6 +8151,7 @@ F:   include/linux/swiotlb.h
+ 
+ SYNOPSYS ARC ARCHITECTURE
+ M:Vineet Gupta 
++L:linux-snps-...@lists.infradead.org
+ S:Supported
+ F:arch/arc/
+ F:Documentation/devicetree/bindings/arc/
+diff --git a/Makefile b/Makefile
+index 0314ac5a52ca..3a572ff5b8e3 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 52
++SUBLEVEL = 53
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
+index 87bfe549ad3f..92273fa6804a 100644
+--- a/arch/blackfin/mach-common/pm.c
 b/arch/blackfin/mach-common/pm.c
+@@ -144,7 +144,7 @@ int bfin_pm_suspend_mem_enter(void)
+ 
+   unsigned char *memptr = kmalloc(L1_CODE_LENGTH + L1_DATA_A_LENGTH
++ L1_DATA_B_LENGTH + L1_SCRATCH_LENGTH,
+-GFP_KERNEL);
++GFP_ATOMIC);
+ 
+   if (memptr == NULL) {
+   panic("bf53x_suspend_l1_mem malloc failed");
+diff --git a/arch/m32r/include/asm/pgalloc.h b/arch/m32r/include/asm/pgalloc.h
+index 0fc736198979..ac4208bcc5ad 100644
+--- a/arch/m32r/include/asm/pgalloc.h
 b/arch/m32r/include/asm/pgalloc.h
+@@ -43,6 +43,8 @@ static __inline__ pgtable_t pte_alloc_one(struct mm_struct 
*mm,
+ {
+   struct page *pte = alloc_page(GFP_KERNEL|__GFP_ZERO);
+ 
++  if (!pte)
++  return NULL;
+   pgtable_page_ctor(pte);
+   return pte;
+ }
+diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S
+index ac85f16534af..4180f8b20374 100644
+--- a/arch/m68k/kernel/head.S
 b/arch/m68k/kernel/head.S
+@@ -2909,7 +2909,9 @@ func_start   serial_init,%d0/%d1/%a0/%a1
+ 
+ #if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B)
+   movel   %pc@(L(mac_sccbase)),%a0
+-  /* Reset SCC device */
++  /* Reset SCC register pointer */
++  moveb   %a0@(mac_scc_cha_a_ctrl_offset),%d0
++  /* Reset SCC device: write register pointer then register value */
+   moveb   #9,%a0@(mac_scc_cha_a_ctrl_offset)
+   moveb   #0xc0,%a0@(mac_scc_cha_a_ctrl_offset)
+   /* Wait for 5 PCLK cycles, which is about 68 CPU cycles */
+diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c
+index f0eef0491f77..97136b5e47e0 100644
+--- a/arch/m68k/mm/fault.c
 b/arch/m68k/mm/fault.c
+@@ -77,8 +77,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long 
address,
+ 
+ #ifdef DEBUG
+   printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, 
%ld, %p\n",
+-  regs->sr, regs->pc, address, error_code,
+-  current->mm->pgd);
++  regs->sr, regs->pc, address, error_code, mm ? mm->pgd : NULL);
+ #endif
+ 
+   /*
+diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
+index 211974a386d6..ed6e0be80b3b 100644
+--- a/arch/powerpc/kvm/book3s_hv.c
 b/arch/powerpc/kvm/book3s_hv.c
+@@ -160,6 +160,12 @@ void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu)
+ 
+ void kvmppc_set_msr(struct kvm_vcpu *vcpu, u64 msr)
+ {
++  /*
++   * Check for illegal transactional state bit combination
++   * and if we find it, force the TS field to a safe state.
++   */
++  if ((msr & MSR_TS_MASK) == MSR_TS_MASK)
++  msr &= ~MSR_TS_MASK;
+   vcpu->arch.shregs.msr = msr;
+   kvmppc_end_cede(vcpu);
+ }
+diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h
+index 4fa687a47a62..6b8d6e8cd449 100644
+--- a/arch/x86/include/asm/boot.h
 b/arch/x86/include/asm/boot.h
+@@ -27,7 +27,7 @@
+ #define BOOT_HEAP_SIZE 0x40
+ #else /* !CONFIG_KERNEL_BZIP2 */
+ 
+-#define BOOT_HEAP_SIZE0x8000
++#define 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-01-31 Thread Mike Pagano
commit: 60819cada78a66ee028324352356aeec36d11420
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Jan 31 23:49:34 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Jan 31 23:49:34 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=60819cad

Remove redundant patch

 ...ing-refleak-in-join-session-CVE-2016-0728.patch | 81 --
 1 file changed, 81 deletions(-)

diff --git a/1520_keyring-refleak-in-join-session-CVE-2016-0728.patch 
b/1520_keyring-refleak-in-join-session-CVE-2016-0728.patch
deleted file mode 100644
index 49020d7..000
--- a/1520_keyring-refleak-in-join-session-CVE-2016-0728.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 23567fd052a9abb6d67fe8e7a9ccdd9800a540f2 Mon Sep 17 00:00:00 2001
-From: Yevgeny Pats 
-Date: Tue, 19 Jan 2016 22:09:04 +
-Subject: KEYS: Fix keyring ref leak in join_session_keyring()
-
-This fixes CVE-2016-0728.
-
-If a thread is asked to join as a session keyring the keyring that's already
-set as its session, we leak a keyring reference.
-
-This can be tested with the following program:
-
-   #include 
-   #include 
-   #include 
-   #include 
-
-   int main(int argc, const char *argv[])
-   {
-   int i = 0;
-   key_serial_t serial;
-
-   serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
-   "leaked-keyring");
-   if (serial < 0) {
-   perror("keyctl");
-   return -1;
-   }
-
-   if (keyctl(KEYCTL_SETPERM, serial,
-  KEY_POS_ALL | KEY_USR_ALL) < 0) {
-   perror("keyctl");
-   return -1;
-   }
-
-   for (i = 0; i < 100; i++) {
-   serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
-   "leaked-keyring");
-   if (serial < 0) {
-   perror("keyctl");
-   return -1;
-   }
-   }
-
-   return 0;
-   }
-
-If, after the program has run, there something like the following line in
-/proc/keys:
-
-3f3d898f I--Q---   100 perm 3f3f 0 0 keyring   leaked-keyring: 
empty
-
-with a usage count of 100 * the number of times the program has been run,
-then the kernel is malfunctioning.  If leaked-keyring has zero usages or
-has been garbage collected, then the problem is fixed.
-
-Reported-by: Yevgeny Pats 
-Signed-off-by: David Howells 
-Acked-by: Don Zickus 
-Acked-by: Prarit Bhargava 
-Acked-by: Jarod Wilson 
-Signed-off-by: James Morris 

- security/keys/process_keys.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
-index a3f85d2..e6d50172 100644
 a/security/keys/process_keys.c
-+++ b/security/keys/process_keys.c
-@@ -794,6 +794,7 @@ long join_session_keyring(const char *name)
-   ret = PTR_ERR(keyring);
-   goto error2;
-   } else if (keyring == new->session_keyring) {
-+  key_put(keyring);
-   ret = 0;
-   goto error2;
-   }
--- 
-cgit v0.12
-



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-01-31 Thread Mike Pagano
commit: 0fe184eaa2e6c7e91bd9ac86b5028e9411076a5e
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Jan 31 23:57:40 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Jan 31 23:57:40 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=0fe184ea

Update README

 _README | 4 
 1 file changed, 4 deletions(-)

diff --git a/_README b/_README
index d9d82c3..27b9211 100644
--- a/_README
+++ b/_README
@@ -266,10 +266,6 @@ Patch:  
1510_fs-enable-link-security-restrictions-by-default.patch
 From:   
http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/
 Desc:   Enable link security restrictions by default
 
-Patch:  1520_keyring-refleak-in-join-session-CVE-2016-0728.patch
-From:   https://bugs.gentoo.org/show_bug.cgi?id=572384
-Desc:   Ensure that thread joining a session keyring does not leak the keyring 
reference. CVE-2016-0728.
-
 Patch:  1700_enable-thinkpad-micled.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=449248
 Desc:   Enable mic mute led in thinkpads



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2016-01-20 Thread Mike Pagano
commit: ab8d660372ad1059778497f6efdc0e816d96a50e
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Jan 20 15:53:19 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Jan 20 15:53:19 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ab8d6603

Ensure that thread joining a session keyring does not leak the keyring 
reference. CVE-2016-0728.

 _README|  4 ++
 ...ing-refleak-in-join-session-CVE-2016-0728.patch | 81 ++
 2 files changed, 85 insertions(+)

diff --git a/_README b/_README
index bbbcfce..6e9c22c 100644
--- a/_README
+++ b/_README
@@ -262,6 +262,10 @@ Patch:  
1510_fs-enable-link-security-restrictions-by-default.patch
 From:   
http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/
 Desc:   Enable link security restrictions by default
 
+Patch:  1520_keyring-refleak-in-join-session-CVE-2016-0728.patch
+From:   https://bugs.gentoo.org/show_bug.cgi?id=572384
+Desc:   Ensure that thread joining a session keyring does not leak the keyring 
reference. CVE-2016-0728.
+
 Patch:  1700_enable-thinkpad-micled.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=449248
 Desc:   Enable mic mute led in thinkpads

diff --git a/1520_keyring-refleak-in-join-session-CVE-2016-0728.patch 
b/1520_keyring-refleak-in-join-session-CVE-2016-0728.patch
new file mode 100644
index 000..49020d7
--- /dev/null
+++ b/1520_keyring-refleak-in-join-session-CVE-2016-0728.patch
@@ -0,0 +1,81 @@
+From 23567fd052a9abb6d67fe8e7a9ccdd9800a540f2 Mon Sep 17 00:00:00 2001
+From: Yevgeny Pats 
+Date: Tue, 19 Jan 2016 22:09:04 +
+Subject: KEYS: Fix keyring ref leak in join_session_keyring()
+
+This fixes CVE-2016-0728.
+
+If a thread is asked to join as a session keyring the keyring that's already
+set as its session, we leak a keyring reference.
+
+This can be tested with the following program:
+
+   #include 
+   #include 
+   #include 
+   #include 
+
+   int main(int argc, const char *argv[])
+   {
+   int i = 0;
+   key_serial_t serial;
+
+   serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
+   "leaked-keyring");
+   if (serial < 0) {
+   perror("keyctl");
+   return -1;
+   }
+
+   if (keyctl(KEYCTL_SETPERM, serial,
+  KEY_POS_ALL | KEY_USR_ALL) < 0) {
+   perror("keyctl");
+   return -1;
+   }
+
+   for (i = 0; i < 100; i++) {
+   serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
+   "leaked-keyring");
+   if (serial < 0) {
+   perror("keyctl");
+   return -1;
+   }
+   }
+
+   return 0;
+   }
+
+If, after the program has run, there something like the following line in
+/proc/keys:
+
+3f3d898f I--Q---   100 perm 3f3f 0 0 keyring   leaked-keyring: 
empty
+
+with a usage count of 100 * the number of times the program has been run,
+then the kernel is malfunctioning.  If leaked-keyring has zero usages or
+has been garbage collected, then the problem is fixed.
+
+Reported-by: Yevgeny Pats 
+Signed-off-by: David Howells 
+Acked-by: Don Zickus 
+Acked-by: Prarit Bhargava 
+Acked-by: Jarod Wilson 
+Signed-off-by: James Morris 
+---
+ security/keys/process_keys.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/security/keys/process_keys.c b/security/keys/process_keys.c
+index a3f85d2..e6d50172 100644
+--- a/security/keys/process_keys.c
 b/security/keys/process_keys.c
+@@ -794,6 +794,7 @@ long join_session_keyring(const char *name)
+   ret = PTR_ERR(keyring);
+   goto error2;
+   } else if (keyring == new->session_keyring) {
++  key_put(keyring);
+   ret = 0;
+   goto error2;
+   }
+-- 
+cgit v0.12
+



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2015-10-22 Thread Mike Pagano
commit: 1f1599b9c061aa845dfbaaadf32ea05bbe4ba493
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Oct 22 23:08:05 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Oct 22 23:08:05 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1f1599b9

Update README

 _README | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/_README b/_README
index 5930bec..e565511 100644
--- a/_README
+++ b/_README
@@ -228,7 +228,15 @@ Desc:   Linux 3.12.46
 
 Patch:  1046_linux-3.12.47.patch
 From:   http://www.kernel.org
-Desc:   Linux 3.12.4
+Desc:   Linux 3.12.47
+
+Patch:  1047_linux-3.12.48.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.48
+
+Patch:  1048_linux-3.12.49.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.49
 
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2015-10-22 Thread Mike Pagano
commit: 332e735eb1f56098e3ccdcca5f6502d114d98c60
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Oct 22 23:00:30 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Oct 22 23:00:30 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=332e735e

Linux patch 3.12.49

 1048_linux-3.12.49.patch | 3673 ++
 1 file changed, 3673 insertions(+)

diff --git a/1048_linux-3.12.49.patch b/1048_linux-3.12.49.patch
new file mode 100644
index 000..30795f1
--- /dev/null
+++ b/1048_linux-3.12.49.patch
@@ -0,0 +1,3673 @@
+diff --git a/Makefile b/Makefile
+index a01f2573731d..b2985713121c 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 48
++SUBLEVEL = 49
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arm/mach-omap2/clockdomains7xx_data.c 
b/arch/arm/mach-omap2/clockdomains7xx_data.c
+index 57d5df0c1fbd..7581e036bda6 100644
+--- a/arch/arm/mach-omap2/clockdomains7xx_data.c
 b/arch/arm/mach-omap2/clockdomains7xx_data.c
+@@ -331,7 +331,7 @@ static struct clockdomain l4per2_7xx_clkdm = {
+   .dep_bit  = DRA7XX_L4PER2_STATDEP_SHIFT,
+   .wkdep_srcs   = l4per2_wkup_sleep_deps,
+   .sleepdep_srcs= l4per2_wkup_sleep_deps,
+-  .flags= CLKDM_CAN_HWSUP_SWSUP,
++  .flags= CLKDM_CAN_SWSUP,
+ };
+ 
+ static struct clockdomain mpu0_7xx_clkdm = {
+diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
+index fe70eaea0e28..c6ab435557b2 100644
+--- a/arch/arm64/Kconfig
 b/arch/arm64/Kconfig
+@@ -56,6 +56,10 @@ config NO_IOPORT
+ config STACKTRACE_SUPPORT
+   def_bool y
+ 
++config ILLEGAL_POINTER_VALUE
++  hex
++  default 0xdead
++
+ config LOCKDEP_SUPPORT
+   def_bool y
+ 
+@@ -265,6 +269,22 @@ config SYSVIPC_COMPAT
+   def_bool y
+   depends on COMPAT && SYSVIPC
+ 
++config ARM64_ERRATUM_843419
++  bool "Cortex-A53: 843419: A load or store might access an incorrect 
address"
++  depends on MODULES
++  default y
++  help
++This option builds kernel modules using the large memory model in
++order to avoid the use of the ADRP instruction, which can cause
++a subsequent memory access to use an incorrect address on Cortex-A53
++parts up to r0p4.
++
++Note that the kernel itself must be linked with a version of ld
++which fixes potentially affected ADRP instructions through the
++use of veneers.
++
++If unsure, say Y.
++
+ endmenu
+ 
+ source "net/Kconfig"
+diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
+index d90cf79f233a..4148c05df99a 100644
+--- a/arch/arm64/Makefile
 b/arch/arm64/Makefile
+@@ -28,6 +28,10 @@ comma = ,
+ 
+ CHECKFLAGS+= -D__aarch64__
+ 
++ifeq ($(CONFIG_ARM64_ERRATUM_843419), y)
++CFLAGS_MODULE += -mcmodel=large
++endif
++
+ # Default value
+ head-y:= arch/arm64/kernel/head.o
+ 
+diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
+index 7090c126797c..aca41b06dc7a 100644
+--- a/arch/arm64/kernel/head.S
 b/arch/arm64/kernel/head.S
+@@ -192,6 +192,11 @@ ENTRY(el2_setup)
+   msr hstr_el2, xzr   // Disable CP15 traps to EL2
+ #endif
+ 
++  /* EL2 debug */
++  mrs x0, pmcr_el0// Disable debug access traps
++  ubfxx0, x0, #11, #5 // to EL2 and allow access to
++  msr mdcr_el2, x0// all PMU counters from EL1
++
+   /* Stage-2 translation */
+   msr vttbr_el2, xzr
+ 
+diff --git a/arch/arm64/kernel/module.c b/arch/arm64/kernel/module.c
+index ca0e3d55da99..9589a92f6332 100644
+--- a/arch/arm64/kernel/module.c
 b/arch/arm64/kernel/module.c
+@@ -390,12 +390,14 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
+   ovf = reloc_insn_imm(RELOC_OP_PREL, loc, val, 0, 21,
+INSN_IMM_ADR);
+   break;
++#ifndef CONFIG_ARM64_ERRATUM_843419
+   case R_AARCH64_ADR_PREL_PG_HI21_NC:
+   overflow_check = false;
+   case R_AARCH64_ADR_PREL_PG_HI21:
+   ovf = reloc_insn_imm(RELOC_OP_PAGE, loc, val, 12, 21,
+INSN_IMM_ADR);
+   break;
++#endif
+   case R_AARCH64_ADD_ABS_LO12_NC:
+   case R_AARCH64_LDST8_ABS_LO12_NC:
+   overflow_check = false;
+diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c
+index b9564b8d6bab..1e60acc6a4d7 100644
+--- a/arch/arm64/kernel/signal32.c
 b/arch/arm64/kernel/signal32.c
+@@ -231,14 +231,32 @@ int copy_siginfo_from_user32(siginfo_t *to, 
compat_siginfo_t __user *from)
+ 
+ /*
+  * VFP save/restore code.
++ *
++ * We have to be careful with endianness, since the fpsimd context-switch
++ * code operates on 128-bit (Q) register 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2015-09-28 Thread Mike Pagano
commit: 0cf9a96e20f1df4bba833a1d18501d54a897acdf
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Sep 28 14:09:52 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Sep 28 14:09:52 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=0cf9a96e

Linux patch 3.12.48

 1047_linux-3.12.48.patch | 1502 ++
 1 file changed, 1502 insertions(+)

diff --git a/1047_linux-3.12.48.patch b/1047_linux-3.12.48.patch
new file mode 100644
index 000..c0f1bf4
--- /dev/null
+++ b/1047_linux-3.12.48.patch
@@ -0,0 +1,1502 @@
+diff --git a/Makefile b/Makefile
+index c45298b8b2d5..a01f2573731d 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 47
++SUBLEVEL = 48
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/drivers/block/mtip32xx/mtip32xx.c 
b/drivers/block/mtip32xx/mtip32xx.c
+index 560227b817fe..01c7270b5e84 100644
+--- a/drivers/block/mtip32xx/mtip32xx.c
 b/drivers/block/mtip32xx/mtip32xx.c
+@@ -2810,34 +2810,51 @@ static ssize_t show_device_status(struct device_driver 
*drv, char *buf)
+ static ssize_t mtip_hw_read_device_status(struct file *f, char __user *ubuf,
+   size_t len, loff_t *offset)
+ {
++  struct driver_data *dd =  (struct driver_data *)f->private_data;
+   int size = *offset;
+-  char buf[MTIP_DFS_MAX_BUF_SIZE];
++  char *buf;
++  int rv = 0;
+ 
+   if (!len || *offset)
+   return 0;
+ 
++  buf = kzalloc(MTIP_DFS_MAX_BUF_SIZE, GFP_KERNEL);
++  if (!buf) {
++  dev_err(>pdev->dev,
++  "Memory allocation: status buffer\n");
++  return -ENOMEM;
++  }
++
+   size += show_device_status(NULL, buf);
+ 
+   *offset = size <= len ? size : len;
+   size = copy_to_user(ubuf, buf, *offset);
+   if (size)
+-  return -EFAULT;
++  rv = -EFAULT;
+ 
+-  return *offset;
++  kfree(buf);
++  return rv ? rv : *offset;
+ }
+ 
+ static ssize_t mtip_hw_read_registers(struct file *f, char __user *ubuf,
+ size_t len, loff_t *offset)
+ {
+   struct driver_data *dd =  (struct driver_data *)f->private_data;
+-  char buf[MTIP_DFS_MAX_BUF_SIZE];
++  char *buf;
+   u32 group_allocated;
+   int size = *offset;
+-  int n;
++  int n, rv = 0;
+ 
+   if (!len || size)
+   return 0;
+ 
++  buf = kzalloc(MTIP_DFS_MAX_BUF_SIZE, GFP_KERNEL);
++  if (!buf) {
++  dev_err(>pdev->dev,
++  "Memory allocation: register buffer\n");
++  return -ENOMEM;
++  }
++
+   size += sprintf([size], "H/ S ACTive  : [ 0x");
+ 
+   for (n = dd->slot_groups-1; n >= 0; n--)
+@@ -2892,21 +2909,30 @@ static ssize_t mtip_hw_read_registers(struct file *f, 
char __user *ubuf,
+   *offset = size <= len ? size : len;
+   size = copy_to_user(ubuf, buf, *offset);
+   if (size)
+-  return -EFAULT;
++  rv = -EFAULT;
+ 
+-  return *offset;
++  kfree(buf);
++  return rv ? rv : *offset;
+ }
+ 
+ static ssize_t mtip_hw_read_flags(struct file *f, char __user *ubuf,
+ size_t len, loff_t *offset)
+ {
+   struct driver_data *dd =  (struct driver_data *)f->private_data;
+-  char buf[MTIP_DFS_MAX_BUF_SIZE];
++  char *buf;
+   int size = *offset;
++  int rv = 0;
+ 
+   if (!len || size)
+   return 0;
+ 
++  buf = kzalloc(MTIP_DFS_MAX_BUF_SIZE, GFP_KERNEL);
++  if (!buf) {
++  dev_err(>pdev->dev,
++  "Memory allocation: flag buffer\n");
++  return -ENOMEM;
++  }
++
+   size += sprintf([size], "Flag-port : [ %08lX ]\n",
+   dd->port->flags);
+   size += sprintf([size], "Flag-dd   : [ %08lX ]\n",
+@@ -2915,9 +2941,10 @@ static ssize_t mtip_hw_read_flags(struct file *f, char 
__user *ubuf,
+   *offset = size <= len ? size : len;
+   size = copy_to_user(ubuf, buf, *offset);
+   if (size)
+-  return -EFAULT;
++  rv = -EFAULT;
+ 
+-  return *offset;
++  kfree(buf);
++  return rv ? rv : *offset;
+ }
+ 
+ static const struct file_operations mtip_device_status_fops = {
+diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c 
b/drivers/gpu/drm/radeon/radeon_irq_kms.c
+index 4a2d91536a8d..c843cf0aa623 100644
+--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
 b/drivers/gpu/drm/radeon/radeon_irq_kms.c
+@@ -73,6 +73,11 @@ static void radeon_hotplug_work_func(struct work_struct 
*work)
+   struct drm_mode_config *mode_config = >mode_config;
+   struct drm_connector *connector;
+ 
++  /* we can race here at startup, some boards seem to trigger
++   * hotplug irqs when they shouldn't. */
++  if 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2015-06-19 Thread Mike Pagano
commit: a7f4533fcfbb312026bec480f15e94908c64f830
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Fri Jun 19 16:42:53 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Fri Jun 19 16:42:53 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=a7f4533f

Linux patch 3.12.44

 _README  |4 +
 1043_linux-3.12.44.patch | 3585 ++
 2 files changed, 3589 insertions(+)

diff --git a/_README b/_README
index fdf9c8c..c9dc433 100644
--- a/_README
+++ b/_README
@@ -214,6 +214,10 @@ Patch:  1042_linux-3.12.43.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.43
 
+Patch:  1043_linux-3.12.44.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.44
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1043_linux-3.12.44.patch b/1043_linux-3.12.44.patch
new file mode 100644
index 000..4ff4c57
--- /dev/null
+++ b/1043_linux-3.12.44.patch
@@ -0,0 +1,3585 @@
+diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp
+index 4dfdc8f83633..254d2f55345a 100644
+--- a/Documentation/hwmon/k10temp
 b/Documentation/hwmon/k10temp
+@@ -11,8 +11,8 @@ Supported chips:
+   Socket S1G2: Athlon (X2), Sempron (X2), Turion X2 (Ultra)
+ * AMD Family 12h processors: Llano (E2/A4/A6/A8-Series)
+ * AMD Family 14h processors: Brazos (C/E/G/Z-Series)
+-* AMD Family 15h processors: Bulldozer (FX-Series), Trinity
+-* AMD Family 16h processors: Kabini
++* AMD Family 15h processors: Bulldozer (FX-Series), Trinity, Kaveri, 
Carrizo
++* AMD Family 16h processors: Kabini, Mullins
+ 
+   Prefix: 'k10temp'
+   Addresses scanned: PCI space
+@@ -46,7 +46,7 @@ Description
+ ---
+ 
+ This driver permits reading of the internal temperature sensor of AMD
+-Family 10h/11h/12h/14h/15h processors.
++Family 10h/11h/12h/14h/15h/16h processors.
+ 
+ All these processors have a sensor, but on those for Socket F or AM2+,
+ the sensor may return inconsistent values (erratum 319).  The driver
+diff --git a/Makefile b/Makefile
+index baf73c808c04..1ea43665224f 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 43
++SUBLEVEL = 44
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+@@ -241,7 +241,7 @@ CONFIG_SHELL := $(shell if [ -x $$BASH ]; then echo 
$$BASH; \
+ 
+ HOSTCC   = gcc
+ HOSTCXX  = g++
+-HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 
-fomit-frame-pointer
++HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 
-fomit-frame-pointer -std=gnu89
+ HOSTCXXFLAGS = -O2
+ 
+ # Decide whether to build built-in, modular, or both.
+@@ -373,7 +373,9 @@ KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes 
-Wno-trigraphs \
+  -fno-strict-aliasing -fno-common \
+  -Werror-implicit-function-declaration \
+  -Wno-format-security \
+- -fno-delete-null-pointer-checks
++ -fno-delete-null-pointer-checks \
++ -std=gnu89
++
+ KBUILD_AFLAGS_KERNEL :=
+ KBUILD_CFLAGS_KERNEL :=
+ KBUILD_AFLAGS   := -D__ASSEMBLY__
+diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
+index c07aea4f66cb..157e19066449 100644
+--- a/arch/arm/boot/dts/imx27.dtsi
 b/arch/arm/boot/dts/imx27.dtsi
+@@ -427,7 +427,7 @@
+ 
+   fec: ethernet@1002b000 {
+   compatible = fsl,imx27-fec;
+-  reg = 0x1002b000 0x4000;
++  reg = 0x1002b000 0x1000;
+   interrupts = 50;
+   clocks = clks 48, clks 67;
+   clock-names = ipg, ahb;
+diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
+index bc6bd9683ba4..c70b4e195d2e 100644
+--- a/arch/arm/kernel/entry-common.S
 b/arch/arm/kernel/entry-common.S
+@@ -32,7 +32,9 @@ ret_fast_syscall:
+  UNWIND(.fnstart  )
+  UNWIND(.cantunwind   )
+   disable_irq @ disable interrupts
+-  ldr r1, [tsk, #TI_FLAGS]
++  ldr r1, [tsk, #TI_FLAGS]@ re-check for syscall tracing
++  tst r1, #_TIF_SYSCALL_WORK
++  bne __sys_trace_return
+   tst r1, #_TIF_WORK_MASK
+   bne fast_work_pending
+   asm_trace_hardirqs_on
+diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
+index 6c4c882c126e..f32a8817cc79 100644
+--- a/arch/m68k/mac/oss.c
 b/arch/m68k/mac/oss.c
+@@ -48,9 +48,8 @@ void __init oss_init(void)
+   /* Disable all interrupts. Unlike a VIA it looks like we*/
+   /* do this by setting the source's interrupt level to zero. */
+ 
+-  for (i = 0; i = OSS_NUM_SOURCES; i++) {
++  for (i = 0; i  OSS_NUM_SOURCES; i++)
+   oss-irq_level[i] = 0;
+-  }
+ }
+ 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2015-03-28 Thread Mike Pagano
commit: e6643e7cd1581bf5a5d697a21d4fde4c782c4585
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Sat Mar 28 20:29:32 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Sat Mar 28 20:29:32 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=e6643e7c

Add check to saved_root_name for supported filesystem path naming.

 2900_dev-root-proc-mount-fix.patch | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/2900_dev-root-proc-mount-fix.patch 
b/2900_dev-root-proc-mount-fix.patch
index 4c89adf..6bc41c8 100644
--- a/2900_dev-root-proc-mount-fix.patch
+++ b/2900_dev-root-proc-mount-fix.patch
@@ -1,6 +1,6 @@
 a/init/do_mounts.c 2013-01-25 19:11:11.609802424 -0500
-+++ b/init/do_mounts.c 2013-01-25 19:14:20.606053568 -0500
-@@ -461,7 +461,10 @@ void __init change_floppy(char *fmt, ...
+--- a/init/do_mounts.c 2015-03-28 16:28:01.898826746 -0400
 b/init/do_mounts.c 2015-03-28 16:29:08.514826111 -0400
+@@ -482,7 +482,10 @@ void __init change_floppy(char *fmt, ...
va_start(args, fmt);
vsprintf(buf, fmt, args);
va_end(args);
@@ -12,12 +12,12 @@
if (fd = 0) {
sys_ioctl(fd, FDEJECT, 0);
sys_close(fd);
-@@ -505,7 +508,13 @@ void __init mount_root(void)
+@@ -526,7 +529,13 @@ void __init mount_root(void)
  #endif
  #ifdef CONFIG_BLOCK
create_dev(/dev/root, ROOT_DEV);
 -  mount_block_root(/dev/root, root_mountflags);
-+  if (saved_root_name[0]) {
++  if (saved_root_name[0] == '/') {
 +  create_dev(saved_root_name, ROOT_DEV);
 +  mount_block_root(saved_root_name, root_mountflags);
 +  } else {



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2015-02-20 Thread Mike Pagano
commit: fbf84540a233182292abbe51e05dddebe95c79bc
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Fri Feb 20 23:57:35 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Fri Feb 20 23:57:35 2015 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=fbf84540

Linux patch 3.12.38

---
 _README  |4 +
 1037_linux-3.12.38.patch | 4295 ++
 2 files changed, 4299 insertions(+)

diff --git a/_README b/_README
index edcb42a..12b4245 100644
--- a/_README
+++ b/_README
@@ -190,6 +190,10 @@ Patch:  1036_linux-3.12.37.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.37
 
+Patch:  1037_linux-3.12.38.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.38
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1037_linux-3.12.38.patch b/1037_linux-3.12.38.patch
new file mode 100644
index 000..97d0b11
--- /dev/null
+++ b/1037_linux-3.12.38.patch
@@ -0,0 +1,4295 @@
+diff --git a/Makefile b/Makefile
+index e3c56b405ffe..0cd1625c4fae 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 37
++SUBLEVEL = 38
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
+index a2d0f91c5bd7..79cff8fdbaf3 100644
+--- a/arch/arm/mm/dma-mapping.c
 b/arch/arm/mm/dma-mapping.c
+@@ -429,12 +429,21 @@ void __init dma_contiguous_remap(void)
+   map.type = MT_MEMORY_DMA_READY;
+ 
+   /*
+-   * Clear previous low-memory mapping
++   * Clear previous low-memory mapping to ensure that the
++   * TLB does not see any conflicting entries, then flush
++   * the TLB of the old entries before creating new mappings.
++   *
++   * This ensures that any speculatively loaded TLB entries
++   * (even though they may be rare) can not cause any problems,
++   * and ensures that this code is architecturally compliant.
+*/
+   for (addr = __phys_to_virt(start); addr  __phys_to_virt(end);
+addr += PMD_SIZE)
+   pmd_clear(pmd_off_k(addr));
+ 
++  flush_tlb_kernel_range(__phys_to_virt(start),
++ __phys_to_virt(end));
++
+   iotable_init(map, 1);
+   }
+ }
+diff --git a/arch/arm64/include/asm/cputype.h 
b/arch/arm64/include/asm/cputype.h
+index 5fe138e0b828..cfcf04d22fd2 100644
+--- a/arch/arm64/include/asm/cputype.h
 b/arch/arm64/include/asm/cputype.h
+@@ -77,6 +77,8 @@ static inline u32 __attribute_const__ 
read_cpuid_cachetype(void)
+   return read_cpuid(ID_CTR_EL0);
+ }
+ 
++void cpuinfo_store_cpu(void);
++
+ #endif /* __ASSEMBLY__ */
+ 
+ #endif
+diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
+index 055cfb80e05c..24bf1563c3bd 100644
+--- a/arch/arm64/kernel/setup.c
 b/arch/arm64/kernel/setup.c
+@@ -41,6 +41,7 @@
+ #include linux/memblock.h
+ #include linux/of_fdt.h
+ #include linux/of_platform.h
++#include linux/personality.h
+ 
+ #include asm/cputype.h
+ #include asm/elf.h
+@@ -97,6 +98,19 @@ void __init early_print(const char *str, ...)
+   printk(%s, buf);
+ }
+ 
++struct cpuinfo_arm64 {
++  struct cpu  cpu;
++  u32 reg_midr;
++};
++
++static DEFINE_PER_CPU(struct cpuinfo_arm64, cpu_data);
++
++void cpuinfo_store_cpu(void)
++{
++  struct cpuinfo_arm64 *info = this_cpu_ptr(cpu_data);
++  info-reg_midr = read_cpuid_id();
++}
++
+ static void __init setup_processor(void)
+ {
+   struct cpu_info *cpu_info;
+@@ -127,6 +141,8 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
+   struct boot_param_header *devtree;
+   unsigned long dt_root;
+ 
++  cpuinfo_store_cpu();
++
+   /* Check we have a non-NULL DT pointer */
+   if (!dt_phys) {
+   early_print(\n
+@@ -285,14 +301,12 @@ static int __init arm64_device_init(void)
+ }
+ arch_initcall(arm64_device_init);
+ 
+-static DEFINE_PER_CPU(struct cpu, cpu_data);
+-
+ static int __init topology_init(void)
+ {
+   int i;
+ 
+   for_each_possible_cpu(i) {
+-  struct cpu *cpu = per_cpu(cpu_data, i);
++  struct cpu *cpu = per_cpu(cpu_data.cpu, i);
+   cpu-hotpluggable = 1;
+   register_cpu(cpu, i);
+   }
+@@ -307,14 +321,41 @@ static const char *hwcap_str[] = {
+   NULL
+ };
+ 
++#ifdef CONFIG_COMPAT
++static const char *compat_hwcap_str[] = {
++  swp,
++  half,
++  thumb,
++  26bit,
++  fastmult,
++  fpa,
++  vfp,
++  edsp,
++  java,
++  iwmmxt,
++  crunch,
++  thumbee,
++  neon,
++  vfpv3,
++  vfpv3d16,
++  tls,
++  vfpv4,
++  idiva,
++  

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2015-02-14 Thread Mike Pagano
commit: 9bf001bda2bc69562e36c6568c98e3277806b453
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Sat Feb 14 22:59:45 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Sat Feb 14 22:59:45 2015 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=9bf001bd

Enable link security restrictions by default

---
 _README|  5 +
 ...ble-link-security-restrictions-by-default.patch | 22 ++
 2 files changed, 27 insertions(+)

diff --git a/_README b/_README
index 10a0b1b..edcb42a 100644
--- a/_README
+++ b/_README
@@ -198,6 +198,10 @@ Patch:  
1500_selinux-add-SOCK_DIAG_BY_FAMILY-to-the-list-of-netli.patch
 From:   
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6a96e15096da6e7491107321cfa660c7c2aa119d
 Desc:   selinux: add SOCK_DIAG_BY_FAMILY to the list of netlink message types
 
+Patch:  1510_fs-enable-link-security-restrictions-by-default.patch
+From:   
http://sources.debian.net/src/linux/3.16.7-ckt4-3/debian/patches/debian/fs-enable-link-security-restrictions-by-default.patch/
+Desc:   Enable link security restrictions by default
+
 Patch:  1700_enable-thinkpad-micled.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=449248
 Desc:   Enable mic mute led in thinkpads
@@ -249,3 +253,4 @@ Desc:   BFQ v6r2 patch 3 for 3.10: Early Queue Merge (EQM)
 Patch:  5000_BFQ-4-block-Switch-from-BFQ-v6r2-for-3.11.0-to-BFQ-v6r2-fo.patch
 From:   http://algo.ing.unimo.it/people/paolo/disk_sched/
 Desc:   BFQ v6r2 for 3.11.0 to BFQ v6r2 for 3.12.0.
+

diff --git a/1510_fs-enable-link-security-restrictions-by-default.patch 
b/1510_fs-enable-link-security-restrictions-by-default.patch
new file mode 100644
index 000..639fb3c
--- /dev/null
+++ b/1510_fs-enable-link-security-restrictions-by-default.patch
@@ -0,0 +1,22 @@
+From: Ben Hutchings b...@decadent.org.uk
+Subject: fs: Enable link security restrictions by default
+Date: Fri, 02 Nov 2012 05:32:06 +
+Bug-Debian: https://bugs.debian.org/609455
+Forwarded: not-needed
+
+This reverts commit 561ec64ae67ef25cac8d72bb9c4bfc955edfd415
+('VFS: don't do protected {sym,hard}links by default').
+
+--- a/fs/namei.c
 b/fs/namei.c
+@@ -651,8 +651,8 @@ static inline void put_link(struct namei
+   path_put(link);
+ }
+ 
+-int sysctl_protected_symlinks __read_mostly = 0;
+-int sysctl_protected_hardlinks __read_mostly = 0;
++int sysctl_protected_symlinks __read_mostly = 1;
++int sysctl_protected_hardlinks __read_mostly = 1;
+ 
+ /**
+  * may_follow_link - Check symlink following for unsafe situations



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2015-01-02 Thread Mike Pagano
commit: 518cc76831e627b4e407a6edb0da7374036d773f
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Fri Jan  2 19:11:39 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Fri Jan  2 19:11:39 2015 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=518cc768

Add DEVPTS_MULTIPLE_INSTANCES when GENTOO_LINUX_INIT_SYSTEMD is selected. See 
bug #534216

---
 4567_distro-Gentoo-Kconfig.patch | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch
index 652e2a7..690454a 100644
--- a/4567_distro-Gentoo-Kconfig.patch
+++ b/4567_distro-Gentoo-Kconfig.patch
@@ -7,9 +7,9 @@
 +source distro/Kconfig
 +
  source arch/$SRCARCH/Kconfig
1969-12-31 19:00:00.0 -0500
-+++ b/distro/Kconfig   2014-04-02 09:57:03.539218861 -0400
-@@ -0,0 +1,108 @@
+--- a/distro/Kconfig   1969-12-31 19:00:00.0 -0500
 b/distro/Kconfig   2015-01-02 13:54:45.589830665 -0500
+@@ -0,0 +1,109 @@
 +menu Gentoo Linux
 +
 +config GENTOO_LINUX
@@ -87,6 +87,7 @@
 +  select AUTOFS4_FS
 +  select BLK_DEV_BSG
 +  select CGROUPS
++  select DEVPTS_MULTIPLE_INSTANCES
 +  select EPOLL
 +  select FANOTIFY
 +  select FHANDLE



[gentoo-commits] proj/linux-patches:3.12 commit in: /

2014-12-19 Thread Mike Pagano
commit: 76de9404b65aea0cc23a24d0f97d0b833e93bb45
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Sat Dec 20 04:45:01 2014 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Sat Dec 20 04:45:01 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=76de9404

Linux patch 3.12.35

---
 _README  |4 +
 1034_linux-3.12.35.patch | 2597 ++
 2 files changed, 2601 insertions(+)

diff --git a/_README b/_README
index da28ca8..202ddb1 100644
--- a/_README
+++ b/_README
@@ -178,6 +178,10 @@ Patch:  1033_linux-3.12.34.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.34
 
+Patch:  1034_linux-3.12.35.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.35
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1034_linux-3.12.35.patch b/1034_linux-3.12.35.patch
new file mode 100644
index 000..bc1c67b
--- /dev/null
+++ b/1034_linux-3.12.35.patch
@@ -0,0 +1,2597 @@
+diff --git a/Makefile b/Makefile
+index 9f1b68fba514..8d030709ef0f 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 34
++SUBLEVEL = 35
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+diff --git a/arch/arm/include/asm/thread_info.h 
b/arch/arm/include/asm/thread_info.h
+index df5e13d64f2c..2b8114fcba09 100644
+--- a/arch/arm/include/asm/thread_info.h
 b/arch/arm/include/asm/thread_info.h
+@@ -43,16 +43,6 @@ struct cpu_context_save {
+   __u32   extra[2];   /* Xscale 'acc' register, etc */
+ };
+ 
+-struct arm_restart_block {
+-  union {
+-  /* For user cache flushing */
+-  struct {
+-  unsigned long start;
+-  unsigned long end;
+-  } cache;
+-  };
+-};
+-
+ /*
+  * low level task data that entry.S needs immediate access to.
+  * __switch_to() assumes cpu_context follows immediately after cpu_domain.
+@@ -78,7 +68,6 @@ struct thread_info {
+   unsigned long   thumbee_state;  /* ThumbEE Handler Base 
register */
+ #endif
+   struct restart_blockrestart_block;
+-  struct arm_restart_blockarm_restart_block;
+ };
+ 
+ #define INIT_THREAD_INFO(tsk) \
+diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
+index a8dd111ff99a..8e6cd760cc68 100644
+--- a/arch/arm/kernel/traps.c
 b/arch/arm/kernel/traps.c
+@@ -503,8 +503,6 @@ static int bad_syscall(int n, struct pt_regs *regs)
+   return regs-ARM_r0;
+ }
+ 
+-static long do_cache_op_restart(struct restart_block *);
+-
+ static inline int
+ __do_cache_op(unsigned long start, unsigned long end)
+ {
+@@ -513,24 +511,8 @@ __do_cache_op(unsigned long start, unsigned long end)
+   do {
+   unsigned long chunk = min(PAGE_SIZE, end - start);
+ 
+-  if (signal_pending(current)) {
+-  struct thread_info *ti = current_thread_info();
+-
+-  ti-restart_block = (struct restart_block) {
+-  .fn = do_cache_op_restart,
+-  };
+-
+-  ti-arm_restart_block = (struct arm_restart_block) {
+-  {
+-  .cache = {
+-  .start  = start,
+-  .end= end,
+-  },
+-  },
+-  };
+-
+-  return -ERESTART_RESTARTBLOCK;
+-  }
++  if (fatal_signal_pending(current))
++  return 0;
+ 
+   ret = flush_cache_user_range(start, start + chunk);
+   if (ret)
+@@ -543,15 +525,6 @@ __do_cache_op(unsigned long start, unsigned long end)
+   return 0;
+ }
+ 
+-static long do_cache_op_restart(struct restart_block *unused)
+-{
+-  struct arm_restart_block *restart_block;
+-
+-  restart_block = current_thread_info()-arm_restart_block;
+-  return __do_cache_op(restart_block-cache.start,
+-   restart_block-cache.end);
+-}
+-
+ static inline int
+ do_cache_op(unsigned long start, unsigned long end, int flags)
+ {
+diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
+index ced046d9f825..2e381582ffee 100644
+--- a/arch/arm/mm/proc-v7.S
 b/arch/arm/mm/proc-v7.S
+@@ -204,7 +204,6 @@ __v7_pj4b_setup:
+ /* Auxiliary Debug Modes Control 1 Register */
+ #define PJ4B_STATIC_BP (1  2) /* Enable Static BP */
+ #define PJ4B_INTER_PARITY (1  8) /* Disable Internal Parity Handling */
+-#define PJ4B_BCK_OFF_STREX (1  5) /* Enable the back off of STREX instr */
+ #define PJ4B_CLEAN_LINE (1  16) /* Disable data transfer for clean line */
+ 
+ /* Auxiliary Debug Modes 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2014-08-19 Thread Mike Pagano
commit: e1f77829bd6587aaa9afefb2c81e68fd51ff66c2
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Fri Aug  1 23:59:16 2014 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Fri Aug  1 23:59:16 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=e1f77829

Linux patch 3.12.26

---
 _README  |4 +
 1025_linux-3.12.26.patch | 3381 ++
 2 files changed, 3385 insertions(+)

diff --git a/_README b/_README
index 76b0ed4..4b58868 100644
--- a/_README
+++ b/_README
@@ -142,6 +142,10 @@ Patch:  1024_linux-3.12.25.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.25
 
+Patch:  1025_linux-3.12.26.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.26
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1025_linux-3.12.26.patch b/1025_linux-3.12.26.patch
new file mode 100644
index 000..4385766
--- /dev/null
+++ b/1025_linux-3.12.26.patch
@@ -0,0 +1,3381 @@
+diff --git a/Makefile b/Makefile
+index 4d25b56bf81c..647d87ac4a15 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 25
++SUBLEVEL = 26
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+@@ -614,6 +614,8 @@ KBUILD_CFLAGS  += -fomit-frame-pointer
+ endif
+ endif
+ 
++KBUILD_CFLAGS   += $(call cc-option, -fno-var-tracking-assignments)
++
+ ifdef CONFIG_DEBUG_INFO
+ KBUILD_CFLAGS += -g
+ KBUILD_AFLAGS += -gdwarf-2
+diff --git a/arch/arc/include/uapi/asm/ptrace.h 
b/arch/arc/include/uapi/asm/ptrace.h
+index 2618cc13ba75..76a7739aab1c 100644
+--- a/arch/arc/include/uapi/asm/ptrace.h
 b/arch/arc/include/uapi/asm/ptrace.h
+@@ -11,6 +11,7 @@
+ #ifndef _UAPI__ASM_ARC_PTRACE_H
+ #define _UAPI__ASM_ARC_PTRACE_H
+ 
++#define PTRACE_GET_THREAD_AREA25
+ 
+ #ifndef __ASSEMBLY__
+ /*
+diff --git a/arch/arc/kernel/ptrace.c b/arch/arc/kernel/ptrace.c
+index 5d76706139dd..13b3ffb27a38 100644
+--- a/arch/arc/kernel/ptrace.c
 b/arch/arc/kernel/ptrace.c
+@@ -146,6 +146,10 @@ long arch_ptrace(struct task_struct *child, long request,
+   pr_debug(REQ=%ld: ADDR =0x%lx, DATA=0x%lx)\n, request, addr, data);
+ 
+   switch (request) {
++  case PTRACE_GET_THREAD_AREA:
++  ret = put_user(task_thread_info(child)-thr_ptr,
++ (unsigned long __user *)data);
++  break;
+   default:
+   ret = ptrace_request(child, request, addr, data);
+   break;
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index e47fcd1e9645..99e1ce978cf9 100644
+--- a/arch/arm/Kconfig
 b/arch/arm/Kconfig
+@@ -5,6 +5,7 @@ config ARM
+   select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
+   select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
+   select ARCH_HAVE_CUSTOM_GPIO_H
++  select ARCH_SUPPORTS_ATOMIC_RMW
+   select ARCH_WANT_IPC_PARSE_VERSION
+   select BUILDTIME_EXTABLE_SORT if MMU
+   select CLONE_BACKWARDS
+diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
+index 737ed5da8f71..de1611966d8b 100644
+--- a/arch/arm/boot/dts/imx25.dtsi
 b/arch/arm/boot/dts/imx25.dtsi
+@@ -30,6 +30,7 @@
+   spi2 = spi3;
+   usb0 = usbotg;
+   usb1 = usbhost1;
++  ethernet0 = fec;
+   };
+ 
+   cpus {
+diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
+index b7a1c6d950b9..c07aea4f66cb 100644
+--- a/arch/arm/boot/dts/imx27.dtsi
 b/arch/arm/boot/dts/imx27.dtsi
+@@ -30,6 +30,7 @@
+   spi0 = cspi1;
+   spi1 = cspi2;
+   spi2 = cspi3;
++  ethernet0 = fec;
+   };
+ 
+   aitc: aitc-interrupt-controller@e000 {
+diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
+index 54cee6517902..6d2a5343691f 100644
+--- a/arch/arm/boot/dts/imx51.dtsi
 b/arch/arm/boot/dts/imx51.dtsi
+@@ -27,6 +27,7 @@
+   spi0 = ecspi1;
+   spi1 = ecspi2;
+   spi2 = cspi;
++  ethernet0 = fec;
+   };
+ 
+   tzic: tz-interrupt-controller@e000 {
+diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
+index dc72353de0b3..50eda500f39a 100644
+--- a/arch/arm/boot/dts/imx53.dtsi
 b/arch/arm/boot/dts/imx53.dtsi
+@@ -33,6 +33,7 @@
+   spi0 = ecspi1;
+   spi1 = ecspi2;
+   spi2 = cspi;
++  ethernet0 = fec;
+   };
+ 
+   cpus {
+diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
+index c04454876bcb..fe70eaea0e28 100644
+--- a/arch/arm64/Kconfig
 b/arch/arm64/Kconfig
+@@ -1,6 +1,7 @@
+ config ARM64
+   def_bool y
+   select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
++  select ARCH_SUPPORTS_ATOMIC_RMW
+   select ARCH_WANT_OPTIONAL_GPIOLIB
+   select 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2014-08-01 Thread Mike Pagano
commit: e1f77829bd6587aaa9afefb2c81e68fd51ff66c2
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Fri Aug  1 23:59:16 2014 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Fri Aug  1 23:59:16 2014 +
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=e1f77829

Linux patch 3.12.26

---
 _README  |4 +
 1025_linux-3.12.26.patch | 3381 ++
 2 files changed, 3385 insertions(+)

diff --git a/_README b/_README
index 76b0ed4..4b58868 100644
--- a/_README
+++ b/_README
@@ -142,6 +142,10 @@ Patch:  1024_linux-3.12.25.patch
 From:   http://www.kernel.org
 Desc:   Linux 3.12.25
 
+Patch:  1025_linux-3.12.26.patch
+From:   http://www.kernel.org
+Desc:   Linux 3.12.26
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1025_linux-3.12.26.patch b/1025_linux-3.12.26.patch
new file mode 100644
index 000..4385766
--- /dev/null
+++ b/1025_linux-3.12.26.patch
@@ -0,0 +1,3381 @@
+diff --git a/Makefile b/Makefile
+index 4d25b56bf81c..647d87ac4a15 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 3
+ PATCHLEVEL = 12
+-SUBLEVEL = 25
++SUBLEVEL = 26
+ EXTRAVERSION =
+ NAME = One Giant Leap for Frogkind
+ 
+@@ -614,6 +614,8 @@ KBUILD_CFLAGS  += -fomit-frame-pointer
+ endif
+ endif
+ 
++KBUILD_CFLAGS   += $(call cc-option, -fno-var-tracking-assignments)
++
+ ifdef CONFIG_DEBUG_INFO
+ KBUILD_CFLAGS += -g
+ KBUILD_AFLAGS += -gdwarf-2
+diff --git a/arch/arc/include/uapi/asm/ptrace.h 
b/arch/arc/include/uapi/asm/ptrace.h
+index 2618cc13ba75..76a7739aab1c 100644
+--- a/arch/arc/include/uapi/asm/ptrace.h
 b/arch/arc/include/uapi/asm/ptrace.h
+@@ -11,6 +11,7 @@
+ #ifndef _UAPI__ASM_ARC_PTRACE_H
+ #define _UAPI__ASM_ARC_PTRACE_H
+ 
++#define PTRACE_GET_THREAD_AREA25
+ 
+ #ifndef __ASSEMBLY__
+ /*
+diff --git a/arch/arc/kernel/ptrace.c b/arch/arc/kernel/ptrace.c
+index 5d76706139dd..13b3ffb27a38 100644
+--- a/arch/arc/kernel/ptrace.c
 b/arch/arc/kernel/ptrace.c
+@@ -146,6 +146,10 @@ long arch_ptrace(struct task_struct *child, long request,
+   pr_debug(REQ=%ld: ADDR =0x%lx, DATA=0x%lx)\n, request, addr, data);
+ 
+   switch (request) {
++  case PTRACE_GET_THREAD_AREA:
++  ret = put_user(task_thread_info(child)-thr_ptr,
++ (unsigned long __user *)data);
++  break;
+   default:
+   ret = ptrace_request(child, request, addr, data);
+   break;
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index e47fcd1e9645..99e1ce978cf9 100644
+--- a/arch/arm/Kconfig
 b/arch/arm/Kconfig
+@@ -5,6 +5,7 @@ config ARM
+   select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
+   select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
+   select ARCH_HAVE_CUSTOM_GPIO_H
++  select ARCH_SUPPORTS_ATOMIC_RMW
+   select ARCH_WANT_IPC_PARSE_VERSION
+   select BUILDTIME_EXTABLE_SORT if MMU
+   select CLONE_BACKWARDS
+diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
+index 737ed5da8f71..de1611966d8b 100644
+--- a/arch/arm/boot/dts/imx25.dtsi
 b/arch/arm/boot/dts/imx25.dtsi
+@@ -30,6 +30,7 @@
+   spi2 = spi3;
+   usb0 = usbotg;
+   usb1 = usbhost1;
++  ethernet0 = fec;
+   };
+ 
+   cpus {
+diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
+index b7a1c6d950b9..c07aea4f66cb 100644
+--- a/arch/arm/boot/dts/imx27.dtsi
 b/arch/arm/boot/dts/imx27.dtsi
+@@ -30,6 +30,7 @@
+   spi0 = cspi1;
+   spi1 = cspi2;
+   spi2 = cspi3;
++  ethernet0 = fec;
+   };
+ 
+   aitc: aitc-interrupt-controller@e000 {
+diff --git a/arch/arm/boot/dts/imx51.dtsi b/arch/arm/boot/dts/imx51.dtsi
+index 54cee6517902..6d2a5343691f 100644
+--- a/arch/arm/boot/dts/imx51.dtsi
 b/arch/arm/boot/dts/imx51.dtsi
+@@ -27,6 +27,7 @@
+   spi0 = ecspi1;
+   spi1 = ecspi2;
+   spi2 = cspi;
++  ethernet0 = fec;
+   };
+ 
+   tzic: tz-interrupt-controller@e000 {
+diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
+index dc72353de0b3..50eda500f39a 100644
+--- a/arch/arm/boot/dts/imx53.dtsi
 b/arch/arm/boot/dts/imx53.dtsi
+@@ -33,6 +33,7 @@
+   spi0 = ecspi1;
+   spi1 = ecspi2;
+   spi2 = cspi;
++  ethernet0 = fec;
+   };
+ 
+   cpus {
+diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
+index c04454876bcb..fe70eaea0e28 100644
+--- a/arch/arm64/Kconfig
 b/arch/arm64/Kconfig
+@@ -1,6 +1,7 @@
+ config ARM64
+   def_bool y
+   select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
++  select ARCH_SUPPORTS_ATOMIC_RMW
+   select ARCH_WANT_OPTIONAL_GPIOLIB
+   select 

[gentoo-commits] proj/linux-patches:3.12 commit in: /

2014-06-25 Thread Mike Pagano
commit: 0f0f9f5f08c096bf62e0898c51ec3c3b3960eeaf
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Wed Jun 25 17:19:54 2014 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Wed Jun 25 17:19:54 2014 +
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/linux-patches.git;a=commit;h=0f0f9f5f

Remove redundant patch.

---
 _README|   4 -
 ...inode_capable-to-capable_wrt_inode_uidgid.patch | 160 -
 2 files changed, 164 deletions(-)

diff --git a/_README b/_README
index b0d0097..c37d7ee 100644
--- a/_README
+++ b/_README
@@ -166,10 +166,6 @@ Patch:  4200_fbcondecor-0.9.6.patch
 From:   http://dev.gentoo.org/~spock
 Desc:   Bootsplash successor by Michal Januszewski ported by Jeremy (bug 
#452574)
 
-Patch:  4400_fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch
-From:   https://bugs.gentoo.org/show_bug.cgi?id=512980
-Desc:   Change inode_capable to capable_wrt_inode_uidgid, fixes CVE-2014-4014
-
 Patch:  4500_support-for-pogoplug-e02.patch
 From:   Cristoph Junghans ott...@gentoo.org
 Desc:   Support for Pogoplug e02 (bug #460350), adjusted to be opt-in by 
TomWij.

diff --git 
a/4400_fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch 
b/4400_fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch
deleted file mode 100644
index 108309d..000
--- a/4400_fs-userns-change-inode_capable-to-capable_wrt_inode_uidgid.patch
+++ /dev/null
@@ -1,160 +0,0 @@
 a/fs/attr.c2014-06-11 19:56:10.729668444 -0400
-+++ b/fs/attr.c2014-06-11 20:19:09.719657538 -0400
-@@ -50,14 +50,14 @@ int inode_change_ok(const struct inode *
-   if ((ia_valid  ATTR_UID) 
-   (!uid_eq(current_fsuid(), inode-i_uid) ||
-!uid_eq(attr-ia_uid, inode-i_uid)) 
--  !inode_capable(inode, CAP_CHOWN))
-+  !capable_wrt_inode_uidgid(inode, CAP_CHOWN))
-   return -EPERM;
- 
-   /* Make sure caller can chgrp. */
-   if ((ia_valid  ATTR_GID) 
-   (!uid_eq(current_fsuid(), inode-i_uid) ||
-   (!in_group_p(attr-ia_gid)  !gid_eq(attr-ia_gid, inode-i_gid))) 

--  !inode_capable(inode, CAP_CHOWN))
-+  !capable_wrt_inode_uidgid(inode, CAP_CHOWN))
-   return -EPERM;
- 
-   /* Make sure a caller can chmod. */
-@@ -67,7 +67,7 @@ int inode_change_ok(const struct inode *
-   /* Also check the setgid bit! */
-   if (!in_group_p((ia_valid  ATTR_GID) ? attr-ia_gid :
-   inode-i_gid) 
--  !inode_capable(inode, CAP_FSETID))
-+  !capable_wrt_inode_uidgid(inode, CAP_FSETID))
-   attr-ia_mode = ~S_ISGID;
-   }
- 
-@@ -160,7 +160,7 @@ void setattr_copy(struct inode *inode, c
-   umode_t mode = attr-ia_mode;
- 
-   if (!in_group_p(inode-i_gid) 
--  !inode_capable(inode, CAP_FSETID))
-+  !capable_wrt_inode_uidgid(inode, CAP_FSETID))
-   mode = ~S_ISGID;
-   inode-i_mode = mode;
-   }
 a/fs/inode.c   2014-06-11 19:56:23.489668343 -0400
-+++ b/fs/inode.c   2014-06-11 20:06:19.049663633 -0400
-@@ -1840,14 +1840,18 @@ EXPORT_SYMBOL(inode_init_owner);
-  * inode_owner_or_capable - check current task permissions to inode
-  * @inode: inode being checked
-  *
-- * Return true if current either has CAP_FOWNER to the inode, or
-- * owns the file.
-+ * Return true if current either has CAP_FOWNER in a namespace with the
-+ * inode owner uid mapped, or owns the file
-  */
- bool inode_owner_or_capable(const struct inode *inode)
- {
-+  struct user_namespace *ns;
-+
-   if (uid_eq(current_fsuid(), inode-i_uid))
-   return true;
--  if (inode_capable(inode, CAP_FOWNER))
-+
-+  ns = current_user_ns();
-+  if (ns_capable(ns, CAP_FOWNER)  kuid_has_mapping(ns, inode-i_uid))
-   return true;
-   return false;
- }
 a/fs/namei.c   2014-06-11 19:56:33.039668268 -0400
-+++ b/fs/namei.c   2014-06-11 20:10:37.189661592 -0400
-@@ -332,10 +332,11 @@ int generic_permission(struct inode *ino
- 
-   if (S_ISDIR(inode-i_mode)) {
-   /* DACs are overridable for directories */
--  if (inode_capable(inode, CAP_DAC_OVERRIDE))
-+if (capable_wrt_inode_uidgid(inode, CAP_DAC_OVERRIDE))
-   return 0;
-   if (!(mask  MAY_WRITE))
--  if (inode_capable(inode, CAP_DAC_READ_SEARCH))
-+if (capable_wrt_inode_uidgid(inode,
-+ CAP_DAC_READ_SEARCH))
-   return 0;
-   return -EACCES;
-   }
-@@ -345,7 +346,7 @@ int generic_permission(struct inode *ino
-* at least one exec bit set.
-*/
-   if (!(mask  MAY_EXEC) || (inode-i_mode  S_IXUGO))
--  if (inode_capable(inode,