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

2017-12-15 Thread Alice Ferrazzi
commit: 4f5e8935a83b7b615e64287b1ba50633ac6e39b1
Author: Alice Ferrazzi  gentoo  org>
AuthorDate: Fri Dec 15 20:22:14 2017 +
Commit: Alice Ferrazzi  gentoo  org>
CommitDate: Fri Dec 15 20:22:14 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=4f5e8935

linux kernel 4.1.48

 _README |4 +
 1047_linux-4.1.48.patch | 3434 +++
 2 files changed, 3438 insertions(+)

diff --git a/_README b/_README
index b37932b..1b3166c 100644
--- a/_README
+++ b/_README
@@ -231,6 +231,10 @@ Patch:  1046_linux-4.1.47.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.47
 
+Patch:  1047_linux-4.1.48.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.48
+
 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/1047_linux-4.1.48.patch b/1047_linux-4.1.48.patch
new file mode 100644
index 000..bf1334d
--- /dev/null
+++ b/1047_linux-4.1.48.patch
@@ -0,0 +1,3434 @@
+diff --git a/Makefile b/Makefile
+index c730c9719f6d..97edf556bfe4 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 47
++SUBLEVEL = 48
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/mm/dump.c b/arch/arm/mm/dump.c
+index 9fe8e241335c..e1f6f0daa847 100644
+--- a/arch/arm/mm/dump.c
 b/arch/arm/mm/dump.c
+@@ -126,8 +126,8 @@ static const struct prot_bits section_bits[] = {
+   .val= PMD_SECT_USER,
+   .set= "USR",
+   }, {
+-  .mask   = L_PMD_SECT_RDONLY,
+-  .val= L_PMD_SECT_RDONLY,
++  .mask   = L_PMD_SECT_RDONLY | PMD_SECT_AP2,
++  .val= L_PMD_SECT_RDONLY | PMD_SECT_AP2,
+   .set= "ro",
+   .clear  = "RW",
+ #elif __LINUX_ARM_ARCH__ >= 6
+diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
+index be92fa0f2f35..10058c00ddd9 100644
+--- a/arch/arm/mm/init.c
 b/arch/arm/mm/init.c
+@@ -609,8 +609,8 @@ static struct section_perm ro_perms[] = {
+   .start  = (unsigned long)_stext,
+   .end= (unsigned long)__init_begin,
+ #ifdef CONFIG_ARM_LPAE
+-  .mask   = ~L_PMD_SECT_RDONLY,
+-  .prot   = L_PMD_SECT_RDONLY,
++  .mask   = ~(L_PMD_SECT_RDONLY | PMD_SECT_AP2),
++  .prot   = L_PMD_SECT_RDONLY | PMD_SECT_AP2,
+ #else
+   .mask   = ~(PMD_SECT_APX | PMD_SECT_AP_WRITE),
+   .prot   = PMD_SECT_APX | PMD_SECT_AP_WRITE,
+diff --git a/arch/mips/bcm47xx/leds.c b/arch/mips/bcm47xx/leds.c
+index 0e4ade342333..5c2e12923327 100644
+--- a/arch/mips/bcm47xx/leds.c
 b/arch/mips/bcm47xx/leds.c
+@@ -330,7 +330,7 @@ bcm47xx_leds_linksys_wrt54g3gv2[] __initconst = {
+ /* Verified on: WRT54GS V1.0 */
+ static const struct gpio_led
+ bcm47xx_leds_linksys_wrt54g_type_0101[] __initconst = {
+-  BCM47XX_GPIO_LED(0, "green", "wlan", 0, LEDS_GPIO_DEFSTATE_OFF),
++  BCM47XX_GPIO_LED(0, "green", "wlan", 1, LEDS_GPIO_DEFSTATE_OFF),
+   BCM47XX_GPIO_LED(1, "green", "power", 0, LEDS_GPIO_DEFSTATE_ON),
+   BCM47XX_GPIO_LED(7, "green", "dmz", 1, LEDS_GPIO_DEFSTATE_OFF),
+ };
+diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
+index 5c3aa41a162f..81a13fd56d13 100644
+--- a/arch/mips/kernel/ptrace.c
 b/arch/mips/kernel/ptrace.c
+@@ -561,6 +561,19 @@ static const struct user_regset_view user_mips64_view = {
+   .n  = ARRAY_SIZE(mips64_regsets),
+ };
+ 
++#ifdef CONFIG_MIPS32_N32
++
++static const struct user_regset_view user_mipsn32_view = {
++  .name   = "mipsn32",
++  .e_flags= EF_MIPS_ABI2,
++  .e_machine  = ELF_ARCH,
++  .ei_osabi   = ELF_OSABI,
++  .regsets= mips64_regsets,
++  .n  = ARRAY_SIZE(mips64_regsets),
++};
++
++#endif /* CONFIG_MIPS32_N32 */
++
+ #endif /* CONFIG_64BIT */
+ 
+ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
+@@ -571,6 +584,10 @@ const struct user_regset_view 
*task_user_regset_view(struct task_struct *task)
+ #ifdef CONFIG_MIPS32_O32
+   if (test_tsk_thread_flag(task, TIF_32BIT_REGS))
+   return _mips_view;
++#endif
++#ifdef CONFIG_MIPS32_N32
++  if (test_tsk_thread_flag(task, TIF_32BIT_ADDR))
++  return _mipsn32_view;
+ #endif
+   return _mips64_view;
+ #endif
+diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
+index 51e77841f9f6..2734f6a4857d 100644
+--- a/arch/mips/kernel/setup.c
 b/arch/mips/kernel/setup.c
+@@ -147,35 +147,6 @@ void __init detect_memory_region(phys_addr_t start, 
phys_addr_t sz_min, phys_add
+   add_memory_region(start, size, BOOT_MEM_RAM);
+ }
+ 
+-bool __init memory_region_available(phys_addr_t start, phys_addr_t size)
+-{
+-  int i;
+-  bool in_ram = false, free = true;
+-
+-  for (i = 0; i < 

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

2017-12-08 Thread Mike Pagano
commit: ca5583f1a2b0ded411d4436cb5f0a2e6b431d5cd
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Dec  8 14:48:13 2017 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Dec  8 14:48:13 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ca5583f1

Removal of redundant patchset

 _README |   4 -
 2400_BT-check-L2CAP-buffer-length.patch | 357 
 2 files changed, 361 deletions(-)

diff --git a/_README b/_README
index 85f04e7..b37932b 100644
--- a/_README
+++ b/_README
@@ -247,10 +247,6 @@ Patch:  1800_fix-lru-cache-add-oom-regression.patch
 From:   http://thread.gmane.org/gmane.linux.kernel.stable/184384
 Desc:   Revert commit 8f182270dfec mm/swap.c: flush lru pvecs on compound page 
arrival to fix OOM error.
 
-Patch:  2400_BT-check-L2CAP-buffer-length.patch
-From:   
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
-Desc:   Validate the output buffer length for L2CAP config reqs and resps to 
avoid stack buffer overflowing. CVE-2017-1000251. See bug #630840
-
 Patch:  2700_ThinkPad-30-brightness-control-fix.patch
 From:   Seth Forshee 
 Desc:   ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads.

diff --git a/2400_BT-check-L2CAP-buffer-length.patch 
b/2400_BT-check-L2CAP-buffer-length.patch
deleted file mode 100644
index c6bfdf7..000
--- a/2400_BT-check-L2CAP-buffer-length.patch
+++ /dev/null
@@ -1,357 +0,0 @@
-From e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 Mon Sep 17 00:00:00 2001
-From: Ben Seri 
-Date: Sat, 9 Sep 2017 23:15:59 +0200
-Subject: Bluetooth: Properly check L2CAP config option output buffer length
-
-Validate the output buffer length for L2CAP config requests and responses
-to avoid overflowing the stack buffer used for building the option blocks.
-
-Cc: sta...@vger.kernel.org
-Signed-off-by: Ben Seri 
-Signed-off-by: Marcel Holtmann 
-Signed-off-by: Linus Torvalds 

- net/bluetooth/l2cap_core.c | 80 +-
- 1 file changed, 43 insertions(+), 37 deletions(-)
-
-diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
-index 303c779..43ba91c 100644
 a/net/bluetooth/l2cap_core.c
-+++ b/net/bluetooth/l2cap_core.c
-@@ -58,7 +58,7 @@ static struct sk_buff *l2cap_build_cmd(struct l2cap_conn 
*conn,
-  u8 code, u8 ident, u16 dlen, void *data);
- static void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 
len,
-  void *data);
--static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data);
-+static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t 
data_size);
- static void l2cap_send_disconn_req(struct l2cap_chan *chan, int err);
- 
- static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
-@@ -1473,7 +1473,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
- 
-   set_bit(CONF_REQ_SENT, >conf_state);
-   l2cap_send_cmd(conn, l2cap_get_ident(conn), 
L2CAP_CONF_REQ,
-- l2cap_build_conf_req(chan, buf), buf);
-+ l2cap_build_conf_req(chan, buf, 
sizeof(buf)), buf);
-   chan->num_conf_req++;
-   }
- 
-@@ -2987,12 +2987,15 @@ static inline int l2cap_get_conf_opt(void **ptr, int 
*type, int *olen,
-   return len;
- }
- 
--static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val)
-+static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long 
val, size_t size)
- {
-   struct l2cap_conf_opt *opt = *ptr;
- 
-   BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
- 
-+  if (size < L2CAP_CONF_OPT_SIZE + len)
-+  return;
-+
-   opt->type = type;
-   opt->len  = len;
- 
-@@ -3017,7 +3020,7 @@ static void l2cap_add_conf_opt(void **ptr, u8 type, u8 
len, unsigned long val)
-   *ptr += L2CAP_CONF_OPT_SIZE + len;
- }
- 
--static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan)
-+static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t 
size)
- {
-   struct l2cap_conf_efs efs;
- 
-@@ -3045,7 +3048,7 @@ static void l2cap_add_opt_efs(void **ptr, struct 
l2cap_chan *chan)
-   }
- 
-   l2cap_add_conf_opt(ptr, L2CAP_CONF_EFS, sizeof(efs),
-- (unsigned long) );
-+ (unsigned long) , size);
- }
- 
- static void l2cap_ack_timeout(struct work_struct *work)
-@@ -3191,11 +3194,12 @@ static inline void l2cap_txwin_setup(struct l2cap_chan 
*chan)
-   chan->ack_win = chan->tx_win;
- }
- 
--static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data)
-+static int l2cap_build_conf_req(struct l2cap_chan *chan, void 

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

2017-09-13 Thread Mike Pagano
commit: 853af618e0ee4cee610f17b65bf4d1d60a7f3da2
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Sep 13 19:38:16 2017 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Sep 13 19:38:16 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=853af618

Validate the output buffer length for L2CAP config reqs and resps to avoid 
stack buffer overflowing. CVE-2017-1000251. See bug #630840

 _README |   4 +
 2400_BT-check-L2CAP-buffer-length.patch | 357 
 2 files changed, 361 insertions(+)

diff --git a/_README b/_README
index 60f0ad1..959795e 100644
--- a/_README
+++ b/_README
@@ -231,6 +231,10 @@ Patch:  1800_fix-lru-cache-add-oom-regression.patch
 From:   http://thread.gmane.org/gmane.linux.kernel.stable/184384
 Desc:   Revert commit 8f182270dfec mm/swap.c: flush lru pvecs on compound page 
arrival to fix OOM error.
 
+Patch:  2400_BT-check-L2CAP-buffer-length.patch
+From:   
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
+Desc:   Validate the output buffer length for L2CAP config reqs and resps to 
avoid stack buffer overflowing. CVE-2017-1000251. See bug #630840
+
 Patch:  2700_ThinkPad-30-brightness-control-fix.patch
 From:   Seth Forshee 
 Desc:   ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads.

diff --git a/2400_BT-check-L2CAP-buffer-length.patch 
b/2400_BT-check-L2CAP-buffer-length.patch
new file mode 100644
index 000..c6bfdf7
--- /dev/null
+++ b/2400_BT-check-L2CAP-buffer-length.patch
@@ -0,0 +1,357 @@
+From e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 Mon Sep 17 00:00:00 2001
+From: Ben Seri 
+Date: Sat, 9 Sep 2017 23:15:59 +0200
+Subject: Bluetooth: Properly check L2CAP config option output buffer length
+
+Validate the output buffer length for L2CAP config requests and responses
+to avoid overflowing the stack buffer used for building the option blocks.
+
+Cc: sta...@vger.kernel.org
+Signed-off-by: Ben Seri 
+Signed-off-by: Marcel Holtmann 
+Signed-off-by: Linus Torvalds 
+---
+ net/bluetooth/l2cap_core.c | 80 +-
+ 1 file changed, 43 insertions(+), 37 deletions(-)
+
+diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
+index 303c779..43ba91c 100644
+--- a/net/bluetooth/l2cap_core.c
 b/net/bluetooth/l2cap_core.c
+@@ -58,7 +58,7 @@ static struct sk_buff *l2cap_build_cmd(struct l2cap_conn 
*conn,
+  u8 code, u8 ident, u16 dlen, void *data);
+ static void l2cap_send_cmd(struct l2cap_conn *conn, u8 ident, u8 code, u16 
len,
+  void *data);
+-static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data);
++static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data, size_t 
data_size);
+ static void l2cap_send_disconn_req(struct l2cap_chan *chan, int err);
+ 
+ static void l2cap_tx(struct l2cap_chan *chan, struct l2cap_ctrl *control,
+@@ -1473,7 +1473,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
+ 
+   set_bit(CONF_REQ_SENT, >conf_state);
+   l2cap_send_cmd(conn, l2cap_get_ident(conn), 
L2CAP_CONF_REQ,
+- l2cap_build_conf_req(chan, buf), buf);
++ l2cap_build_conf_req(chan, buf, 
sizeof(buf)), buf);
+   chan->num_conf_req++;
+   }
+ 
+@@ -2987,12 +2987,15 @@ static inline int l2cap_get_conf_opt(void **ptr, int 
*type, int *olen,
+   return len;
+ }
+ 
+-static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long val)
++static void l2cap_add_conf_opt(void **ptr, u8 type, u8 len, unsigned long 
val, size_t size)
+ {
+   struct l2cap_conf_opt *opt = *ptr;
+ 
+   BT_DBG("type 0x%2.2x len %u val 0x%lx", type, len, val);
+ 
++  if (size < L2CAP_CONF_OPT_SIZE + len)
++  return;
++
+   opt->type = type;
+   opt->len  = len;
+ 
+@@ -3017,7 +3020,7 @@ static void l2cap_add_conf_opt(void **ptr, u8 type, u8 
len, unsigned long val)
+   *ptr += L2CAP_CONF_OPT_SIZE + len;
+ }
+ 
+-static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan)
++static void l2cap_add_opt_efs(void **ptr, struct l2cap_chan *chan, size_t 
size)
+ {
+   struct l2cap_conf_efs efs;
+ 
+@@ -3045,7 +3048,7 @@ static void l2cap_add_opt_efs(void **ptr, struct 
l2cap_chan *chan)
+   }
+ 
+   l2cap_add_conf_opt(ptr, L2CAP_CONF_EFS, sizeof(efs),
+- (unsigned long) );
++ (unsigned long) , size);
+ }
+ 
+ static void l2cap_ack_timeout(struct work_struct *work)
+@@ -3191,11 +3194,12 @@ static inline void l2cap_txwin_setup(struct l2cap_chan 
*chan)
+   chan->ack_win = chan->tx_win;
+ }
+ 
+-static int 

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

2017-04-14 Thread Mike Pagano
commit: b8d213a1983935e8741527f7a87ff63f1a44e648
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Apr 14 19:17:28 2017 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Apr 14 19:17:28 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b8d213a1

Fix for CVE-2016-10229. Unsafe second checksum calculation in udp.c. See bug 
#615480.

 _README|  4 +
 ...udp-prop-suprt-MSG-PEEK-wth-trunc-buffers.patch | 94 ++
 2 files changed, 98 insertions(+)

diff --git a/_README b/_README
index 80a401b..c91ff69 100644
--- a/_README
+++ b/_README
@@ -211,6 +211,10 @@ Patch:  1520_CVE-2017-6074-dccp-skb-freeing-fix.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=610600
 Desc:   dccp: fix freeing skb too early for IPV6_RECVPKTINFO. CVE-2017-6074
 
+Patch:  1530_udp-prop-suprt-MSG-PEEK-wth-trunc-buffers.patch
+From:   https://bugs.gentoo.org/show_bug.cgi?id=615480
+Desc:   Fixes CVE-2016-10229. Unsafe second checksum calculation in udp.c
+
 Patch:  1800_fix-lru-cache-add-oom-regression.patch
 From:   http://thread.gmane.org/gmane.linux.kernel.stable/184384
 Desc:   Revert commit 8f182270dfec mm/swap.c: flush lru pvecs on compound page 
arrival to fix OOM error.

diff --git a/1530_udp-prop-suprt-MSG-PEEK-wth-trunc-buffers.patch 
b/1530_udp-prop-suprt-MSG-PEEK-wth-trunc-buffers.patch
new file mode 100644
index 000..1d12eaa
--- /dev/null
+++ b/1530_udp-prop-suprt-MSG-PEEK-wth-trunc-buffers.patch
@@ -0,0 +1,94 @@
+From 197c949e7798fbf28cfadc69d9ca0c2abbf93191 Mon Sep 17 00:00:00 2001
+From: Eric Dumazet 
+Date: Wed, 30 Dec 2015 08:51:12 -0500
+Subject: udp: properly support MSG_PEEK with truncated buffers
+
+Backport of this upstream commit into stable kernels :
+89c22d8c3b27 ("net: Fix skb csum races when peeking")
+exposed a bug in udp stack vs MSG_PEEK support, when user provides
+a buffer smaller than skb payload.
+
+In this case,
+skb_copy_and_csum_datagram_iovec(skb, sizeof(struct udphdr),
+ msg->msg_iov);
+returns -EFAULT.
+
+This bug does not happen in upstream kernels since Al Viro did a great
+job to replace this into :
+skb_copy_and_csum_datagram_msg(skb, sizeof(struct udphdr), msg);
+This variant is safe vs short buffers.
+
+For the time being, instead reverting Herbert Xu patch and add back
+skb->ip_summed invalid changes, simply store the result of
+udp_lib_checksum_complete() so that we avoid computing the checksum a
+second time, and avoid the problematic
+skb_copy_and_csum_datagram_iovec() call.
+
+This patch can be applied on recent kernels as it avoids a double
+checksumming, then backported to stable kernels as a bug fix.
+
+Signed-off-by: Eric Dumazet 
+Acked-by: Herbert Xu 
+Signed-off-by: David S. Miller 
+---
+ net/ipv4/udp.c | 6 --
+ net/ipv6/udp.c | 6 --
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
+index 8841e98..ac14ae4 100644
+--- a/net/ipv4/udp.c
 b/net/ipv4/udp.c
+@@ -1271,6 +1271,7 @@ int udp_recvmsg(struct sock *sk, struct msghdr *msg, 
size_t len, int noblock,
+   int peeked, off = 0;
+   int err;
+   int is_udplite = IS_UDPLITE(sk);
++  bool checksum_valid = false;
+   bool slow;
+ 
+   if (flags & MSG_ERRQUEUE)
+@@ -1296,11 +1297,12 @@ try_again:
+*/
+ 
+   if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) {
+-  if (udp_lib_checksum_complete(skb))
++  checksum_valid = !udp_lib_checksum_complete(skb);
++  if (!checksum_valid)
+   goto csum_copy_err;
+   }
+ 
+-  if (skb_csum_unnecessary(skb))
++  if (checksum_valid || skb_csum_unnecessary(skb))
+   err = skb_copy_datagram_msg(skb, sizeof(struct udphdr),
+   msg, copied);
+   else {
+diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
+index 9da3287..00775ee 100644
+--- a/net/ipv6/udp.c
 b/net/ipv6/udp.c
+@@ -402,6 +402,7 @@ int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, 
size_t len,
+   int peeked, off = 0;
+   int err;
+   int is_udplite = IS_UDPLITE(sk);
++  bool checksum_valid = false;
+   int is_udp4;
+   bool slow;
+ 
+@@ -433,11 +434,12 @@ try_again:
+*/
+ 
+   if (copied < ulen || UDP_SKB_CB(skb)->partial_cov) {
+-  if (udp_lib_checksum_complete(skb))
++  checksum_valid = !udp_lib_checksum_complete(skb);
++  if (!checksum_valid)
+   goto csum_copy_err;
+   }
+ 
+-  if (skb_csum_unnecessary(skb))
++  if (checksum_valid || skb_csum_unnecessary(skb))
+   err = skb_copy_datagram_msg(skb, sizeof(struct udphdr),
+   msg, copied);
+   else {
+-- 
+cgit v1.1
+



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

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

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:4.1 commit in: /

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

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:4.1 commit in: /

2017-02-24 Thread Mike Pagano
commit: 6ed8b62e018b2d75b73c9d848d64b1394c1e362a
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Feb 24 16:11:39 2017 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Feb 24 16:11:39 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=6ed8b62e

dccp: fix freeing skb too early for IPV6_RECVPKTINFO. CVE-2017-6074

 _README  |  4 ++
 1520_CVE-2017-6074-dccp-fix-early-skb-free.patch | 47 
 2 files changed, 51 insertions(+)

diff --git a/_README b/_README
index 061bd5e..9c6c940 100644
--- a/_README
+++ b/_README
@@ -203,6 +203,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_CVE-2017-6074-dccp-skb-freeing-fix.patch
+From:   https://bugs.gentoo.org/show_bug.cgi?id=610600
+Desc:   dccp: fix freeing skb too early for IPV6_RECVPKTINFO. CVE-2017-6074
+
 Patch:  1800_fix-lru-cache-add-oom-regression.patch
 From:   http://thread.gmane.org/gmane.linux.kernel.stable/184384
 Desc:   Revert commit 8f182270dfec mm/swap.c: flush lru pvecs on compound page 
arrival to fix OOM error.

diff --git a/1520_CVE-2017-6074-dccp-fix-early-skb-free.patch 
b/1520_CVE-2017-6074-dccp-fix-early-skb-free.patch
new file mode 100644
index 000..433fd4b
--- /dev/null
+++ b/1520_CVE-2017-6074-dccp-fix-early-skb-free.patch
@@ -0,0 +1,47 @@
+From 5edabca9d4cff7f1f2b68f0bac55ef99d9798ba4 Mon Sep 17 00:00:00 2001
+From: Andrey Konovalov 
+Date: Thu, 16 Feb 2017 17:22:46 +0100
+Subject: dccp: fix freeing skb too early for IPV6_RECVPKTINFO
+
+In the current DCCP implementation an skb for a DCCP_PKT_REQUEST packet
+is forcibly freed via __kfree_skb in dccp_rcv_state_process if
+dccp_v6_conn_request successfully returns.
+
+However, if IPV6_RECVPKTINFO is set on a socket, the address of the skb
+is saved to ireq->pktopts and the ref count for skb is incremented in
+dccp_v6_conn_request, so skb is still in use. Nevertheless, it gets freed
+in dccp_rcv_state_process.
+
+Fix by calling consume_skb instead of doing goto discard and therefore
+calling __kfree_skb.
+
+Similar fixes for TCP:
+
+fb7e2399ec17f1004c0e0ccfd17439f8759ede01 [TCP]: skb is unexpectedly freed.
+0aea76d35c9651d55bbaf746e7914e5f9ae5a25d tcp: SYN packets are now
+simply consumed
+
+Signed-off-by: Andrey Konovalov 
+Acked-by: Eric Dumazet 
+Signed-off-by: David S. Miller 
+---
+ net/dccp/input.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/net/dccp/input.c b/net/dccp/input.c
+index ba34718..8fedc2d 100644
+--- a/net/dccp/input.c
 b/net/dccp/input.c
+@@ -606,7 +606,8 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff 
*skb,
+   if (inet_csk(sk)->icsk_af_ops->conn_request(sk,
+   skb) < 0)
+   return 1;
+-  goto discard;
++  consume_skb(skb);
++  return 0;
+   }
+   if (dh->dccph_type == DCCP_PKT_RESET)
+   goto discard;
+-- 
+cgit v0.12
+



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

2017-01-18 Thread Alice Ferrazzi
commit: d98fbf46c2bf583f517b78dda8df9422fdffe1b2
Author: Alice Ferrazzi  gentoo  org>
AuthorDate: Wed Jan 18 23:49:33 2017 +
Commit: Alice Ferrazzi  gentoo  org>
CommitDate: Wed Jan 18 23:49:33 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=d98fbf46

Linux patch 4.1.38

 _README |4 +
 1037_linux-4.1.38.patch | 2415 +++
 2 files changed, 2419 insertions(+)

diff --git a/_README b/_README
index e28d8f1..061bd5e 100644
--- a/_README
+++ b/_README
@@ -191,6 +191,10 @@ Patch:  1036_linux-4.1.37.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.37
 
+Patch:  1037_linux-4.1.38.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.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-4.1.38.patch b/1037_linux-4.1.38.patch
new file mode 100644
index 000..a0b5049
--- /dev/null
+++ b/1037_linux-4.1.38.patch
@@ -0,0 +1,2415 @@
+diff --git a/Documentation/virtual/kvm/api.txt 
b/Documentation/virtual/kvm/api.txt
+index 9fa2bf8c3f6f..7830f1c34a7d 100644
+--- a/Documentation/virtual/kvm/api.txt
 b/Documentation/virtual/kvm/api.txt
+@@ -1955,6 +1955,7 @@ registers, find a list below:
+   PPC   | KVM_REG_PPC_TM_VSCR   | 32
+   PPC   | KVM_REG_PPC_TM_DSCR   | 64
+   PPC   | KVM_REG_PPC_TM_TAR| 64
++  PPC   | KVM_REG_PPC_TM_XER| 64
+ |   |
+   MIPS  | KVM_REG_MIPS_R0   | 64
+   ...
+diff --git a/Makefile b/Makefile
+index df72b644f78c..1aba5352e0bd 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 37
++SUBLEVEL = 38
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
+index 7d0f07020c80..ab19044815f5 100644
+--- a/arch/arm/xen/enlighten.c
 b/arch/arm/xen/enlighten.c
+@@ -218,8 +218,7 @@ static int __init xen_guest_init(void)
+* for secondary CPUs as they are brought up.
+* For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
+*/
+-  xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
+- sizeof(struct vcpu_info));
++  xen_vcpu_info = alloc_percpu(struct vcpu_info);
+   if (xen_vcpu_info == NULL)
+   return -ENOMEM;
+ 
+diff --git a/arch/powerpc/boot/ps3-head.S b/arch/powerpc/boot/ps3-head.S
+index b6fcbaf5027b..3dc44b05fb97 100644
+--- a/arch/powerpc/boot/ps3-head.S
 b/arch/powerpc/boot/ps3-head.S
+@@ -57,11 +57,6 @@ __system_reset_overlay:
+   bctr
+ 
+ 1:
+-  /* Save the value at addr zero for a null pointer write check later. */
+-
+-  li  r4, 0
+-  lwz r3, 0(r4)
+-
+   /* Primary delays then goes to _zimage_start in wrapper. */
+ 
+   or  31, 31, 31 /* db16cyc */
+diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c
+index 4ec2d86d3c50..a05558a7e51a 100644
+--- a/arch/powerpc/boot/ps3.c
 b/arch/powerpc/boot/ps3.c
+@@ -119,13 +119,12 @@ void ps3_copy_vectors(void)
+   flush_cache((void *)0x100, 512);
+ }
+ 
+-void platform_init(unsigned long null_check)
++void platform_init(void)
+ {
+   const u32 heapsize = 0x100 - (u32)_end; /* 16MiB */
+   void *chosen;
+   unsigned long ft_addr;
+   u64 rm_size;
+-  unsigned long val;
+ 
+   console_ops.write = ps3_console_write;
+   platform_ops.exit = ps3_exit;
+@@ -153,11 +152,6 @@ void platform_init(unsigned long null_check)
+ 
+   printf(" flat tree at 0x%lx\n\r", ft_addr);
+ 
+-  val = *(unsigned long *)0;
+-
+-  if (val != null_check)
+-  printf("null check failed: %lx != %lx\n\r", val, null_check);
+-
+   ((kernel_entry_t)0)(ft_addr, 0, NULL);
+ 
+   ps3_exit();
+diff --git a/arch/powerpc/include/asm/kvm_host.h 
b/arch/powerpc/include/asm/kvm_host.h
+index a193a13cf08b..7fe65af0035d 100644
+--- a/arch/powerpc/include/asm/kvm_host.h
 b/arch/powerpc/include/asm/kvm_host.h
+@@ -532,6 +532,7 @@ struct kvm_vcpu_arch {
+   u64 tfiar;
+ 
+   u32 cr_tm;
++  u64 xer_tm;
+   u64 lr_tm;
+   u64 ctr_tm;
+   u64 amr_tm;
+diff --git a/arch/powerpc/include/uapi/asm/kvm.h 
b/arch/powerpc/include/uapi/asm/kvm.h
+index ab4d4732c492..720b71a636c8 100644
+--- a/arch/powerpc/include/uapi/asm/kvm.h
 b/arch/powerpc/include/uapi/asm/kvm.h
+@@ -587,6 +587,7 @@ struct kvm_get_htab_header {
+ #define KVM_REG_PPC_TM_VSCR   (KVM_REG_PPC_TM | KVM_REG_SIZE_U32 | 0x67)
+ #define KVM_REG_PPC_TM_DSCR   (KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x68)
+ #define KVM_REG_PPC_TM_TAR(KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x69)
++#define KVM_REG_PPC_TM_XER(KVM_REG_PPC_TM | KVM_REG_SIZE_U64 | 0x6a)
+ 
+ /* PPC64 eXternal Interrupt Controller Specification */
+ #define KVM_DEV_XICS_GRP_SOURCES  

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

2017-01-09 Thread Alice Ferrazzi
commit: 3f861dc13e810781883d0f1cfe33a821ee3504f8
Author: Alice Ferrazzi  gentoo  org>
AuthorDate: Tue Jan 10 04:07:56 2017 +
Commit: Alice Ferrazzi  gentoo  org>
CommitDate: Tue Jan 10 04:07:56 2017 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=3f861dc1

Linux patch 4.1.37

 _README  |8 +-
 1036_linux-4.1.37.patch  | 2732 ++
 1520_fix-race-condition-in-packet-set-ring.patch |   62 -
 3 files changed, 2736 insertions(+), 66 deletions(-)

diff --git a/_README b/_README
index 7e1cb6f..e28d8f1 100644
--- a/_README
+++ b/_README
@@ -187,6 +187,10 @@ Patch:  1035_linux-4.1.36.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.36
 
+Patch:  1036_linux-4.1.37.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.37
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.
@@ -195,10 +199,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:  1800_fix-lru-cache-add-oom-regression.patch
 From:   http://thread.gmane.org/gmane.linux.kernel.stable/184384
 Desc:   Revert commit 8f182270dfec mm/swap.c: flush lru pvecs on compound page 
arrival to fix OOM error.

diff --git a/1036_linux-4.1.37.patch b/1036_linux-4.1.37.patch
new file mode 100644
index 000..c9fbe6d
--- /dev/null
+++ b/1036_linux-4.1.37.patch
@@ -0,0 +1,2732 @@
+diff --git a/Documentation/arm/CCN.txt b/Documentation/arm/CCN.txt
+index 0632b3aad83e..715776f06df6 100644
+--- a/Documentation/arm/CCN.txt
 b/Documentation/arm/CCN.txt
+@@ -38,7 +38,7 @@ Example of perf tool use:
+ / # perf list | grep ccn
+   ccn/cycles/[Kernel PMU event]
+ <...>
+-  ccn/xp_valid_flit/ [Kernel PMU event]
++  ccn/xp_valid_flit,xp=?,port=?,vc=?,dir=?/  [Kernel PMU event]
+ <...>
+ 
+ / # perf stat -C 0 -e ccn/cycles/,ccn/xp_valid_flit,xp=1,port=0,vc=1,dir=1/ \
+diff --git a/Documentation/filesystems/porting 
b/Documentation/filesystems/porting
+index e69274de8d0c..0500895b768f 100644
+--- a/Documentation/filesystems/porting
 b/Documentation/filesystems/porting
+@@ -287,8 +287,8 @@ implementing on-disk size changes.  Start with a copy of 
the old inode_setattr
+ and vmtruncate, and the reorder the vmtruncate + foofs_vmtruncate sequence to
+ be in order of zeroing blocks using block_truncate_page or similar helpers,
+ size update and on finally on-disk truncation which should not fail.
+-inode_change_ok now includes the size checks for ATTR_SIZE and must be called
+-in the beginning of ->setattr unconditionally.
++setattr_prepare (which used to be inode_change_ok) now includes the size 
checks
++for ATTR_SIZE and must be called in the beginning of ->setattr 
unconditionally.
+ 
+ [mandatory]
+ 
+diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt
+index 302b5ed616a6..35e17f748ca7 100644
+--- a/Documentation/sysctl/fs.txt
 b/Documentation/sysctl/fs.txt
+@@ -265,6 +265,13 @@ aio-nr can grow to.
+ 
+ ==
+ 
++mount-max:
++
++This denotes the maximum number of mounts that may exist
++in a mount namespace.
++
++==
++
+ 
+ 2. /proc/sys/fs/binfmt_misc
+ --
+diff --git a/Makefile b/Makefile
+index aa9fbee620ff..df72b644f78c 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 36
++SUBLEVEL = 37
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/include/asm/dma-mapping.h 
b/arch/arm/include/asm/dma-mapping.h
+index b52101d37ec7..ee21eecbe0d2 100644
+--- a/arch/arm/include/asm/dma-mapping.h
 b/arch/arm/include/asm/dma-mapping.h
+@@ -117,7 +117,7 @@ static inline dma_addr_t virt_to_dma(struct device *dev, 
void *addr)
+ /* The ARM override for dma_max_pfn() */
+ static inline unsigned long dma_max_pfn(struct device *dev)
+ {
+-  return PHYS_PFN_OFFSET + dma_to_pfn(dev, *dev->dma_mask);
++  return dma_to_pfn(dev, *dev->dma_mask);
+ }
+ #define dma_max_pfn(dev) dma_max_pfn(dev)
+ 
+diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
+index cd791948b286..7e459b7ee708 100644
+--- a/arch/x86/include/asm/tlbflush.h
 b/arch/x86/include/asm/tlbflush.h
+@@ -32,7 +32,7 @@ 

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

2016-12-07 Thread Mike Pagano
commit: ef9c8970cb2c6c361f43617cc4de9528a6159b8a
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Dec  8 00:43:10 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Dec  8 00:43:10 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ef9c8970

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 87cf515..7e1cb6f 100644
--- a/_README
+++ b/_README
@@ -195,6 +195,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:  1800_fix-lru-cache-add-oom-regression.patch
 From:   http://thread.gmane.org/gmane.linux.kernel.stable/184384
 Desc:   Revert commit 8f182270dfec mm/swap.c: flush lru pvecs on compound page 
arrival to fix OOM error.

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:4.1 commit in: /

2016-11-30 Thread Mike Pagano
commit: 5eab8276b7a473c02bb93990416e06e7c0bb7f5f
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Nov 30 11:45:51 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Nov 30 11:45:51 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=5eab8276

Linux patch 4.1.36

 _README |4 +
 1035_linux-4.1.36.patch | 2346 +++
 2 files changed, 2350 insertions(+)

diff --git a/_README b/_README
index 5bb6b6b..87cf515 100644
--- a/_README
+++ b/_README
@@ -183,6 +183,10 @@ Patch:  1034_linux-4.1.35.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.35
 
+Patch:  1035_linux-4.1.36.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.36
+
 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/1035_linux-4.1.36.patch b/1035_linux-4.1.36.patch
new file mode 100644
index 000..57e0271
--- /dev/null
+++ b/1035_linux-4.1.36.patch
@@ -0,0 +1,2346 @@
+diff --git a/Documentation/x86/exception-tables.txt 
b/Documentation/x86/exception-tables.txt
+index 32901aa36f0a..e396bcd8d830 100644
+--- a/Documentation/x86/exception-tables.txt
 b/Documentation/x86/exception-tables.txt
+@@ -290,3 +290,38 @@ Due to the way that the exception table is built and 
needs to be ordered,
+ only use exceptions for code in the .text section.  Any other section
+ will cause the exception table to not be sorted correctly, and the
+ exceptions will fail.
++
++Things changed when 64-bit support was added to x86 Linux. Rather than
++double the size of the exception table by expanding the two entries
++from 32-bits to 64 bits, a clever trick was used to store addresses
++as relative offsets from the table itself. The assembly code changed
++from:
++  .long 1b,3b
++to:
++.long (from) - .
++.long (to) - .
++
++and the C-code that uses these values converts back to absolute addresses
++like this:
++
++  ex_insn_addr(const struct exception_table_entry *x)
++  {
++  return (unsigned long)>insn + x->insn;
++  }
++
++In v4.6 the exception table entry was expanded with a new field "handler".
++This is also 32-bits wide and contains a third relative function
++pointer which points to one of:
++
++1) int ex_handler_default(const struct exception_table_entry *fixup)
++   This is legacy case that just jumps to the fixup code
++2) int ex_handler_fault(const struct exception_table_entry *fixup)
++   This case provides the fault number of the trap that occurred at
++   entry->insn. It is used to distinguish page faults from machine
++   check.
++3) int ex_handler_ext(const struct exception_table_entry *fixup)
++   This case is used for uaccess_err ... we need to set a flag
++   in the task structure. Before the handler functions existed this
++   case was handled by adding a large offset to the fixup to tag
++   it as special.
++More functions can easily be added.
+diff --git a/Makefile b/Makefile
+index 21f657f2c4e6..aa9fbee620ff 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 35
++SUBLEVEL = 36
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+@@ -610,6 +610,8 @@ all: vmlinux
+ include arch/$(SRCARCH)/Makefile
+ 
+ KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
++KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
++KBUILD_AFLAGS += $(call cc-option,-fno-PIE)
+ 
+ ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
+ KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
+diff --git a/arch/arm/include/asm/kvm_emulate.h 
b/arch/arm/include/asm/kvm_emulate.h
+index a9c80a2ea1a7..642934a5ae9b 100644
+--- a/arch/arm/include/asm/kvm_emulate.h
 b/arch/arm/include/asm/kvm_emulate.h
+@@ -131,6 +131,11 @@ static inline bool kvm_vcpu_dabt_iss1tw(struct kvm_vcpu 
*vcpu)
+   return kvm_vcpu_get_hsr(vcpu) & HSR_DABT_S1PTW;
+ }
+ 
++static inline bool kvm_vcpu_dabt_is_cm(struct kvm_vcpu *vcpu)
++{
++  return !!(kvm_vcpu_get_hsr(vcpu) & HSR_DABT_CM);
++}
++
+ /* Get Access Size from a data abort */
+ static inline int kvm_vcpu_dabt_get_as(struct kvm_vcpu *vcpu)
+ {
+diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c
+index a33af44230da..4681b6832d9f 100644
+--- a/arch/arm/kvm/mmu.c
 b/arch/arm/kvm/mmu.c
+@@ -1435,6 +1435,22 @@ int kvm_handle_guest_abort(struct kvm_vcpu *vcpu, 
struct kvm_run *run)
+   }
+ 
+   /*
++   * Check for a cache maintenance operation. Since we
++   * ended-up here, we know it is outside of any memory
++   * slot. But we can't find out if that is for a device,
++   * or if the guest is just being stupid. The only thing
++   * we know for sure is that this range cannot be cached.
++   *
++   * So let's assume that the guest is just being
++   * cautious, and skip the instruction.
++

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

2016-11-23 Thread Mike Pagano
commit: bde6e65e58795d11ff0054877b4a2363df426327
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Nov 23 11:25:01 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Nov 23 11:25:01 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=bde6e65e

Update gentoo kconfig patch for GENTOO_LINUX_INIT_SYSTEMD. See bug #598623

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

diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch
index 499b21f..acb0972 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  2016-07-01 11:23:26.087932647 -0400
-+++ b/distro/Kconfig   2016-07-01 19:32:35.581415519 -0400
-@@ -0,0 +1,134 @@
+--- /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
@@ -33,6 +33,7 @@
 +
 +  select DEVTMPFS
 +  select TMPFS
++  select UNIX
 +
 +  select MMU
 +  select SHMEM
@@ -112,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 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:4.1 commit in: /

2016-10-28 Thread Mike Pagano
commit: 880d575a3330d9626698dd16935b7b664d62739d
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Oct 28 10:19:17 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Oct 28 10:19:17 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=880d575a

Linux patch 4.1.35

 _README |   4 +
 1034_linux-4.1.35.patch | 215 
 2 files changed, 219 insertions(+)

diff --git a/_README b/_README
index 72df015..5bb6b6b 100644
--- a/_README
+++ b/_README
@@ -179,6 +179,10 @@ Patch:  1033_linux-4.1.34.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.34
 
+Patch:  1034_linux-4.1.35.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.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-4.1.35.patch b/1034_linux-4.1.35.patch
new file mode 100644
index 000..cfb75c7
--- /dev/null
+++ b/1034_linux-4.1.35.patch
@@ -0,0 +1,215 @@
+diff --git a/Makefile b/Makefile
+index 2d4dea4b3107..21f657f2c4e6 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 34
++SUBLEVEL = 35
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
+index cc1993c5556e..9d781d3ccc09 100644
+--- a/drivers/usb/host/xhci-hub.c
 b/drivers/usb/host/xhci-hub.c
+@@ -619,8 +619,30 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd,
+   if ((raw_port_status & PORT_RESET) ||
+   !(raw_port_status & PORT_PE))
+   return 0x;
+-  if (time_after_eq(jiffies,
+-  bus_state->resume_done[wIndex])) {
++  /* did port event handler already start resume timing? */
++  if (!bus_state->resume_done[wIndex]) {
++  /* If not, maybe we are in a host initated resume? */
++  if (test_bit(wIndex, _state->resuming_ports)) {
++  /* Host initated resume doesn't time the resume
++   * signalling using resume_done[].
++   * It manually sets RESUME state, sleeps 20ms
++   * and sets U0 state. This should probably be
++   * changed, but not right now.
++   */
++  } else {
++  /* port resume was discovered now and here,
++   * start resume timing
++   */
++  unsigned long timeout = jiffies +
++  msecs_to_jiffies(USB_RESUME_TIMEOUT);
++
++  set_bit(wIndex, _state->resuming_ports);
++  bus_state->resume_done[wIndex] = timeout;
++  mod_timer(>rh_timer, timeout);
++  }
++  /* Has resume been signalled for USB_RESUME_TIME yet? */
++  } else if (time_after_eq(jiffies,
++   bus_state->resume_done[wIndex])) {
+   int time_left;
+ 
+   xhci_dbg(xhci, "Resume USB2 port %d\n",
+@@ -661,13 +683,24 @@ static u32 xhci_get_port_status(struct usb_hcd *hcd,
+   } else {
+   /*
+* The resume has been signaling for less than
+-   * 20ms. Report the port status as SUSPEND,
+-   * let the usbcore check port status again
+-   * and clear resume signaling later.
++   * USB_RESUME_TIME. Report the port status as SUSPEND,
++   * let the usbcore check port status again and clear
++   * resume signaling later.
+*/
+   status |= USB_PORT_STAT_SUSPEND;
+   }
+   }
++  /*
++   * Clear stale usb2 resume signalling variables in case port changed
++   * state during resume signalling. For example on error
++   */
++  if ((bus_state->resume_done[wIndex] ||
++   test_bit(wIndex, _state->resuming_ports)) &&
++  (raw_port_status & PORT_PLS_MASK) != XDEV_U3 &&
++  (raw_port_status & PORT_PLS_MASK) != XDEV_RESUME) {
++  bus_state->resume_done[wIndex] = 0;
++  clear_bit(wIndex, _state->resuming_ports);
++  }
+   if ((raw_port_status & PORT_PLS_MASK) == XDEV_U0
+   && (raw_port_status & PORT_POWER)
+   && (bus_state->suspended_ports & (1 << wIndex))) {
+@@ -998,6 +1031,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, 
u16 wValue,
+   if ((temp & PORT_PE) == 0)
+  

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

2016-10-12 Thread Mike Pagano
commit: 4635b6f052c8eab94dec6e8fbb7dbbc8905f83eb
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Oct 12 19:52:44 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Oct 12 19:52:44 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=4635b6f0

Linux patch 4.1.34

 _README |4 +
 1033_linux-4.1.34.patch | 3255 +++
 2 files changed, 3259 insertions(+)

diff --git a/_README b/_README
index 9a2fbfa..72df015 100644
--- a/_README
+++ b/_README
@@ -175,6 +175,10 @@ Patch:  1032_linux-4.1.33.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.33
 
+Patch:  1033_linux-4.1.34.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.34
+
 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/1033_linux-4.1.34.patch b/1033_linux-4.1.34.patch
new file mode 100644
index 000..fffc6fa
--- /dev/null
+++ b/1033_linux-4.1.34.patch
@@ -0,0 +1,3255 @@
+diff --git a/Makefile b/Makefile
+index 47c47d7c0926..2d4dea4b3107 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 33
++SUBLEVEL = 34
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/alpha/include/asm/uaccess.h 
b/arch/alpha/include/asm/uaccess.h
+index 9b0d40093c9a..c0ddbbf73400 100644
+--- a/arch/alpha/include/asm/uaccess.h
 b/arch/alpha/include/asm/uaccess.h
+@@ -371,14 +371,6 @@ __copy_tofrom_user_nocheck(void *to, const void *from, 
long len)
+   return __cu_len;
+ }
+ 
+-extern inline long
+-__copy_tofrom_user(void *to, const void *from, long len, const void __user 
*validate)
+-{
+-  if (__access_ok((unsigned long)validate, len, get_fs()))
+-  len = __copy_tofrom_user_nocheck(to, from, len);
+-  return len;
+-}
+-
+ #define __copy_to_user(to, from, n)   \
+ ({\
+   __chk_user_ptr(to); \
+@@ -393,17 +385,22 @@ __copy_tofrom_user(void *to, const void *from, long len, 
const void __user *vali
+ #define __copy_to_user_inatomic __copy_to_user
+ #define __copy_from_user_inatomic __copy_from_user
+ 
+-
+ extern inline long
+ copy_to_user(void __user *to, const void *from, long n)
+ {
+-  return __copy_tofrom_user((__force void *)to, from, n, to);
++  if (likely(__access_ok((unsigned long)to, n, get_fs(
++  n = __copy_tofrom_user_nocheck((__force void *)to, from, n);
++  return n;
+ }
+ 
+ extern inline long
+ copy_from_user(void *to, const void __user *from, long n)
+ {
+-  return __copy_tofrom_user(to, (__force void *)from, n, from);
++  if (likely(__access_ok((unsigned long)from, n, get_fs(
++  n = __copy_tofrom_user_nocheck(to, (__force void *)from, n);
++  else
++  memset(to, 0, n);
++  return n;
+ }
+ 
+ extern void __do_clear_user(void);
+diff --git a/arch/arc/include/asm/uaccess.h b/arch/arc/include/asm/uaccess.h
+index 30c9baffa96f..08770c750696 100644
+--- a/arch/arc/include/asm/uaccess.h
 b/arch/arc/include/asm/uaccess.h
+@@ -83,7 +83,10 @@
+   "2: ;nop\n" \
+   "   .section .fixup, \"ax\"\n"  \
+   "   .align 4\n" \
+-  "3: mov %0, %3\n"   \
++  "3: # return -EFAULT\n" \
++  "   mov %0, %3\n"   \
++  "   # zero out dst ptr\n"   \
++  "   mov %1,  0\n"   \
+   "   j   2b\n"   \
+   "   .previous\n"\
+   "   .section __ex_table, \"a\"\n"   \
+@@ -101,7 +104,11 @@
+   "2: ;nop\n" \
+   "   .section .fixup, \"ax\"\n"  \
+   "   .align 4\n" \
+-  "3: mov %0, %3\n"   \
++  "3: # return -EFAULT\n" \
++  "   mov %0, %3\n"   \
++  "   # zero out dst ptr\n"   \
++  "   mov %1,  0\n"   \
++  "   mov %R1, 0\n"   \
+   "   j   2b\n"   \
+   "   .previous\n"\
+   "   .section __ex_table, \"a\"\n"   \
+diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts 
b/arch/arm/boot/dts/kirkwood-ib62x0.dts
+index bfa5edde179c..2c1e7f09205f 100644
+--- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
 b/arch/arm/boot/dts/kirkwood-ib62x0.dts
+@@ -113,7 +113,7 @@
+ 
+   partition@e {
+   label = "u-boot environment";
+-  reg = <0xe 0x10>;
++  reg = <0xe 0x2>;
+   };
+ 
+   partition@10 {
+diff --git a/arch/arm/boot/dts/stih410.dtsi b/arch/arm/boot/dts/stih410.dtsi
+index 

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

2016-09-18 Thread Mike Pagano
commit: 859d270f730c3d0b708c6cc88ddfc3ed97fc5b3a
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Sep 18 12:47:05 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Sep 18 12:47:05 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=859d270f

Linux patch 4.1.32. Linux patch 4.1.33

 _README |8 +
 1031_linux-4.1.32.patch | 1489 +++
 1032_linux-4.1.33.patch |  982 +++
 3 files changed, 2479 insertions(+)

diff --git a/_README b/_README
index 0ce7ab6..9a2fbfa 100644
--- a/_README
+++ b/_README
@@ -167,6 +167,14 @@ Patch:  1030_linux-4.1.31.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.31
 
+Patch:  1031_linux-4.1.32.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.32
+
+Patch:  1032_linux-4.1.33.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.33
+
 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/1031_linux-4.1.32.patch b/1031_linux-4.1.32.patch
new file mode 100644
index 000..87bef87
--- /dev/null
+++ b/1031_linux-4.1.32.patch
@@ -0,0 +1,1489 @@
+diff --git a/Makefile b/Makefile
+index bea5ca2ca2b0..e995f28b6d37 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 31
++SUBLEVEL = 32
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arc/include/asm/entry.h b/arch/arc/include/asm/entry.h
+index 884081099f80..81cdbc36699b 100644
+--- a/arch/arc/include/asm/entry.h
 b/arch/arc/include/asm/entry.h
+@@ -143,8 +143,6 @@
+   POP r13
+ .endm
+ 
+-#define OFF_USER_R25_FROM_R24 (SZ_CALLEE_REGS + SZ_PT_REGS - 8)/4
+-
+ /*--
+  * Collect User Mode callee regs as struct callee_regs - needed by
+  * fork/do_signal/unaligned-access-emulation.
+@@ -157,12 +155,13 @@
+  *-*/
+ .macro SAVE_CALLEE_SAVED_USER
+ 
++  mov r12, sp ; save SP as ref to pt_regs
+   SAVE_R13_TO_R24
+ 
+ #ifdef CONFIG_ARC_CURR_IN_REG
+-  ; Retrieve orig r25 and save it on stack
+-  ld.as   r12, [sp, OFF_USER_R25_FROM_R24]
+-  st.ar12, [sp, -4]
++  ; Retrieve orig r25 and save it with rest of callee_regs
++  ld  r12, [r12, PT_user_r25]
++  PUSHr12
+ #else
+   PUSHr25
+ #endif
+@@ -209,12 +208,16 @@
+ .macro RESTORE_CALLEE_SAVED_USER
+ 
+ #ifdef CONFIG_ARC_CURR_IN_REG
+-  ld.ab   r12, [sp, 4]
+-  st.as   r12, [sp, OFF_USER_R25_FROM_R24]
++  POP r12
+ #else
+   POP r25
+ #endif
+   RESTORE_R24_TO_R13
++
++  ; SP is back to start of pt_regs
++#ifdef CONFIG_ARC_CURR_IN_REG
++  st  r12, [sp, PT_user_r25]
++#endif
+ .endm
+ 
+ /*--
+diff --git a/arch/arc/include/asm/irqflags.h b/arch/arc/include/asm/irqflags.h
+index 27ecc6975a58..853a80ee7aaa 100644
+--- a/arch/arc/include/asm/irqflags.h
 b/arch/arc/include/asm/irqflags.h
+@@ -168,10 +168,10 @@ static inline int arch_irqs_disabled(void)
+ .endm
+ 
+ .macro IRQ_ENABLE  scratch
++  TRACE_ASM_IRQ_ENABLE
+   lr  \scratch, [status32]
+   or  \scratch, \scratch, (STATUS_E1_MASK | STATUS_E2_MASK)
+   flag\scratch
+-  TRACE_ASM_IRQ_ENABLE
+ .endm
+ 
+ #endif/* __ASSEMBLY__ */
+diff --git a/arch/arc/include/uapi/asm/elf.h b/arch/arc/include/uapi/asm/elf.h
+index 0f99ac8fcbb2..0037a587320d 100644
+--- a/arch/arc/include/uapi/asm/elf.h
 b/arch/arc/include/uapi/asm/elf.h
+@@ -13,8 +13,15 @@
+ 
+ /* Machine specific ELF Hdr flags */
+ #define EF_ARC_OSABI_MSK  0x0f00
+-#define EF_ARC_OSABI_ORIG 0x   /* MUST be zero for back-compat */
+-#define EF_ARC_OSABI_CURRENT  0x0300   /* v3 (no legacy syscalls) */
++
++#define EF_ARC_OSABI_V3   0x0300   /* v3 (no legacy syscalls) 
*/
++#define EF_ARC_OSABI_V4   0x0400   /* v4 (64bit data any reg 
align) */
++
++#if __GNUC__ < 6
++#define EF_ARC_OSABI_CURRENT  EF_ARC_OSABI_V3
++#else
++#define EF_ARC_OSABI_CURRENT  EF_ARC_OSABI_V4
++#endif
+ 
+ typedef unsigned long elf_greg_t;
+ typedef unsigned long elf_fpregset_t;
+diff --git a/arch/arc/kernel/arcksyms.c b/arch/arc/kernel/arcksyms.c
+index 4d9e77724bed..000dd041ab42 100644
+--- a/arch/arc/kernel/arcksyms.c
 b/arch/arc/kernel/arcksyms.c
+@@ -28,6 +28,7 @@ extern void __muldf3(void);
+ extern void __divdf3(void);
+ extern void __floatunsidf(void);
+ extern void __floatunsisf(void);
++extern void __udivdi3(void);
+ 
+ EXPORT_SYMBOL(__ashldi3);
+ EXPORT_SYMBOL(__ashrdi3);
+@@ -45,6 +46,7 @@ EXPORT_SYMBOL(__muldf3);
+ EXPORT_SYMBOL(__divdf3);
+ EXPORT_SYMBOL(__floatunsidf);
+ EXPORT_SYMBOL(__floatunsisf);
++EXPORT_SYMBOL(__udivdi3);
+ 
+ /* ARC optimised assembler routines */
+ 

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

2016-08-10 Thread Mike Pagano
commit: 77a30b98a82b92f4edee8de7f15ac9022397d4a7
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Aug 10 12:55:32 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Aug 10 12:55:32 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=77a30b98

Linux patch 4.1.30

 _README |4 +
 1029_linux-4.1.30.patch | 1516 +++
 2 files changed, 1520 insertions(+)

diff --git a/_README b/_README
index a9101d3..f04d74d 100644
--- a/_README
+++ b/_README
@@ -159,6 +159,10 @@ Patch:  1028_linux-4.1.29.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.29
 
+Patch:  1029_linux-4.1.30.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.30
+
 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/1029_linux-4.1.30.patch b/1029_linux-4.1.30.patch
new file mode 100644
index 000..18a058f
--- /dev/null
+++ b/1029_linux-4.1.30.patch
@@ -0,0 +1,1516 @@
+diff --git a/Makefile b/Makefile
+index 76fa21fa16b8..137679c0cc49 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 29
++SUBLEVEL = 30
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
+index e46e9ea1e187..0ee54cd9bf0b 100644
+--- a/arch/arm/mach-mvebu/coherency.c
 b/arch/arm/mach-mvebu/coherency.c
+@@ -116,22 +116,16 @@ static void __init armada_370_coherency_init(struct 
device_node *np)
+ }
+ 
+ /*
+- * This ioremap hook is used on Armada 375/38x to ensure that PCIe
+- * memory areas are mapped as MT_UNCACHED instead of MT_DEVICE. This
+- * is needed as a workaround for a deadlock issue between the PCIe
+- * interface and the cache controller.
++ * This ioremap hook is used on Armada 375/38x to ensure that all MMIO
++ * areas are mapped as MT_UNCACHED instead of MT_DEVICE. This is
++ * needed for the HW I/O coherency mechanism to work properly without
++ * deadlock.
+  */
+ static void __iomem *
+-armada_pcie_wa_ioremap_caller(phys_addr_t phys_addr, size_t size,
+-unsigned int mtype, void *caller)
++armada_wa_ioremap_caller(phys_addr_t phys_addr, size_t size,
++   unsigned int mtype, void *caller)
+ {
+-  struct resource pcie_mem;
+-
+-  mvebu_mbus_get_pcie_mem_aperture(_mem);
+-
+-  if (pcie_mem.start <= phys_addr && (phys_addr + size) <= pcie_mem.end)
+-  mtype = MT_UNCACHED;
+-
++  mtype = MT_UNCACHED;
+   return __arm_ioremap_caller(phys_addr, size, mtype, caller);
+ }
+ 
+@@ -140,7 +134,7 @@ static void __init armada_375_380_coherency_init(struct 
device_node *np)
+   struct device_node *cache_dn;
+ 
+   coherency_cpu_base = of_iomap(np, 0);
+-  arch_ioremap_caller = armada_pcie_wa_ioremap_caller;
++  arch_ioremap_caller = armada_wa_ioremap_caller;
+ 
+   /*
+* We should switch the PL310 to I/O coherency mode only if
+diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
+index 49b52035226c..be73c491182b 100644
+--- a/arch/mips/kernel/setup.c
 b/arch/mips/kernel/setup.c
+@@ -686,9 +686,6 @@ static void __init arch_mem_init(char **cmdline_p)
+   for_each_memblock(reserved, reg)
+   if (reg->size != 0)
+   reserve_bootmem(reg->base, reg->size, BOOTMEM_DEFAULT);
+-
+-  reserve_bootmem_region(__pa_symbol(&__nosave_begin),
+-  __pa_symbol(&__nosave_end)); /* Reserve for hibernation 
*/
+ }
+ 
+ static void __init resource_init(void)
+diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
+index 71c7ace855d7..1d71181dcc04 100644
+--- a/arch/sparc/mm/init_64.c
 b/arch/sparc/mm/init_64.c
+@@ -1301,18 +1301,10 @@ static int __init numa_parse_sun4u(void)
+ 
+ static int __init bootmem_init_numa(void)
+ {
+-  int i, j;
+   int err = -1;
+ 
+   numadbg("bootmem_init_numa()\n");
+ 
+-  /* Some sane defaults for numa latency values */
+-  for (i = 0; i < MAX_NUMNODES; i++) {
+-  for (j = 0; j < MAX_NUMNODES; j++)
+-  numa_latency[i][j] = (i == j) ?
+-  LOCAL_DISTANCE : REMOTE_DISTANCE;
+-  }
+-
+   if (numa_enabled) {
+   if (tlb_type == hypervisor)
+   err = numa_parse_mdesc();
+diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
+index fe9f0b79a18b..1390ecd8392a 100644
+--- a/arch/x86/kernel/early-quirks.c
 b/arch/x86/kernel/early-quirks.c
+@@ -11,7 +11,11 @@
+ 
+ #include 
+ #include 
++#include 
++#include 
+ #include 
++#include 
++#include 
+ #include 
+ #include 
+ #include 
+@@ -21,6 +25,9 @@
+ #include 
+ #include 
+ #include 
++#include 
++
++#define dev_err(msg)  pr_err("pci :%02x:%02x.%d: %s", bus, slot, func, 
msg)
+ 
+ static void __init 

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

2016-07-31 Thread Mike Pagano
commit: 1f9b6e4fcf4c1ec883981ad2404d0361ea65643d
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Jul 31 16:01:43 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Jul 31 16:01:43 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1f9b6e4f

Linux kernel 4.1.29

 _README |   4 +
 1028_linux-4.1.29.patch | 456 
 2 files changed, 460 insertions(+)

diff --git a/_README b/_README
index 88ef9f3..a9101d3 100644
--- a/_README
+++ b/_README
@@ -155,6 +155,10 @@ Patch:  1027_linux-4.1.28.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.28
 
+Patch:  1028_linux-4.1.29.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.29
+
 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/1028_linux-4.1.29.patch b/1028_linux-4.1.29.patch
new file mode 100644
index 000..998db23
--- /dev/null
+++ b/1028_linux-4.1.29.patch
@@ -0,0 +1,456 @@
+diff --git a/Makefile b/Makefile
+index 241237cd4ca6..76fa21fa16b8 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 28
++SUBLEVEL = 29
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
+index f33206e27d8d..2b697db33ca6 100644
+--- a/arch/mips/include/asm/pgtable.h
 b/arch/mips/include/asm/pgtable.h
+@@ -603,7 +603,8 @@ static inline struct page *pmd_page(pmd_t pmd)
+ 
+ static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot)
+ {
+-  pmd_val(pmd) = (pmd_val(pmd) & _PAGE_CHG_MASK) | pgprot_val(newprot);
++  pmd_val(pmd) = (pmd_val(pmd) & (_PAGE_CHG_MASK | _PAGE_HUGE)) |
++ (pgprot_val(newprot) & ~_PAGE_CHG_MASK);
+   return pmd;
+ }
+ 
+diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
+index 28dbbb0d12c4..9b19d96e9562 100644
+--- a/arch/powerpc/kernel/prom.c
 b/arch/powerpc/kernel/prom.c
+@@ -166,8 +166,7 @@ static struct ibm_pa_feature {
+* we don't want to turn on TM here, so we use the *_COMP versions
+* which are 0 if the kernel doesn't support TM.
+*/
+-  {CPU_FTR_TM_COMP, 0, 0,
+-   PPC_FEATURE2_HTM_COMP|PPC_FEATURE2_HTM_NOSC_COMP, 22, 0, 0},
++  {CPU_FTR_TM_COMP, 0, 0, PPC_FEATURE2_HTM_COMP, 22, 0, 0},
+ };
+ 
+ static void __init scan_features(unsigned long node, const unsigned char 
*ftrs,
+diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
+index 5caed1dd7ccf..80bb8c0349a7 100644
+--- a/arch/x86/kernel/amd_nb.c
 b/arch/x86/kernel/amd_nb.c
+@@ -71,8 +71,8 @@ int amd_cache_northbridges(void)
+   while ((misc = next_northbridge(misc, amd_nb_misc_ids)) != NULL)
+   i++;
+ 
+-  if (i == 0)
+-  return 0;
++  if (!i)
++  return -ENODEV;
+ 
+   nb = kzalloc(i * sizeof(struct amd_northbridge), GFP_KERNEL);
+   if (!nb)
+diff --git a/block/ioprio.c b/block/ioprio.c
+index 31666c92b46a..563435684c3c 100644
+--- a/block/ioprio.c
 b/block/ioprio.c
+@@ -149,8 +149,10 @@ static int get_task_ioprio(struct task_struct *p)
+   if (ret)
+   goto out;
+   ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);
++  task_lock(p);
+   if (p->io_context)
+   ret = p->io_context->ioprio;
++  task_unlock(p);
+ out:
+   return ret;
+ }
+diff --git a/drivers/gpio/gpio-sch.c b/drivers/gpio/gpio-sch.c
+index b72906f5b999..2d4766bd61c3 100644
+--- a/drivers/gpio/gpio-sch.c
 b/drivers/gpio/gpio-sch.c
+@@ -63,9 +63,8 @@ static unsigned sch_gpio_bit(struct sch_gpio *sch, unsigned 
gpio)
+   return gpio % 8;
+ }
+ 
+-static int sch_gpio_reg_get(struct gpio_chip *gc, unsigned gpio, unsigned reg)
++static int sch_gpio_reg_get(struct sch_gpio *sch, unsigned gpio, unsigned reg)
+ {
+-  struct sch_gpio *sch = to_sch_gpio(gc);
+   unsigned short offset, bit;
+   u8 reg_val;
+ 
+@@ -77,10 +76,9 @@ static int sch_gpio_reg_get(struct gpio_chip *gc, unsigned 
gpio, unsigned reg)
+   return reg_val;
+ }
+ 
+-static void sch_gpio_reg_set(struct gpio_chip *gc, unsigned gpio, unsigned 
reg,
++static void sch_gpio_reg_set(struct sch_gpio *sch, unsigned gpio, unsigned 
reg,
+int val)
+ {
+-  struct sch_gpio *sch = to_sch_gpio(gc);
+   unsigned short offset, bit;
+   u8 reg_val;
+ 
+@@ -100,14 +98,15 @@ static int sch_gpio_direction_in(struct gpio_chip *gc, 
unsigned gpio_num)
+   struct sch_gpio *sch = to_sch_gpio(gc);
+ 
+   spin_lock(>lock);
+-  sch_gpio_reg_set(gc, gpio_num, GIO, 1);
++  sch_gpio_reg_set(sch, gpio_num, GIO, 1);
+   spin_unlock(>lock);
+   return 0;
+ }
+ 
+ static int sch_gpio_get(struct gpio_chip *gc, unsigned gpio_num)
+ {
+-  return sch_gpio_reg_get(gc, gpio_num, GLV);
++  struct sch_gpio *sch = to_sch_gpio(gc);
++  

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

2016-07-15 Thread Mike Pagano
commit: 73336b381c437fb71c4316d2cffcae360c2fe541
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Jul 15 14:19:00 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Jul 15 14:19:00 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=73336b38

Revert commit 8f182270dfec mm/swap.c: flush lru pvecs on compound page arrival 
to fix OOM error.

 _README |  4 
 1800_fix-lru-cache-add-oom-regression.patch | 17 +
 2 files changed, 21 insertions(+)

diff --git a/_README b/_README
index 24c0a3c..88ef9f3 100644
--- a/_README
+++ b/_README
@@ -163,6 +163,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:  1800_fix-lru-cache-add-oom-regression.patch
+From:   http://thread.gmane.org/gmane.linux.kernel.stable/184384
+Desc:   Revert commit 8f182270dfec mm/swap.c: flush lru pvecs on compound page 
arrival to fix OOM error.
+
 Patch:  2700_ThinkPad-30-brightness-control-fix.patch
 From:   Seth Forshee 
 Desc:   ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads.

diff --git a/1800_fix-lru-cache-add-oom-regression.patch 
b/1800_fix-lru-cache-add-oom-regression.patch
new file mode 100644
index 000..f1ca64b
--- /dev/null
+++ b/1800_fix-lru-cache-add-oom-regression.patch
@@ -0,0 +1,17 @@
+Revert commit 8f182270dfec mm/swap.c: flush lru pvecs on compound page arrival 
to fix OOM error.
+
+Signed-off-by: Steven Rostedt  goodmis.org>
+---
+diff --git a/mm/swap.c b/mm/swap.c
+index b523f0a4cbfb..ab3b9c2dd783 100644
+--- a/mm/swap.c
 b/mm/swap.c
+ -631,7 +631,7  static void __lru_cache_add(struct 
page *page)
+struct pagevec *pvec = _cpu_var(lru_add_pvec);
+
+page_cache_get(page);
+-   if (!pagevec_space(pvec) || PageCompound(page))
++   if (!pagevec_add(pvec, page) || PageCompound(page))
+__pagevec_lru_add(pvec);
+put_cpu_var(lru_add_pvec);
+ }



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

2016-07-02 Thread Mike Pagano
commit: 69af2da49481a0d114da92c3cb339ce48617c9b7
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Jul  2 15:31:19 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Jul  2 15:31:19 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=69af2da4

Select SYSVIPC when GENTOO_LINUX_PORTAGE is selected. Dependency of IPC_NS. See 
bug #587736.

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

diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch
index c7af596..499b21f 100644
--- a/4567_distro-Gentoo-Kconfig.patch
+++ b/4567_distro-Gentoo-Kconfig.patch
@@ -1,5 +1,5 @@
 a/Kconfig
-+++ b/Kconfig
+--- 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"
 /dev/null
-+++ b/distro/Kconfig
-@@ -0,0 +1,131 @@
+--- /dev/null  2016-07-01 11:23:26.087932647 -0400
 b/distro/Kconfig   2016-07-01 19:32:35.581415519 -0400
+@@ -0,0 +1,134 @@
 +menu "Gentoo Linux"
 +
 +config GENTOO_LINUX
@@ -63,6 +63,7 @@
 +  select NAMESPACES
 +  select IPC_NS
 +  select NET_NS
++  select SYSVIPC
 +
 +  help
 +  This enables options required by various Portage FEATURES.
@@ -71,6 +72,8 @@
 +  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.



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

2016-07-01 Thread Mike Pagano
commit: da2e8e644edd67e41f173e6eb9d686d63fc532ed
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Jul  1 19:56:27 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Jul  1 19:56:27 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=da2e8e64

Update gcc 4.9+ optimization patch. Bug #587578

 ...-additional-cpu-optimizations-for-gcc-4.9.patch | 90 ++
 1 file changed, 57 insertions(+), 33 deletions(-)

diff --git a/5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch 
b/5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
index 418201d..d9729b2 100644
--- a/5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
+++ b/5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
@@ -21,11 +21,12 @@ bug report to see if I'm right: 
https://bugzilla.kernel.org/show_bug.cgi?id=7746
 This patch will expand the number of microarchitectures to include newer
 processors including: AMD K10-family, AMD Family 10h (Barcelona), AMD Family
 14h (Bobcat), AMD Family 15h (Bulldozer), AMD Family 15h (Piledriver), AMD
-Family 16h (Jaguar), Intel 1st Gen Core i3/i5/i7 (Nehalem), Intel 1.5 Gen Core
-i3/i5/i7 (Westmere), Intel 2nd Gen Core i3/i5/i7 (Sandybridge), Intel 3rd Gen
-Core i3/i5/i7 (Ivybridge), Intel 4th Gen Core i3/i5/i7 (Haswell), Intel 5th
-Gen Core i3/i5/i7 (Broadwell), and the low power Silvermont series of Atom
-processors (Silvermont). It also offers the compiler the 'native' flag.
+Family 15h (Steamroller), Family 16h (Jaguar), Intel 1st Gen Core i3/i5/i7
+(Nehalem), Intel 1.5 Gen Core i3/i5/i7 (Westmere), Intel 2nd Gen Core i3/i5/i7
+(Sandybridge), Intel 3rd Gen Core i3/i5/i7 (Ivybridge), Intel 4th Gen Core
+i3/i5/i7 (Haswell), Intel 5th Gen Core i3/i5/i7 (Broadwell), and the low power
+Silvermont series of Atom processors (Silvermont). It also offers the compiler
+the 'native' flag.
 
 Small but real speed increases are measurable using a make endpoint comparing
 a generic kernel to one built with one of the respective microarchs.
@@ -37,9 +38,9 @@ REQUIREMENTS
 linux version >=3.15
 gcc version >=4.9
 
 a/arch/x86/include/asm/module.h2014-06-16 16:44:27.0 -0400
-+++ b/arch/x86/include/asm/module.h2015-03-07 03:27:32.556672424 -0500
-@@ -15,6 +15,22 @@
+--- a/arch/x86/include/asm/module.h2015-08-30 14:34:09.0 -0400
 b/arch/x86/include/asm/module.h2015-11-06 14:18:24.234941036 -0500
+@@ -15,6 +15,24 @@
  #define MODULE_PROC_FAMILY "586MMX "
  #elif defined CONFIG_MCORE2
  #define MODULE_PROC_FAMILY "CORE2 "
@@ -59,10 +60,12 @@ gcc version >=4.9
 +#define MODULE_PROC_FAMILY "HASWELL "
 +#elif defined CONFIG_MBROADWELL
 +#define MODULE_PROC_FAMILY "BROADWELL "
++#elif defined CONFIG_MSKYLAKE
++#define MODULE_PROC_FAMILY "SKYLAKE "
  #elif defined CONFIG_MATOM
  #define MODULE_PROC_FAMILY "ATOM "
  #elif defined CONFIG_M686
-@@ -33,6 +49,20 @@
+@@ -33,6 +51,22 @@
  #define MODULE_PROC_FAMILY "K7 "
  #elif defined CONFIG_MK8
  #define MODULE_PROC_FAMILY "K8 "
@@ -77,14 +80,16 @@ gcc version >=4.9
 +#elif defined CONFIG_MBULLDOZER
 +#define MODULE_PROC_FAMILY "BULLDOZER "
 +#elif defined CONFIG_MPILEDRIVER
++#define MODULE_PROC_FAMILY "STEAMROLLER "
++#elif defined CONFIG_MSTEAMROLLER
 +#define MODULE_PROC_FAMILY "PILEDRIVER "
 +#elif defined CONFIG_MJAGUAR
 +#define MODULE_PROC_FAMILY "JAGUAR "
  #elif defined CONFIG_MELAN
  #define MODULE_PROC_FAMILY "ELAN "
  #elif defined CONFIG_MCRUSOE
 a/arch/x86/Kconfig.cpu 2014-06-16 16:44:27.0 -0400
-+++ b/arch/x86/Kconfig.cpu 2015-03-07 03:32:14.337713226 -0500
+--- a/arch/x86/Kconfig.cpu 2015-08-30 14:34:09.0 -0400
 b/arch/x86/Kconfig.cpu 2015-11-06 14:20:14.948369244 -0500
 @@ -137,9 +137,8 @@ config MPENTIUM4
-Paxville
-Dempsey
@@ -105,7 +110,7 @@ gcc version >=4.9
depends on X86_32
---help---
  Select this for an AMD Athlon K7-family processor.  Enables use of
-@@ -155,12 +154,62 @@ config MK7
+@@ -155,12 +154,69 @@ config MK7
  flags to GCC.
  
  config MK8
@@ -159,6 +164,13 @@ gcc version >=4.9
 +
 +Enables -march=bdver2
 +
++config MSTEAMROLLER
++  bool "AMD Steamroller"
++  ---help---
++Select this for AMD Steamroller processors.
++
++Enables -march=bdver3
++
 +config MJAGUAR
 +  bool "AMD Jaguar"
 +  ---help---
@@ -169,7 +181,7 @@ gcc version >=4.9
  config MCRUSOE
bool "Crusoe"
depends on X86_32
-@@ -251,8 +300,17 @@ config MPSC
+@@ -251,8 +307,17 @@ config MPSC
  using the cpu family field
  in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.
  
@@ -188,7 +200,7 @@ gcc version >=4.9
---help---
  
  Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and
-@@ -260,14 +318,63 @@ config MCORE2
+@@ -260,14 +325,71 @@ config MCORE2
  family in /proc/cpuinfo. Newer ones have 6 and older ones 15
  (not a typo)
  

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

2016-06-23 Thread Mike Pagano
commit: 9b1ae75ce3b7546ecbaf6b6a880ea885166190cb
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Jun 23 11:45:51 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Jun 23 11:45:51 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=9b1ae75c

Linux patch 4.1.27

 _README |4 +
 1026_linux-4.1.27.patch | 1129 +++
 2 files changed, 1133 insertions(+)

diff --git a/_README b/_README
index 783092f..b592a97 100644
--- a/_README
+++ b/_README
@@ -147,6 +147,10 @@ Patch:  1025_linux-4.1.26.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.26
 
+Patch:  1026_linux-4.1.27.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.27
+
 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/1026_linux-4.1.27.patch b/1026_linux-4.1.27.patch
new file mode 100644
index 000..bd3e683
--- /dev/null
+++ b/1026_linux-4.1.27.patch
@@ -0,0 +1,1129 @@
+diff --git a/Makefile b/Makefile
+index 080a87e290b9..54b3d8ae8624 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 26
++SUBLEVEL = 27
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
+index ef9119f7462e..4d9375814b53 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/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c
+index d7c0acb35ec2..8d49614d600d 100644
+--- a/arch/parisc/kernel/unaligned.c
 b/arch/parisc/kernel/unaligned.c
+@@ -666,7 +666,7 @@ void handle_unaligned(struct pt_regs *regs)
+   break;
+   }
+ 
+-  if (modify && R1(regs->iir))
++  if (ret == 0 && modify && R1(regs->iir))
+   regs->gr[R1(regs->iir)] = newbase;
+ 
+ 
+@@ -677,6 +677,14 @@ void handle_unaligned(struct pt_regs *regs)
+ 
+   if (ret)
+   {
++  /*
++   * The unaligned handler failed.
++   * If we were called by __get_user() or __put_user() jump
++   * to it's exception fixup handler instead of crashing.
++   */
++  if (!user_mode(regs) && fixup_exception(regs))
++  return;
++
+   printk(KERN_CRIT "Unaligned handler failed, ret = %d\n", ret);
+   die_if_kernel("Unaligned data reference", regs, 28);
+ 
+diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
+index f4f99f01b746..a4bf6e0eb813 100644
+--- a/arch/powerpc/include/asm/reg.h
 b/arch/powerpc/include/asm/reg.h
+@@ -708,7 +708,7 @@
+ #define   MMCR0_FCWAIT0x0002UL /* freeze counter in WAIT state */
+ #define   MMCR0_FCHV  0x0001UL /* freeze conditions in hypervisor mode */
+ #define SPRN_MMCR1798
+-#define SPRN_MMCR2769
++#define SPRN_MMCR2785
+ #define SPRN_MMCRA0x312
+ #define   MMCRA_SDSYNC0x8000UL /* SDAR synced with SIAR */
+ #define   MMCRA_SDAR_DCACHE_MISS 0x4000UL
+@@ -745,13 +745,13 @@
+ #define SPRN_PMC6 792
+ #define SPRN_PMC7 793
+ #define SPRN_PMC8 794
+-#define SPRN_SIAR 780
+-#define SPRN_SDAR 781
+ #define SPRN_SIER 784
+ #define   SIER_SIPR   0x200   /* Sampled MSR_PR */
+ #define   SIER_SIHV   0x100   /* Sampled MSR_HV */
+ #define   SIER_SIAR_VALID 0x040   /* SIAR contents valid */
+ #define   SIER_SDAR_VALID 0x020   /* SDAR contents valid */
++#define SPRN_SIAR 796
++#define SPRN_SDAR 797
+ #define SPRN_TACR 888
+ #define SPRN_TCSCR889
+ #define SPRN_CSIGR890
+diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
+index fd1fe4c37599..ae97ba211d8e 100644
+--- a/arch/powerpc/kernel/prom_init.c
 b/arch/powerpc/kernel/prom_init.c
+@@ -647,6 +647,7 @@ unsigned char ibm_architecture_vec[] = {
+   W(0x), W(0x003e),   /* POWER6 */
+   W(0x), W(0x003f),   /* POWER7 */
+   W(0x), W(0x004b),   /* POWER8E */
++  W(0x), W(0x004c),   /* POWER8NVL */
+   W(0x), W(0x004d),   /* POWER8 */
+   W(0x), W(0x0f04),   /* all 2.07-compliant */
+   W(0x), W(0x0f03),   /* all 2.06-compliant */
+@@ -709,7 +710,7 @@ unsigned char ibm_architecture_vec[] = {
+* must match by the macro below. Update the definition if
+* the structure layout changes.
+*/
+-#define IBM_ARCH_VEC_NRCORES_OFFSET   125
++#define IBM_ARCH_VEC_NRCORES_OFFSET   133
+   W(NR_CPUS), /* number of cores supported */
+   0,
+ 

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

2016-05-11 Thread Mike Pagano
commit: 85e809cf8d53f398f9f5cc0882736d5fb9b5a2d9
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu May 12 00:12:12 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu May 12 00:12:12 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=85e809cf

Linux patch 4.1.24

 _README |   4 +
 1023_linux-4.1.24.patch | 646 
 2 files changed, 650 insertions(+)

diff --git a/_README b/_README
index a797069..6700cd7 100644
--- a/_README
+++ b/_README
@@ -135,6 +135,10 @@ Patch:  1022_linux-4.1.23.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.23
 
+Patch:  1023_linux-4.1.24.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.24
+
 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/1023_linux-4.1.24.patch b/1023_linux-4.1.24.patch
new file mode 100644
index 000..0ac83c9
--- /dev/null
+++ b/1023_linux-4.1.24.patch
@@ -0,0 +1,646 @@
+diff --git a/Makefile b/Makefile
+index 9956129bb106..df1d8b1448ae 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 23
++SUBLEVEL = 24
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/powerpc/include/uapi/asm/cputable.h 
b/arch/powerpc/include/uapi/asm/cputable.h
+index de2c0e4ee1aa..67de80a8e178 100644
+--- a/arch/powerpc/include/uapi/asm/cputable.h
 b/arch/powerpc/include/uapi/asm/cputable.h
+@@ -31,6 +31,7 @@
+ #define PPC_FEATURE_PSERIES_PERFMON_COMPAT \
+   0x0040
+ 
++/* Reserved - do not use  0x0004 */
+ #define PPC_FEATURE_TRUE_LE   0x0002
+ #define PPC_FEATURE_PPC_LE0x0001
+ 
+diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
+index 308c5e15676b..abe9cdc390a5 100644
+--- a/arch/powerpc/kernel/prom.c
 b/arch/powerpc/kernel/prom.c
+@@ -149,23 +149,24 @@ static struct ibm_pa_feature {
+   unsigned long   cpu_features;   /* CPU_FTR_xxx bit */
+   unsigned long   mmu_features;   /* MMU_FTR_xxx bit */
+   unsigned intcpu_user_ftrs;  /* PPC_FEATURE_xxx bit */
++  unsigned intcpu_user_ftrs2; /* PPC_FEATURE2_xxx bit */
+   unsigned char   pabyte; /* byte number in ibm,pa-features */
+   unsigned char   pabit;  /* bit number (big-endian) */
+   unsigned char   invert; /* if 1, pa bit set => clear feature */
+ } ibm_pa_features[] __initdata = {
+-  {0, 0, PPC_FEATURE_HAS_MMU, 0, 0, 0},
+-  {0, 0, PPC_FEATURE_HAS_FPU, 0, 1, 0},
+-  {CPU_FTR_CTRL, 0, 0,0, 3, 0},
+-  {CPU_FTR_NOEXECUTE, 0, 0,   0, 6, 0},
+-  {CPU_FTR_NODSISRALIGN, 0, 0,1, 1, 1},
+-  {0, MMU_FTR_CI_LARGE_PAGE, 0,   1, 2, 0},
+-  {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0},
++  {0, 0, PPC_FEATURE_HAS_MMU, 0,  0, 0, 0},
++  {0, 0, PPC_FEATURE_HAS_FPU, 0,  0, 1, 0},
++  {CPU_FTR_CTRL, 0, 0, 0, 0, 3, 0},
++  {CPU_FTR_NOEXECUTE, 0, 0, 0,0, 6, 0},
++  {CPU_FTR_NODSISRALIGN, 0, 0, 0, 1, 1, 1},
++  {0, MMU_FTR_CI_LARGE_PAGE, 0, 0,1, 2, 0},
++  {CPU_FTR_REAL_LE, 0, PPC_FEATURE_TRUE_LE, 0, 5, 0, 0},
+   /*
+* If the kernel doesn't support TM (ie. 
CONFIG_PPC_TRANSACTIONAL_MEM=n),
+* we don't want to turn on CPU_FTR_TM here, so we use CPU_FTR_TM_COMP
+* which is 0 if the kernel doesn't support TM.
+*/
+-  {CPU_FTR_TM_COMP, 0, 0, 22, 0, 0},
++  {CPU_FTR_TM_COMP, 0, 0, 0,  22, 0, 0},
+ };
+ 
+ static void __init scan_features(unsigned long node, const unsigned char 
*ftrs,
+@@ -196,10 +197,12 @@ static void __init scan_features(unsigned long node, 
const unsigned char *ftrs,
+   if (bit ^ fp->invert) {
+   cur_cpu_spec->cpu_features |= fp->cpu_features;
+   cur_cpu_spec->cpu_user_features |= fp->cpu_user_ftrs;
++  cur_cpu_spec->cpu_user_features2 |= fp->cpu_user_ftrs2;
+   cur_cpu_spec->mmu_features |= fp->mmu_features;
+   } else {
+   cur_cpu_spec->cpu_features &= ~fp->cpu_features;
+   cur_cpu_spec->cpu_user_features &= ~fp->cpu_user_ftrs;
++  cur_cpu_spec->cpu_user_features2 &= ~fp->cpu_user_ftrs2;
+   cur_cpu_spec->mmu_features &= ~fp->mmu_features;
+   }
+   }
+diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h
+index 11eae5f55b70..9787b61e0758 100644
+--- a/arch/s390/include/asm/hugetlb.h
 b/arch/s390/include/asm/hugetlb.h
+@@ -14,6 +14,7 @@
+ 
+ #define is_hugepage_only_range(mm, addr, len) 0
+ #define hugetlb_free_pgd_rangefree_pgd_range
++#define hugepages_supported() 

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

2016-04-28 Thread Mike Pagano
commit: 26c5b0bcb48671f84a02d4f62590131aa4566f9b
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Apr 28 18:56:12 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Apr 28 18:56:12 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=26c5b0bc

Linux patch 4.1.23

 _README |4 +
 1022_linux-4.1.23.patch | 2721 +++
 2 files changed, 2725 insertions(+)

diff --git a/_README b/_README
index 3075177..a797069 100644
--- a/_README
+++ b/_README
@@ -131,6 +131,10 @@ Patch:  1021_linux-4.1.22.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.22
 
+Patch:  1022_linux-4.1.23.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.23
+
 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/1022_linux-4.1.23.patch b/1022_linux-4.1.23.patch
new file mode 100644
index 000..68a28a4
--- /dev/null
+++ b/1022_linux-4.1.23.patch
@@ -0,0 +1,2721 @@
+diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
+index cd03a0faca8f..7bcd7a26f885 100644
+--- a/Documentation/kernel-parameters.txt
 b/Documentation/kernel-parameters.txt
+@@ -3808,6 +3808,8 @@ bytes respectively. Such letter suffixes can also be 
entirely omitted.
+   sector if the number is odd);
+   i = IGNORE_DEVICE (don't bind to this
+   device);
++  j = NO_REPORT_LUNS (don't use report luns
++  command, uas only);
+   l = NOT_LOCKABLE (don't try to lock and
+   unlock ejectable media);
+   m = MAX_SECTORS_64 (don't transfer more
+diff --git a/Makefile b/Makefile
+index 7f4a4039fdd9..9956129bb106 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 22
++SUBLEVEL = 23
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/mach-omap2/omap_hwmod.c 
b/arch/arm/mach-omap2/omap_hwmod.c
+index 9185bb958503..dee6831c0434 100644
+--- a/arch/arm/mach-omap2/omap_hwmod.c
 b/arch/arm/mach-omap2/omap_hwmod.c
+@@ -1402,9 +1402,7 @@ static void _enable_sysc(struct omap_hwmod *oh)
+   (sf & SYSC_HAS_CLOCKACTIVITY))
+   _set_clockactivity(oh, oh->class->sysc->clockact, );
+ 
+-  /* If the cached value is the same as the new value, skip the write */
+-  if (oh->_sysc_cache != v)
+-  _write_sysconfig(v, oh);
++  _write_sysconfig(v, oh);
+ 
+   /*
+* Set the autoidle bit only after setting the smartidle bit
+@@ -1467,7 +1465,9 @@ static void _idle_sysc(struct omap_hwmod *oh)
+   _set_master_standbymode(oh, idlemode, );
+   }
+ 
+-  _write_sysconfig(v, oh);
++  /* If the cached value is the same as the new value, skip the write */
++  if (oh->_sysc_cache != v)
++  _write_sysconfig(v, oh);
+ }
+ 
+ /**
+diff --git a/arch/parisc/include/asm/uaccess.h 
b/arch/parisc/include/asm/uaccess.h
+index 0abdd4c607ed..1960b87c1c8b 100644
+--- a/arch/parisc/include/asm/uaccess.h
 b/arch/parisc/include/asm/uaccess.h
+@@ -76,6 +76,7 @@ struct exception_table_entry {
+  */
+ struct exception_data {
+   unsigned long fault_ip;
++  unsigned long fault_gp;
+   unsigned long fault_space;
+   unsigned long fault_addr;
+ };
+diff --git a/arch/parisc/kernel/asm-offsets.c 
b/arch/parisc/kernel/asm-offsets.c
+index 59001cea13f9..c972e6550f56 100644
+--- a/arch/parisc/kernel/asm-offsets.c
 b/arch/parisc/kernel/asm-offsets.c
+@@ -291,6 +291,7 @@ int main(void)
+   DEFINE(ASM_PT_INITIAL, PT_INITIAL);
+   BLANK();
+   DEFINE(EXCDATA_IP, offsetof(struct exception_data, fault_ip));
++  DEFINE(EXCDATA_GP, offsetof(struct exception_data, fault_gp));
+   DEFINE(EXCDATA_SPACE, offsetof(struct exception_data, fault_space));
+   DEFINE(EXCDATA_ADDR, offsetof(struct exception_data, fault_addr));
+   BLANK();
+diff --git a/arch/parisc/kernel/parisc_ksyms.c 
b/arch/parisc/kernel/parisc_ksyms.c
+index 568b2c61ea02..3cad8aadc69e 100644
+--- a/arch/parisc/kernel/parisc_ksyms.c
 b/arch/parisc/kernel/parisc_ksyms.c
+@@ -47,11 +47,11 @@ EXPORT_SYMBOL(__cmpxchg_u64);
+ EXPORT_SYMBOL(lclear_user);
+ EXPORT_SYMBOL(lstrnlen_user);
+ 
+-/* Global fixups */
+-extern void fixup_get_user_skip_1(void);
+-extern void fixup_get_user_skip_2(void);
+-extern void fixup_put_user_skip_1(void);
+-extern void fixup_put_user_skip_2(void);
++/* Global fixups - defined as int to avoid creation of function pointers */
++extern int fixup_get_user_skip_1;
++extern int fixup_get_user_skip_2;
++extern int fixup_put_user_skip_1;
++extern int fixup_put_user_skip_2;
+ EXPORT_SYMBOL(fixup_get_user_skip_1);
+ 

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

2016-04-22 Thread Mike Pagano
commit: 53f63e4e0ebb503d06ae47030b9d66e1208de0e2
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Apr 22 18:05:58 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Apr 22 18:05:58 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=53f63e4e

Update for Gentoo specific distro patch. Select DEVPTS_MULTIPLE_INSTANCES when 
GENTOO_LINUX_INIT_SYSTEMD selected. Bug #579424.

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

diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch
index 652e2a7..c7af596 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
 b/Kconfig
 @@ -8,4 +8,6 @@ config SRCARCH
string
option env="SRCARCH"
@@ -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 @@
+--- /dev/null
 b/distro/Kconfig
+@@ -0,0 +1,131 @@
 +menu "Gentoo Linux"
 +
 +config GENTOO_LINUX
@@ -30,7 +30,7 @@
 +
 +  depends on GENTOO_LINUX
 +  default y if GENTOO_LINUX
-+  
++
 +  select DEVTMPFS
 +  select TMPFS
 +
@@ -51,7 +51,29 @@
 +  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
++
++  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)
++
++  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,12 +109,13 @@
 +  select AUTOFS4_FS
 +  select BLK_DEV_BSG
 +  select CGROUPS
++  select DEVPTS_MULTIPLE_INSTANCES
 +  select EPOLL
 +  select FANOTIFY
 +  select FHANDLE
 +  select INOTIFY_USER
 +  select NET
-+  select NET_NS 
++  select NET_NS
 +  select PROC_FS
 +  select SIGNALFD
 +  select SYSFS



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

2016-04-06 Thread Mike Pagano
commit: 1ebec2302e4819c5bb8ef97bafc6f513f794a23c
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Apr  6 11:23:42 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Apr  6 11:23:42 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1ebec230

Linux patch 4.1.21

 _README |4 +
 1020_linux-4.1.21.patch | 2005 +++
 2 files changed, 2009 insertions(+)

diff --git a/_README b/_README
index 3e19785..cb424ff 100644
--- a/_README
+++ b/_README
@@ -123,6 +123,10 @@ Patch:  1019_linux-4.1.20.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.20
 
+Patch:  1020_linux-4.1.21.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.21
+
 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/1020_linux-4.1.21.patch b/1020_linux-4.1.21.patch
new file mode 100644
index 000..54f0496
--- /dev/null
+++ b/1020_linux-4.1.21.patch
@@ -0,0 +1,2005 @@
+diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt 
b/Documentation/devicetree/bindings/arm/omap/omap.txt
+index 4f6a82cef1d1..cbe35b3de9e9 100644
+--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
 b/Documentation/devicetree/bindings/arm/omap/omap.txt
+@@ -23,6 +23,7 @@ Optional properties:
+   during suspend.
+ - ti,no-reset-on-init: When present, the module should not be reset at init
+ - ti,no-idle-on-init: When present, the module should not be idled at init
++- ti,no-idle: When present, the module is never allowed to idle.
+ 
+ Example:
+ 
+diff --git a/Documentation/virtual/kvm/mmu.txt 
b/Documentation/virtual/kvm/mmu.txt
+index c59bd9bc41ef..4176ab076f1c 100644
+--- a/Documentation/virtual/kvm/mmu.txt
 b/Documentation/virtual/kvm/mmu.txt
+@@ -352,7 +352,8 @@ In the first case there are two additional complications:
+ - if CR4.SMEP is enabled: since we've turned the page into a kernel page,
+   the kernel may now execute it.  We handle this by also setting spte.nx.
+   If we get a user fetch or read fault, we'll change spte.u=1 and
+-  spte.nx=gpte.nx back.
++  spte.nx=gpte.nx back.  For this to work, KVM forces EFER.NX to 1 when
++  shadow paging is in use.
+ - if CR4.SMAP is disabled: since the page has been changed to a kernel
+   page, it can not be reused when CR4.SMAP is enabled. We set
+   CR4.SMAP && !CR0.WP into shadow page's role to avoid this case. Note,
+diff --git a/Makefile b/Makefile
+index 39be1bbd373a..79fab0d55218 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 20
++SUBLEVEL = 21
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
+index dfcc0dd637e5..bc04b754fe36 100644
+--- a/arch/arm/boot/dts/dra7.dtsi
 b/arch/arm/boot/dts/dra7.dtsi
+@@ -1411,6 +1411,16 @@
+  0x48485200 0x2E00>;
+   #address-cells = <1>;
+   #size-cells = <1>;
++
++  /*
++   * Do not allow gating of cpsw clock as workaround
++   * for errata i877. Keeping internal clock disabled
++   * causes the device switching characteristics
++   * to degrade over time and eventually fail to meet
++   * the data manual delay time/skew specs.
++   */
++  ti,no-idle;
++
+   /*
+* rx_thresh_pend
+* rx_pend
+diff --git a/arch/arm/mach-omap2/omap_hwmod.c 
b/arch/arm/mach-omap2/omap_hwmod.c
+index 5286e7773ed4..9185bb958503 100644
+--- a/arch/arm/mach-omap2/omap_hwmod.c
 b/arch/arm/mach-omap2/omap_hwmod.c
+@@ -876,6 +876,36 @@ static int _init_opt_clks(struct omap_hwmod *oh)
+   return ret;
+ }
+ 
++static void _enable_optional_clocks(struct omap_hwmod *oh)
++{
++  struct omap_hwmod_opt_clk *oc;
++  int i;
++
++  pr_debug("omap_hwmod: %s: enabling optional clocks\n", oh->name);
++
++  for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
++  if (oc->_clk) {
++  pr_debug("omap_hwmod: enable %s:%s\n", oc->role,
++   __clk_get_name(oc->_clk));
++  clk_enable(oc->_clk);
++  }
++}
++
++static void _disable_optional_clocks(struct omap_hwmod *oh)
++{
++  struct omap_hwmod_opt_clk *oc;
++  int i;
++
++  pr_debug("omap_hwmod: %s: disabling optional clocks\n", oh->name);
++
++  for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++)
++  if (oc->_clk) {
++  pr_debug("omap_hwmod: disable %s:%s\n", oc->role,
++   __clk_get_name(oc->_clk));
++  clk_disable(oc->_clk);
++  }
++}
++
+ /**
+  * _enable_clocks 

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

2016-03-22 Thread Mike Pagano
commit: f8fc60510d50d9fd52e4e90cc7516c393a341555
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue Mar 22 22:47:43 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue Mar 22 22:47:43 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=f8fc6051

Update for gcc 4.9 CPU optimization patch. See bug #572108

 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch 
b/5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
index c4efd06..418201d 100644
--- a/5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
+++ b/5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
@@ -283,7 +283,7 @@ gcc version >=4.9
int
default "7" if MPENTIUM4 || MPSC
 -  default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || 
X86_GENERIC || GENERIC_CPU
-+  default "6" if MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT 
|| MBULLDOZER || MPILEDRIVER || MJAGUAR || MPENTIUMM || MCORE2 || MNEHALEM || 
MWESTMERE || MSILVERMONT || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || BROADWELL 
|| MNATIVE || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
++  default "6" if MK7 || MK8 || MK8SSE3 || MK10 || MBARCELONA || MBOBCAT 
|| MBULLDOZER || MPILEDRIVER || MJAGUAR || MPENTIUMM || MCORE2 || MNEHALEM || 
MWESTMERE || MSILVERMONT || MSANDYBRIDGE || MIVYBRIDGE || MHASWELL || 
MBROADWELL || MNATIVE || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
default "4" if MELAN || M486 || MGEODEGX1
default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || 
MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || 
M586 || MVIAC3_2 || MGEODE_LX
  



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

2016-03-19 Thread Mike Pagano
commit: 57f73735ff7386b833f9793004b2a35de5cb2703
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Mar 17 22:52:12 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Mar 17 22:52:12 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=57f73735

Linux patch 4.1.20

 _README |4 +
 1019_linux-4.1.20.patch | 3955 +++
 2 files changed, 3959 insertions(+)

diff --git a/_README b/_README
index ad1d372..3e19785 100644
--- a/_README
+++ b/_README
@@ -119,6 +119,10 @@ Patch:  1018_linux-4.1.19.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.19
 
+Patch:  1019_linux-4.1.20.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.20
+
 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/1019_linux-4.1.20.patch b/1019_linux-4.1.20.patch
new file mode 100644
index 000..75d3dea
--- /dev/null
+++ b/1019_linux-4.1.20.patch
@@ -0,0 +1,3955 @@
+diff --git a/Makefile b/Makefile
+index 06107f683bbe..39be1bbd373a 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 19
++SUBLEVEL = 20
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c
+index d503fbb787d3..88993cc95e8e 100644
+--- a/arch/arm/kvm/guest.c
 b/arch/arm/kvm/guest.c
+@@ -155,7 +155,7 @@ static int get_timer_reg(struct kvm_vcpu *vcpu, const 
struct kvm_one_reg *reg)
+   u64 val;
+ 
+   val = kvm_arm_timer_get_reg(vcpu, reg->id);
+-  return copy_to_user(uaddr, , KVM_REG_SIZE(reg->id));
++  return copy_to_user(uaddr, , KVM_REG_SIZE(reg->id)) ? -EFAULT : 0;
+ }
+ 
+ static unsigned long num_core_regs(void)
+diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c
+index 9535bd555d1d..d4e04d2237c4 100644
+--- a/arch/arm64/kvm/guest.c
 b/arch/arm64/kvm/guest.c
+@@ -184,7 +184,7 @@ static int get_timer_reg(struct kvm_vcpu *vcpu, const 
struct kvm_one_reg *reg)
+   u64 val;
+ 
+   val = kvm_arm_timer_get_reg(vcpu, reg->id);
+-  return copy_to_user(uaddr, , KVM_REG_SIZE(reg->id));
++  return copy_to_user(uaddr, , KVM_REG_SIZE(reg->id)) ? -EFAULT : 0;
+ }
+ 
+ /**
+diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
+index 5f5f44edc77d..54923d6b7e16 100644
+--- a/arch/mips/kernel/traps.c
 b/arch/mips/kernel/traps.c
+@@ -693,15 +693,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);
+ }
+@@ -877,7 +877,7 @@ out:
+ 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
+@@ -905,7 +905,6 @@ 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/mips/kvm/mips.c b/arch/mips/kvm/mips.c
+index 22ee0afc7d5d..ace4ed7d41c6 100644
+--- a/arch/mips/kvm/mips.c
 b/arch/mips/kvm/mips.c
+@@ -700,7 +700,7 @@ static int kvm_mips_get_reg(struct kvm_vcpu *vcpu,
+   } else if ((reg->id & KVM_REG_SIZE_MASK) == KVM_REG_SIZE_U128) {
+   void __user *uaddr = (void __user *)(long)reg->addr;
+ 
+-  return copy_to_user(uaddr, vs, 16);
++  return copy_to_user(uaddr, vs, 16) ? -EFAULT : 0;
+   } else {
+   return -EINVAL;
+   }
+@@ -730,7 +730,7 @@ static int kvm_mips_set_reg(struct kvm_vcpu *vcpu,
+   } else if ((reg->id & KVM_REG_SIZE_MASK) == KVM_REG_SIZE_U128) {
+   void __user *uaddr = (void __user *)(long)reg->addr;
+ 
+-  return copy_from_user(vs, uaddr, 16);
++  return copy_from_user(vs, uaddr, 16) ? -EFAULT : 0;
+   } else {
+   return -EINVAL;
+   }
+diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
+index 9585c81f755f..ce0b2b4075c7 100644
+--- a/arch/parisc/kernel/ptrace.c
 b/arch/parisc/kernel/ptrace.c
+@@ -269,14 +269,19 @@ long compat_arch_ptrace(struct task_struct *child, 
compat_long_t 

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

2016-01-23 Thread Mike Pagano
commit: 4071022681de7405f4ef7b2778add1b9d08845cf
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Jan 23 18:30:39 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Jan 23 18:30:39 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=40710226

Linux 4.1.16. Includes patch for CVE-2016-0728

 _README|8 +-
 1015_linux-4.1.16.patch| 1479 
 ...ing-refleak-in-join-session-CVE-2016-0728.patch |   81 --
 3 files changed, 1483 insertions(+), 85 deletions(-)

diff --git a/_README b/_README
index 18a8ebc..1ca97cd 100644
--- a/_README
+++ b/_README
@@ -103,6 +103,10 @@ Patch:  1014_linux-4.1.15.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.15
 
+Patch:  1015_linux-4.1.16.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.16
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.
@@ -111,10 +115,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:  2700_ThinkPad-30-brightness-control-fix.patch
 From:   Seth Forshee 
 Desc:   ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads.

diff --git a/1015_linux-4.1.16.patch b/1015_linux-4.1.16.patch
new file mode 100644
index 000..44d7080
--- /dev/null
+++ b/1015_linux-4.1.16.patch
@@ -0,0 +1,1479 @@
+diff --git a/Makefile b/Makefile
+index cf35f6bcffd8..7609f1dcdcb9 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 15
++SUBLEVEL = 16
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
+index f8319a0860fd..39be5acc9c48 100644
+--- a/drivers/char/tpm/tpm.h
 b/drivers/char/tpm/tpm.h
+@@ -115,6 +115,13 @@ enum tpm2_startup_types {
+   TPM2_SU_STATE   = 0x0001,
+ };
+ 
++enum tpm2_start_method {
++  TPM2_START_ACPI = 2,
++  TPM2_START_FIFO = 6,
++  TPM2_START_CRB = 7,
++  TPM2_START_CRB_WITH_ACPI = 8,
++};
++
+ struct tpm_chip;
+ 
+ struct tpm_vendor_specific {
+diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
+index 1267322595da..2b971b3e5c1c 100644
+--- a/drivers/char/tpm/tpm_crb.c
 b/drivers/char/tpm/tpm_crb.c
+@@ -34,12 +34,6 @@ enum crb_defaults {
+   CRB_ACPI_START_INDEX = 1,
+ };
+ 
+-enum crb_start_method {
+-  CRB_SM_ACPI_START = 2,
+-  CRB_SM_CRB = 7,
+-  CRB_SM_CRB_WITH_ACPI_START = 8,
+-};
+-
+ struct acpi_tpm2 {
+   struct acpi_table_header hdr;
+   u16 platform_class;
+@@ -220,12 +214,6 @@ static int crb_acpi_add(struct acpi_device *device)
+   u64 pa;
+   int rc;
+ 
+-  chip = tpmm_chip_alloc(dev, _crb);
+-  if (IS_ERR(chip))
+-  return PTR_ERR(chip);
+-
+-  chip->flags = TPM_CHIP_FLAG_TPM2;
+-
+   status = acpi_get_table(ACPI_SIG_TPM2, 1,
+   (struct acpi_table_header **) );
+   if (ACPI_FAILURE(status)) {
+@@ -233,13 +221,15 @@ static int crb_acpi_add(struct acpi_device *device)
+   return -ENODEV;
+   }
+ 
+-  /* At least some versions of AMI BIOS have a bug that TPM2 table has
+-   * zero address for the control area and therefore we must fail.
+-  */
+-  if (!buf->control_area_pa) {
+-  dev_err(dev, "TPM2 ACPI table has a zero address for the 
control area\n");
+-  return -EINVAL;
+-  }
++  /* Should the FIFO driver handle this? */
++  if (buf->start_method == TPM2_START_FIFO)
++  return -ENODEV;
++
++  chip = tpmm_chip_alloc(dev, _crb);
++  if (IS_ERR(chip))
++  return PTR_ERR(chip);
++
++  chip->flags = TPM_CHIP_FLAG_TPM2;
+ 
+   if (buf->hdr.length < sizeof(struct acpi_tpm2)) {
+   dev_err(dev, "TPM2 ACPI table has wrong size");
+@@ -259,11 +249,11 @@ static int crb_acpi_add(struct acpi_device *device)
+* report only ACPI start but in practice seems to require both
+* ACPI start and CRB start.
+*/
+-  if (sm == CRB_SM_CRB || sm == CRB_SM_CRB_WITH_ACPI_START ||
++  if (sm == TPM2_START_CRB || sm == TPM2_START_FIFO ||
+   !strcmp(acpi_device_hid(device), "MSFT0101"))
+   priv->flags |= CRB_FL_CRB_START;
+ 
+-  if (sm == CRB_SM_ACPI_START || sm == CRB_SM_CRB_WITH_ACPI_START)
++  if (sm == TPM2_START_ACPI || sm == TPM2_START_CRB_WITH_ACPI)
+   priv->flags |= CRB_FL_ACPI_START;
+ 
+   

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

2016-01-20 Thread Mike Pagano
commit: ec211dd8b245afecea707cdc1aa7cd258866312d
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Jan 20 13:54:44 2016 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Jan 20 13:54:44 2016 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ec211dd8

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 2294ce5..18a8ebc 100644
--- a/_README
+++ b/_README
@@ -111,6 +111,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:  2700_ThinkPad-30-brightness-control-fix.patch
 From:   Seth Forshee 
 Desc:   ACPI: Disable Windows 8 compatibility for some Lenovo 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:4.1 commit in: /

2015-12-15 Thread Mike Pagano
commit: 56e69a84070c5284582a1a12b7670397aaa78c7e
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue Dec 15 11:16:50 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue Dec 15 11:16:50 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=56e69a84

Linux patch 4.1.15

 _README |4 +
 1014_linux-4.1.15.patch | 2619 +++
 2 files changed, 2623 insertions(+)

diff --git a/_README b/_README
index bb7a9d9..2294ce5 100644
--- a/_README
+++ b/_README
@@ -99,6 +99,10 @@ Patch:  1013_linux-4.1.14.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.14
 
+Patch:  1014_linux-4.1.15.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.15
+
 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/1014_linux-4.1.15.patch b/1014_linux-4.1.15.patch
new file mode 100644
index 000..114781b
--- /dev/null
+++ b/1014_linux-4.1.15.patch
@@ -0,0 +1,2619 @@
+diff --git a/Makefile b/Makefile
+index 091280d66452..cf35f6bcffd8 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 14
++SUBLEVEL = 15
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
+index 1ec6441fe2a5..09138ceba046 100644
+--- a/drivers/block/rbd.c
 b/drivers/block/rbd.c
+@@ -3417,6 +3417,7 @@ static void rbd_queue_workfn(struct work_struct *work)
+   goto err_rq;
+   }
+   img_request->rq = rq;
++  snapc = NULL; /* img_request consumes a ref */
+ 
+   if (op_type == OBJ_OP_DISCARD)
+   result = rbd_img_request_fill(img_request, OBJ_REQUEST_NODATA,
+diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
+index f51d376d10ba..c2f5117fd8cb 100644
+--- a/drivers/firewire/ohci.c
 b/drivers/firewire/ohci.c
+@@ -3675,6 +3675,11 @@ static int pci_probe(struct pci_dev *dev,
+ 
+   reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, ~0);
+   ohci->it_context_support = reg_read(ohci, OHCI1394_IsoXmitIntMaskSet);
++  /* JMicron JMB38x often shows 0 at first read, just ignore it */
++  if (!ohci->it_context_support) {
++  ohci_notice(ohci, "overriding IsoXmitIntMask\n");
++  ohci->it_context_support = 0xf;
++  }
+   reg_write(ohci, OHCI1394_IsoXmitIntMaskClear, ~0);
+   ohci->it_context_mask = ohci->it_context_support;
+   ohci->n_it = hweight32(ohci->it_context_mask);
+diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
+index 9c71295f2fef..85e640440bd9 100644
+--- a/drivers/net/phy/broadcom.c
 b/drivers/net/phy/broadcom.c
+@@ -675,7 +675,7 @@ static struct mdio_device_id __maybe_unused broadcom_tbl[] 
= {
+   { PHY_ID_BCM5461, 0xfff0 },
+   { PHY_ID_BCM54616S, 0xfff0 },
+   { PHY_ID_BCM5464, 0xfff0 },
+-  { PHY_ID_BCM5482, 0xfff0 },
++  { PHY_ID_BCM5481, 0xfff0 },
+   { PHY_ID_BCM5482, 0xfff0 },
+   { PHY_ID_BCM50610, 0xfff0 },
+   { PHY_ID_BCM50610M, 0xfff0 },
+diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
+index 4e0470d396a3..71190dc1eacf 100644
+--- a/drivers/net/usb/qmi_wwan.c
 b/drivers/net/usb/qmi_wwan.c
+@@ -774,6 +774,7 @@ static const struct usb_device_id products[] = {
+   {QMI_FIXED_INTF(0x2357, 0x9000, 4)},/* TP-LINK MA260 */
+   {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)},/* Telit LE920 */
+   {QMI_FIXED_INTF(0x1bc7, 0x1201, 2)},/* Telit LE920 */
++  {QMI_FIXED_INTF(0x1c9e, 0x9b01, 3)},/* XS Stick W100-2 from 4G 
Systems */
+   {QMI_FIXED_INTF(0x0b3c, 0xc000, 4)},/* Olivetti Olicard 100 */
+   {QMI_FIXED_INTF(0x0b3c, 0xc001, 4)},/* Olivetti Olicard 120 */
+   {QMI_FIXED_INTF(0x0b3c, 0xc002, 4)},/* Olivetti Olicard 140 */
+diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
+index b072e17479aa..2b0d84d32db4 100644
+--- a/fs/btrfs/file.c
 b/fs/btrfs/file.c
+@@ -756,8 +756,16 @@ next_slot:
+   }
+ 
+   btrfs_item_key_to_cpu(leaf, , path->slots[0]);
+-  if (key.objectid > ino ||
+-  key.type > BTRFS_EXTENT_DATA_KEY || key.offset >= end)
++
++  if (key.objectid > ino)
++  break;
++  if (WARN_ON_ONCE(key.objectid < ino) ||
++  key.type < BTRFS_EXTENT_DATA_KEY) {
++  ASSERT(del_nr == 0);
++  path->slots[0]++;
++  goto next_slot;
++  }
++  if (key.type > BTRFS_EXTENT_DATA_KEY || key.offset >= end)
+   break;
+ 
+   fi = btrfs_item_ptr(leaf, path->slots[0],
+@@ -776,8 +784,8 @@ next_slot:
+   btrfs_file_extent_inline_len(leaf,
+path->slots[0], fi);
+   } else {
+- 

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

2015-12-10 Thread Mike Pagano
commit: cc2721358925bd19d1cee58f5cb7a68c054b5272
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Dec 10 13:54:25 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Dec 10 13:54:25 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=cc272135

Linux patch 4.1.14

 _README |4 +
 1013_linux-4.1.14.patch | 3152 +++
 2 files changed, 3156 insertions(+)

diff --git a/_README b/_README
index acad761..bb7a9d9 100644
--- a/_README
+++ b/_README
@@ -95,6 +95,10 @@ Patch:  1012_linux-4.1.13.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.13
 
+Patch:  1013_linux-4.1.14.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.14
+
 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/1013_linux-4.1.14.patch b/1013_linux-4.1.14.patch
new file mode 100644
index 000..86576c9
--- /dev/null
+++ b/1013_linux-4.1.14.patch
@@ -0,0 +1,3152 @@
+diff --git a/Documentation/filesystems/proc.txt 
b/Documentation/filesystems/proc.txt
+index c3b6b301d8b0..749b7bae0c00 100644
+--- a/Documentation/filesystems/proc.txt
 b/Documentation/filesystems/proc.txt
+@@ -140,7 +140,8 @@ Table 1-1: Process specific entries in /proc
+  stat Process status
+  statmProcess memory status information
+  status   Process status in human readable form
+- wchanIf CONFIG_KALLSYMS is set, a pre-decoded wchan
++ wchanPresent with CONFIG_KALLSYMS=y: it shows the kernel 
function
++  symbol the task is blocked in - or "0" if not blocked.
+  pagemap  Page table
+  stackReport full stack trace, enable via CONFIG_STACKTRACE
+  smapsa extension based on maps, showing the memory 
consumption of
+@@ -309,7 +310,7 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
+   blocked   bitmap of blocked signals
+   sigignbitmap of ignored signals
+   sigcatch  bitmap of caught signals
+-  wchan address where process went to sleep
++  0   (place holder, used to be the wchan address, use 
/proc/PID/wchan instead)
+   0 (place holder)
+   0 (place holder)
+   exit_signal   signal to send to parent thread on exit
+diff --git a/Makefile b/Makefile
+index d5d229db61d5..091280d66452 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 13
++SUBLEVEL = 14
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
+index bc215e4b75fd..6a87233d0b19 100644
+--- a/arch/arm/boot/dts/imx27.dtsi
 b/arch/arm/boot/dts/imx27.dtsi
+@@ -477,7 +477,10 @@
+   compatible = "fsl,imx27-usb";
+   reg = <0x10024000 0x200>;
+   interrupts = <56>;
+-  clocks = < IMX27_CLK_USB_IPG_GATE>;
++  clocks = < IMX27_CLK_USB_IPG_GATE>,
++  < IMX27_CLK_USB_AHB_GATE>,
++  < IMX27_CLK_USB_DIV>;
++  clock-names = "ipg", "ahb", "per";
+   fsl,usbmisc = < 0>;
+   status = "disabled";
+   };
+@@ -486,7 +489,10 @@
+   compatible = "fsl,imx27-usb";
+   reg = <0x10024200 0x200>;
+   interrupts = <54>;
+-  clocks = < IMX27_CLK_USB_IPG_GATE>;
++  clocks = < IMX27_CLK_USB_IPG_GATE>,
++  < IMX27_CLK_USB_AHB_GATE>,
++  < IMX27_CLK_USB_DIV>;
++  clock-names = "ipg", "ahb", "per";
+   fsl,usbmisc = < 1>;
+   dr_mode = "host";
+   status = "disabled";
+@@ -496,7 +502,10 @@
+   compatible = "fsl,imx27-usb";
+   reg = <0x10024400 0x200>;
+   interrupts = <55>;
+-  clocks = < IMX27_CLK_USB_IPG_GATE>;
++  clocks = < IMX27_CLK_USB_IPG_GATE>,
++  < IMX27_CLK_USB_AHB_GATE>,
++  < IMX27_CLK_USB_DIV>;
++  clock-names = "ipg", "ahb", "per";
+   fsl,usbmisc = < 2>;
+   dr_mode = "host";
+   status = "disabled";
+@@ -506,7 +515,6 @@
+   #index-cells = <1>;
+   compatible = "fsl,imx27-usbmisc";
+

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

2015-11-09 Thread Mike Pagano
commit: fe5de491080fffef58f47ac59a6dbab9324f4599
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue Nov 10 00:29:54 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue Nov 10 00:29:54 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=fe5de491

Linux patch 4.1.13

 _README |4 +
 1012_linux-4.1.13.patch | 3220 +++
 2 files changed, 3224 insertions(+)

diff --git a/_README b/_README
index ff278e3..acad761 100644
--- a/_README
+++ b/_README
@@ -91,6 +91,10 @@ Patch:  1011_linux-4.1.12.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.12
 
+Patch:  1012_linux-4.1.13.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.13
+
 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/1012_linux-4.1.13.patch b/1012_linux-4.1.13.patch
new file mode 100644
index 000..449c35f
--- /dev/null
+++ b/1012_linux-4.1.13.patch
@@ -0,0 +1,3220 @@
+diff --git a/Documentation/devicetree/bindings/mfd/mfd.txt 
b/Documentation/devicetree/bindings/mfd/mfd.txt
+new file mode 100644
+index ..af9d6931a1a2
+--- /dev/null
 b/Documentation/devicetree/bindings/mfd/mfd.txt
+@@ -0,0 +1,41 @@
++Multi-Function Devices (MFD)
++
++These devices comprise a nexus for heterogeneous hardware blocks containing
++more than one non-unique yet varying hardware functionality.
++
++A typical MFD can be:
++
++- A mixed signal ASIC on an external bus, sometimes a PMIC (Power Management
++  Integrated Circuit) that is manufactured in a lower technology node (rough
++  silicon) that handles analog drivers for things like audio amplifiers, LED
++  drivers, level shifters, PHY (physical interfaces to things like USB or
++  ethernet), regulators etc.
++
++- A range of memory registers containing "miscellaneous system registers" also
++  known as a system controller "syscon" or any other memory range containing a
++  mix of unrelated hardware devices.
++
++Optional properties:
++
++- compatible : "simple-mfd" - this signifies that the operating system should
++  consider all subnodes of the MFD device as separate devices akin to how
++  "simple-bus" inidicates when to see subnodes as children for a simple
++  memory-mapped bus. For more complex devices, when the nexus driver has to
++  probe registers to figure out what child devices exist etc, this should not
++  be used. In the latter case the child devices will be determined by the
++  operating system.
++
++Example:
++
++foo@1000 {
++  compatible = "syscon", "simple-mfd";
++  reg = <0x01000 0x1000>;
++
++  led@08.0 {
++  compatible = "register-bit-led";
++  offset = <0x08>;
++  mask = <0x01>;
++  label = "myled";
++  default-state = "on";
++  };
++};
+diff --git a/Makefile b/Makefile
+index 2320f1911404..d5d229db61d5 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 12
++SUBLEVEL = 13
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts 
b/arch/arm/boot/dts/am57xx-beagle-x15.dts
+index c9df40e5cd3b..e8397879d0a7 100644
+--- a/arch/arm/boot/dts/am57xx-beagle-x15.dts
 b/arch/arm/boot/dts/am57xx-beagle-x15.dts
+@@ -354,11 +354,12 @@
+   /* SMPS9 unused */
+ 
+   ldo1_reg: ldo1 {
+-  /* VDD_SD  */
++  /* VDD_SD / VDDSHV8  */
+   regulator-name = "ldo1";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <330>;
+   regulator-boot-on;
++  regulator-always-on;
+   };
+ 
+   ldo2_reg: ldo2 {
+diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts 
b/arch/arm/boot/dts/armada-385-db-ap.dts
+index 7219ac3a3d90..9f730e8e9f87 100644
+--- a/arch/arm/boot/dts/armada-385-db-ap.dts
 b/arch/arm/boot/dts/armada-385-db-ap.dts
+@@ -46,7 +46,7 @@
+ 
+ / {
+   model = "Marvell Armada 385 Access Point Development Board";
+-  compatible = "marvell,a385-db-ap", "marvell,armada385", 
"marvell,armada38x";
++  compatible = "marvell,a385-db-ap", "marvell,armada385", 
"marvell,armada380";
+ 
+   chosen {
+   stdout-path = "serial1:115200n8";
+diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts 
b/arch/arm/boot/dts/exynos5420-peach-pit.dts
+index 146e71118a72..a0ec8bff83dd 100644
+--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
 b/arch/arm/boot/dts/exynos5420-peach-pit.dts
+@@ -915,6 +915,11 @@
+   };
+ };
+ 
++_system_controller {
++  assigned-clocks = <_system_controller 0>;
++  

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

2015-11-05 Thread Mike Pagano
commit: 713b0f04dcd8afaa0d668b6f9a07572dc9d65102
Author: Mike Pagano  gentoo  org>
AuthorDate: Thu Nov  5 23:29:46 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Thu Nov  5 23:29:46 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=713b0f04

update README

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

diff --git a/_README b/_README
index 8ed7605..ff278e3 100644
--- a/_README
+++ b/_README
@@ -142,7 +142,3 @@ Desc:   BFQ v7r8 patch 3 for 4.1: Early Queue Merge (EQM)
 Patch:  5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
 From:   https://github.com/graysky2/kernel_gcc_patch/
 Desc:   Kernel patch enables gcc >= v4.9 optimizations for additional CPUs.
-
-Patch:  5015_kdbus-8-12-2015.patch
-From:   https://lkml.org
-Desc:   Kernel-level IPC implementation



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

2015-10-27 Thread Mike Pagano
commit: 149745ed61e0ffc43e55b6682710f9553c3ceb45
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue Oct 27 13:19:39 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue Oct 27 13:19:39 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=149745ed

Linux patch 4.1.12

 _README |4 +
 1011_linux-4.1.12.patch | 1494 +++
 2 files changed, 1498 insertions(+)

diff --git a/_README b/_README
index 18e95dd..8ed7605 100644
--- a/_README
+++ b/_README
@@ -87,6 +87,10 @@ Patch:  1010_linux-4.1.11.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.11
 
+Patch:  1011_linux-4.1.12.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.12
+
 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/1011_linux-4.1.12.patch b/1011_linux-4.1.12.patch
new file mode 100644
index 000..07910df
--- /dev/null
+++ b/1011_linux-4.1.12.patch
@@ -0,0 +1,1494 @@
+diff --git a/Makefile b/Makefile
+index c7d877b1c248..2320f1911404 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 11
++SUBLEVEL = 12
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
+index 81151663ef38..3258174e6152 100644
+--- a/arch/arm64/Makefile
 b/arch/arm64/Makefile
+@@ -31,7 +31,7 @@ endif
+ CHECKFLAGS+= -D__aarch64__
+ 
+ ifeq ($(CONFIG_ARM64_ERRATUM_843419), y)
+-CFLAGS_MODULE += -mcmodel=large
++KBUILD_CFLAGS_MODULE  += -mcmodel=large
+ endif
+ 
+ # Default value
+diff --git a/arch/arm64/include/asm/pgtable.h 
b/arch/arm64/include/asm/pgtable.h
+index 56283f8a675c..cf7319422768 100644
+--- a/arch/arm64/include/asm/pgtable.h
 b/arch/arm64/include/asm/pgtable.h
+@@ -80,7 +80,7 @@ extern void __pgd_error(const char *file, int line, unsigned 
long val);
+ #define PAGE_S2   __pgprot(PROT_DEFAULT | 
PTE_S2_MEMATTR(MT_S2_NORMAL) | PTE_S2_RDONLY)
+ #define PAGE_S2_DEVICE__pgprot(PROT_DEFAULT | 
PTE_S2_MEMATTR(MT_S2_DEVICE_nGnRE) | PTE_S2_RDONLY | PTE_UXN)
+ 
+-#define PAGE_NONE __pgprot(((_PAGE_DEFAULT) & ~PTE_TYPE_MASK) | 
PTE_PROT_NONE | PTE_PXN | PTE_UXN)
++#define PAGE_NONE __pgprot(((_PAGE_DEFAULT) & ~PTE_VALID) | 
PTE_PROT_NONE | PTE_PXN | PTE_UXN)
+ #define PAGE_SHARED   __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | 
PTE_PXN | PTE_UXN | PTE_WRITE)
+ #define PAGE_SHARED_EXEC  __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | 
PTE_PXN | PTE_WRITE)
+ #define PAGE_COPY __pgprot(_PAGE_DEFAULT | PTE_USER | PTE_NG | 
PTE_PXN | PTE_UXN)
+@@ -460,7 +460,7 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long 
addr)
+ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
+ {
+   const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY |
+-PTE_PROT_NONE | PTE_WRITE | PTE_TYPE_MASK;
++PTE_PROT_NONE | PTE_VALID | PTE_WRITE;
+   pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask);
+   return pte;
+ }
+diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
+index df81caab7383..f1e0e5522e3a 100644
+--- a/arch/powerpc/kvm/book3s_hv.c
 b/arch/powerpc/kvm/book3s_hv.c
+@@ -2178,7 +2178,7 @@ static int kvmppc_run_vcpu(struct kvm_run *kvm_run, 
struct kvm_vcpu *vcpu)
+   vc->runner = vcpu;
+   if (n_ceded == vc->n_runnable) {
+   kvmppc_vcore_blocked(vc);
+-  } else if (should_resched()) {
++  } else if (need_resched()) {
+   vc->vcore_state = VCORE_PREEMPT;
+   /* Let something else run */
+   cond_resched_lock(>lock);
+diff --git a/arch/sparc/crypto/aes_glue.c b/arch/sparc/crypto/aes_glue.c
+index 2e48eb8813ff..c90930de76ba 100644
+--- a/arch/sparc/crypto/aes_glue.c
 b/arch/sparc/crypto/aes_glue.c
+@@ -433,6 +433,7 @@ static struct crypto_alg algs[] = { {
+   .blkcipher = {
+   .min_keysize= AES_MIN_KEY_SIZE,
+   .max_keysize= AES_MAX_KEY_SIZE,
++  .ivsize = AES_BLOCK_SIZE,
+   .setkey = aes_set_key,
+   .encrypt= cbc_encrypt,
+   .decrypt= cbc_decrypt,
+@@ -452,6 +453,7 @@ static struct crypto_alg algs[] = { {
+   .blkcipher = {
+   .min_keysize= AES_MIN_KEY_SIZE,
+   .max_keysize= AES_MAX_KEY_SIZE,
++  .ivsize = AES_BLOCK_SIZE,
+   .setkey = aes_set_key,
+   .encrypt= ctr_crypt,
+   .decrypt= ctr_crypt,
+diff --git a/arch/sparc/crypto/camellia_glue.c 

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

2015-10-26 Thread Mike Pagano
commit: 19c36945db482f1174588877bf34ec85a8b039af
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Oct 26 20:51:30 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Oct 26 20:51:30 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=19c36945

Remove redundant patchsets.

 _README|  8 ---
 1600_dm-crypt-limit-max-segment-size.patch | 84 --
 2000_inet-deadlock-in-reqsk-queue-unlink-fix.patch | 32 -
 3 files changed, 124 deletions(-)

diff --git a/_README b/_README
index fa3fbdb..18e95dd 100644
--- a/_README
+++ b/_README
@@ -95,14 +95,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:  1600_dm-crypt-limit-max-segment-size.patch
-From:   https://bugzilla.kernel.org/show_bug.cgi?id=104421
-Desc:   dm crypt: constrain crypt device's max_segment_size to PAGE_SIZE.
-
-Patch:  2000_inet-deadlock-in-reqsk-queue-unlink-fix.patch
-From:   http://git.kernel.org/
-Desc:   inet: Patch to fix potential deadlock in reqsk_queue_unlink()
-
 Patch:  2700_ThinkPad-30-brightness-control-fix.patch
 From:   Seth Forshee 
 Desc:   ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads.

diff --git a/1600_dm-crypt-limit-max-segment-size.patch 
b/1600_dm-crypt-limit-max-segment-size.patch
deleted file mode 100644
index 82aca44..000
--- a/1600_dm-crypt-limit-max-segment-size.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 586b286b110e94eb31840ac5afc0c24e0881fe34 Mon Sep 17 00:00:00 2001
-From: Mike Snitzer 
-Date: Wed, 9 Sep 2015 21:34:51 -0400
-Subject: dm crypt: constrain crypt device's max_segment_size to PAGE_SIZE
-
-Setting the dm-crypt device's max_segment_size to PAGE_SIZE is an
-unfortunate constraint that is required to avoid the potential for
-exceeding dm-crypt's underlying device's max_segments limits -- due to
-crypt_alloc_buffer() possibly allocating pages for the encryption bio
-that are not as physically contiguous as the original bio.
-
-It is interesting to note that this problem was already fixed back in
-2007 via commit 91e106259 ("dm crypt: use bio_add_page").  But Linux 4.0
-commit cf2f1abfb ("dm crypt: don't allocate pages for a partial
-request") regressed dm-crypt back to _not_ using bio_add_page().  But
-given dm-crypt's cpu parallelization changes all depend on commit
-cf2f1abfb's abandoning of the more complex io fragments processing that
-dm-crypt previously had we cannot easily go back to using
-bio_add_page().
-
-So all said the cleanest way to resolve this issue is to fix dm-crypt to
-properly constrain the original bios entering dm-crypt so the encryption
-bios that dm-crypt generates from the original bios are always
-compatible with the underlying device's max_segments queue limits.
-
-It should be noted that technically Linux 4.3 does _not_ need this fix
-because of the block core's new late bio-splitting capability.  But, it
-is reasoned, there is little to be gained by having the block core split
-the encrypted bio that is composed of PAGE_SIZE segments.  That said, in
-the future we may revert this change.
-
-Fixes: cf2f1abfb ("dm crypt: don't allocate pages for a partial request")
-Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=104421
-Suggested-by: Jeff Moyer 
-Signed-off-by: Mike Snitzer 
-Cc: sta...@vger.kernel.org # 4.0+
-
-diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
-index d60c88d..4b3b6f8 100644
 a/drivers/md/dm-crypt.c
-+++ b/drivers/md/dm-crypt.c
-@@ -968,7 +968,8 @@ static void crypt_free_buffer_pages(struct crypt_config 
*cc, struct bio *clone);
- 
- /*
-  * Generate a new unfragmented bio with the given size
-- * This should never violate the device limitations
-+ * This should never violate the device limitations (but only because
-+ * max_segment_size is being constrained to PAGE_SIZE).
-  *
-  * This function may be called concurrently. If we allocate from the mempool
-  * concurrently, there is a possibility of deadlock. For example, if we have
-@@ -2045,9 +2046,20 @@ static int crypt_iterate_devices(struct dm_target *ti,
-   return fn(ti, cc->dev, cc->start, ti->len, data);
- }
- 
-+static void crypt_io_hints(struct dm_target *ti, struct queue_limits *limits)
-+{
-+  /*
-+   * Unfortunate constraint that is required to avoid the potential
-+   * for exceeding underlying device's max_segments limits -- due to
-+   * crypt_alloc_buffer() possibly allocating pages for the encryption
-+   * bio that are not as physically contiguous as the original bio.
-+   */
-+  limits->max_segment_size = PAGE_SIZE;
-+}
-+
- static struct target_type crypt_target = {
-   .name  

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

2015-10-03 Thread Mike Pagano
commit: 516de23c184688cd1071c1c815fbb2e9827612ad
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Oct  3 16:07:16 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Oct  3 16:07:16 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=516de23c

Linux patch 4.1.10

 _README |4 +
 1009_linux-4.1.10.patch | 1353 +++
 2 files changed, 1357 insertions(+)

diff --git a/_README b/_README
index 348e8f5..b9b941a 100644
--- a/_README
+++ b/_README
@@ -79,6 +79,10 @@ Patch:  1008_linux-4.1.9.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.9
 
+Patch:  1009_linux-4.1.10.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.10
+
 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/1009_linux-4.1.10.patch b/1009_linux-4.1.10.patch
new file mode 100644
index 000..8d80808
--- /dev/null
+++ b/1009_linux-4.1.10.patch
@@ -0,0 +1,1353 @@
+diff --git a/Documentation/devicetree/bindings/net/ethernet.txt 
b/Documentation/devicetree/bindings/net/ethernet.txt
+index 41b3f3f864e8..5d88f37480b6 100644
+--- a/Documentation/devicetree/bindings/net/ethernet.txt
 b/Documentation/devicetree/bindings/net/ethernet.txt
+@@ -25,7 +25,11 @@ The following properties are common to the Ethernet 
controllers:
+   flow control thresholds.
+ - tx-fifo-depth: the size of the controller's transmit fifo in bytes. This
+   is used for components that can have configurable fifo sizes.
++- managed: string, specifies the PHY management type. Supported values are:
++  "auto", "in-band-status". "auto" is the default, it usess MDIO for
++  management if fixed-link is not specified.
+ 
+ Child nodes of the Ethernet controller are typically the individual PHY 
devices
+ connected via the MDIO bus (sometimes the MDIO bus controller is separate).
+ They are described in the phy.txt file in this same directory.
++For non-MDIO PHY management see fixed-link.txt.
+diff --git a/Makefile b/Makefile
+index e071176b2ce6..d02f16b510dc 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 9
++SUBLEVEL = 10
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/drivers/block/zram/zcomp.c b/drivers/block/zram/zcomp.c
+index f1ff39a3d1c1..54d946a9eee6 100644
+--- a/drivers/block/zram/zcomp.c
 b/drivers/block/zram/zcomp.c
+@@ -325,12 +325,14 @@ void zcomp_destroy(struct zcomp *comp)
+  * allocate new zcomp and initialize it. return compressing
+  * backend pointer or ERR_PTR if things went bad. ERR_PTR(-EINVAL)
+  * if requested algorithm is not supported, ERR_PTR(-ENOMEM) in
+- * case of allocation error.
++ * case of allocation error, or any other error potentially
++ * returned by functions zcomp_strm_{multi,single}_create.
+  */
+ struct zcomp *zcomp_create(const char *compress, int max_strm)
+ {
+   struct zcomp *comp;
+   struct zcomp_backend *backend;
++  int error;
+ 
+   backend = find_backend(compress);
+   if (!backend)
+@@ -342,12 +344,12 @@ struct zcomp *zcomp_create(const char *compress, int 
max_strm)
+ 
+   comp->backend = backend;
+   if (max_strm > 1)
+-  zcomp_strm_multi_create(comp, max_strm);
++  error = zcomp_strm_multi_create(comp, max_strm);
+   else
+-  zcomp_strm_single_create(comp);
+-  if (!comp->stream) {
++  error = zcomp_strm_single_create(comp);
++  if (error) {
+   kfree(comp);
+-  return ERR_PTR(-ENOMEM);
++  return ERR_PTR(error);
+   }
+   return comp;
+ }
+diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
+index cedb572bf25a..db9ebbc1a732 100644
+--- a/drivers/net/dsa/bcm_sf2.c
 b/drivers/net/dsa/bcm_sf2.c
+@@ -417,7 +417,7 @@ static int bcm_sf2_sw_fast_age_port(struct dsa_switch  
*ds, int port)
+   core_writel(priv, port, CORE_FAST_AGE_PORT);
+ 
+   reg = core_readl(priv, CORE_FAST_AGE_CTRL);
+-  reg |= EN_AGE_PORT | FAST_AGE_STR_DONE;
++  reg |= EN_AGE_PORT | EN_AGE_DYNAMIC | FAST_AGE_STR_DONE;
+   core_writel(priv, reg, CORE_FAST_AGE_CTRL);
+ 
+   do {
+@@ -431,6 +431,8 @@ static int bcm_sf2_sw_fast_age_port(struct dsa_switch  
*ds, int port)
+   if (!timeout)
+   return -ETIMEDOUT;
+ 
++  core_writel(priv, 0, CORE_FAST_AGE_CTRL);
++
+   return 0;
+ }
+ 
+@@ -506,7 +508,7 @@ static int bcm_sf2_sw_br_set_stp_state(struct dsa_switch 
*ds, int port,
+   u32 reg;
+ 
+   reg = core_readl(priv, CORE_G_PCTL_PORT(port));
+-  cur_hw_state = reg >> G_MISTP_STATE_SHIFT;
++  cur_hw_state = reg & (G_MISTP_STATE_MASK << G_MISTP_STATE_SHIFT);
+ 
+   switch (state) {
+   case BR_STATE_DISABLED:
+@@ -530,10 +532,12 @@ static int bcm_sf2_sw_br_set_stp_state(struct dsa_switch 
*ds, int port,
+   }
+ 
+   /* Fast-age ARL 

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

2015-10-02 Thread Mike Pagano
commit: cb0333eb392976ebff5a7d56008620f7c0862790
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Oct  2 12:08:15 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Oct  2 12:08:15 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=cb0333eb

inet: Patch to fix potential deadlock in reqsk_queue_unlink()

 _README|  4 +++
 2000_inet-deadlock-in-reqsk-queue-unlink-fix.patch | 32 ++
 2 files changed, 36 insertions(+)

diff --git a/_README b/_README
index 46b8cb0..348e8f5 100644
--- a/_README
+++ b/_README
@@ -91,6 +91,10 @@ Patch:  1600_dm-crypt-limit-max-segment-size.patch
 From:   https://bugzilla.kernel.org/show_bug.cgi?id=104421
 Desc:   dm crypt: constrain crypt device's max_segment_size to PAGE_SIZE.
 
+Patch:  2000_inet-deadlock-in-reqsk-queue-unlink-fix.patch
+From:   http://git.kernel.org/
+Desc:   inet: Patch to fix potential deadlock in reqsk_queue_unlink()
+
 Patch:  2700_ThinkPad-30-brightness-control-fix.patch
 From:   Seth Forshee 
 Desc:   ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads.

diff --git a/2000_inet-deadlock-in-reqsk-queue-unlink-fix.patch 
b/2000_inet-deadlock-in-reqsk-queue-unlink-fix.patch
new file mode 100644
index 000..890f5e5
--- /dev/null
+++ b/2000_inet-deadlock-in-reqsk-queue-unlink-fix.patch
@@ -0,0 +1,32 @@
+From 83fccfc3940c4a2db90fd7e7079f5b465cd8c6af Mon Sep 17 00:00:00 2001
+From: Eric Dumazet 
+Date: Thu, 13 Aug 2015 15:44:51 -0700
+Subject: inet: fix potential deadlock in reqsk_queue_unlink()
+
+When replacing del_timer() with del_timer_sync(), I introduced
+a deadlock condition :
+
+reqsk_queue_unlink() is called from inet_csk_reqsk_queue_drop()
+
+inet_csk_reqsk_queue_drop() can be called from many contexts,
+one being the timer handler itself (reqsk_timer_handler()).
+
+In this case, del_timer_sync() loops forever.
+
+Simple fix is to test if timer is pending.
+
+Fixes: 2235f2ac75fd ("inet: fix races with reqsk timers")
+Signed-off-by: Eric Dumazet 
+Signed-off-by: David S. Miller 
+
+--- a/net/ipv4/inet_connection_sock.c  2015-10-02 07:49:42.759957268 -0400
 b/net/ipv4/inet_connection_sock.c  2015-10-02 07:50:12.929957111 -0400
+@@ -584,7 +584,7 @@ static bool reqsk_queue_unlink(struct re
+   }
+ 
+   spin_unlock(>syn_wait_lock);
+-  if (del_timer_sync(>rsk_timer))
++  if (timer_pending(>rsk_timer) && del_timer_sync(>rsk_timer))
+   reqsk_put(req);
+   return found;
+ }



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

2015-09-28 Thread Mike Pagano
commit: c90ba25cf30f0a5d1aadc37493e2d3eb8e44c748
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Sep 28 23:57:34 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Sep 28 23:57:34 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=c90ba25c

dm crypt: constrain crypt device's max_segment_size to PAGE_SIZE. See bug 
#561558. Thanks to kipplasterjoe for reporting.

 _README|  4 ++
 1600_dm-crypt-limit-max-segment-size.patch | 84 ++
 2 files changed, 88 insertions(+)

diff --git a/_README b/_README
index b88684d..4a96d2e 100644
--- a/_README
+++ b/_README
@@ -83,6 +83,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:  1600_dm-crypt-limit-max-segment-size.patch
+From:   https://bugzilla.kernel.org/show_bug.cgi?id=104421
+Desc:   dm crypt: constrain crypt device's max_segment_size to PAGE_SIZE.
+
 Patch:  2700_ThinkPad-30-brightness-control-fix.patch
 From:   Seth Forshee 
 Desc:   ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads.

diff --git a/1600_dm-crypt-limit-max-segment-size.patch 
b/1600_dm-crypt-limit-max-segment-size.patch
new file mode 100644
index 000..82aca44
--- /dev/null
+++ b/1600_dm-crypt-limit-max-segment-size.patch
@@ -0,0 +1,84 @@
+From 586b286b110e94eb31840ac5afc0c24e0881fe34 Mon Sep 17 00:00:00 2001
+From: Mike Snitzer 
+Date: Wed, 9 Sep 2015 21:34:51 -0400
+Subject: dm crypt: constrain crypt device's max_segment_size to PAGE_SIZE
+
+Setting the dm-crypt device's max_segment_size to PAGE_SIZE is an
+unfortunate constraint that is required to avoid the potential for
+exceeding dm-crypt's underlying device's max_segments limits -- due to
+crypt_alloc_buffer() possibly allocating pages for the encryption bio
+that are not as physically contiguous as the original bio.
+
+It is interesting to note that this problem was already fixed back in
+2007 via commit 91e106259 ("dm crypt: use bio_add_page").  But Linux 4.0
+commit cf2f1abfb ("dm crypt: don't allocate pages for a partial
+request") regressed dm-crypt back to _not_ using bio_add_page().  But
+given dm-crypt's cpu parallelization changes all depend on commit
+cf2f1abfb's abandoning of the more complex io fragments processing that
+dm-crypt previously had we cannot easily go back to using
+bio_add_page().
+
+So all said the cleanest way to resolve this issue is to fix dm-crypt to
+properly constrain the original bios entering dm-crypt so the encryption
+bios that dm-crypt generates from the original bios are always
+compatible with the underlying device's max_segments queue limits.
+
+It should be noted that technically Linux 4.3 does _not_ need this fix
+because of the block core's new late bio-splitting capability.  But, it
+is reasoned, there is little to be gained by having the block core split
+the encrypted bio that is composed of PAGE_SIZE segments.  That said, in
+the future we may revert this change.
+
+Fixes: cf2f1abfb ("dm crypt: don't allocate pages for a partial request")
+Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=104421
+Suggested-by: Jeff Moyer 
+Signed-off-by: Mike Snitzer 
+Cc: sta...@vger.kernel.org # 4.0+
+
+diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
+index d60c88d..4b3b6f8 100644
+--- a/drivers/md/dm-crypt.c
 b/drivers/md/dm-crypt.c
+@@ -968,7 +968,8 @@ static void crypt_free_buffer_pages(struct crypt_config 
*cc, struct bio *clone);
+ 
+ /*
+  * Generate a new unfragmented bio with the given size
+- * This should never violate the device limitations
++ * This should never violate the device limitations (but only because
++ * max_segment_size is being constrained to PAGE_SIZE).
+  *
+  * This function may be called concurrently. If we allocate from the mempool
+  * concurrently, there is a possibility of deadlock. For example, if we have
+@@ -2045,9 +2046,20 @@ static int crypt_iterate_devices(struct dm_target *ti,
+   return fn(ti, cc->dev, cc->start, ti->len, data);
+ }
+ 
++static void crypt_io_hints(struct dm_target *ti, struct queue_limits *limits)
++{
++  /*
++   * Unfortunate constraint that is required to avoid the potential
++   * for exceeding underlying device's max_segments limits -- due to
++   * crypt_alloc_buffer() possibly allocating pages for the encryption
++   * bio that are not as physically contiguous as the original bio.
++   */
++  limits->max_segment_size = PAGE_SIZE;
++}
++
+ static struct target_type crypt_target = {
+   .name   = "crypt",
+-  .version = {1, 14, 0},
++  .version = {1, 14, 1},
+   .module = THIS_MODULE,
+   .ctr= crypt_ctr,
+   .dtr

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

2015-09-14 Thread Mike Pagano
commit: 8f2b461875c44efdd4cc8d0f80537f69c8ccf5a3
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Sep 14 15:20:19 2015 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Sep 14 15:20:19 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=8f2b4618

Linux patch 4.1.7

 _README|4 +
 1006_linux-4.1.7.patch | 3075 
 2 files changed, 3079 insertions(+)

diff --git a/_README b/_README
index 83ddebf..ad474e3 100644
--- a/_README
+++ b/_README
@@ -67,6 +67,10 @@ Patch:  1005_linux-4.1.6.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.6
 
+Patch:  1006_linux-4.1.7.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.7
+
 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/1006_linux-4.1.7.patch b/1006_linux-4.1.7.patch
new file mode 100644
index 000..8d4a5d9
--- /dev/null
+++ b/1006_linux-4.1.7.patch
@@ -0,0 +1,3075 @@
+diff --git a/Makefile b/Makefile
+index 838dabcb7f48..b8591e5f79b8 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 6
++SUBLEVEL = 7
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
+index f03a091cd076..dfcc0dd637e5 100644
+--- a/arch/arm/boot/dts/dra7.dtsi
 b/arch/arm/boot/dts/dra7.dtsi
+@@ -116,7 +116,7 @@
+   ranges = <0 0x2000 0x2000>;
+ 
+   scm_conf: scm_conf@0 {
+-  compatible = "syscon";
++  compatible = "syscon", "simple-bus";
+   reg = <0x0 0x1400>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
+index f74a8ded515f..38c786018a09 100644
+--- a/arch/arm/boot/dts/imx6qdl.dtsi
 b/arch/arm/boot/dts/imx6qdl.dtsi
+@@ -153,10 +153,10 @@
+   interrupt-names = "msi";
+   #interrupt-cells = <1>;
+   interrupt-map-mask = <0 0 0 0x7>;
+-  interrupt-map = <0 0 0 1  GIC_SPI 123 
IRQ_TYPE_LEVEL_HIGH>,
+-  <0 0 0 2  GIC_SPI 122 
IRQ_TYPE_LEVEL_HIGH>,
+-  <0 0 0 3  GIC_SPI 121 
IRQ_TYPE_LEVEL_HIGH>,
+-  <0 0 0 4  GIC_SPI 120 
IRQ_TYPE_LEVEL_HIGH>;
++  interrupt-map = <0 0 0 1  GIC_SPI 123 
IRQ_TYPE_LEVEL_HIGH>,
++  <0 0 0 2  GIC_SPI 122 
IRQ_TYPE_LEVEL_HIGH>,
++  <0 0 0 3  GIC_SPI 121 
IRQ_TYPE_LEVEL_HIGH>,
++  <0 0 0 4  GIC_SPI 120 
IRQ_TYPE_LEVEL_HIGH>;
+   clocks = < IMX6QDL_CLK_PCIE_AXI>,
+< IMX6QDL_CLK_LVDS1_GATE>,
+< IMX6QDL_CLK_PCIE_REF_125M>;
+diff --git a/arch/arm/boot/dts/omap2430.dtsi b/arch/arm/boot/dts/omap2430.dtsi
+index 11a7963be003..2390f387c271 100644
+--- a/arch/arm/boot/dts/omap2430.dtsi
 b/arch/arm/boot/dts/omap2430.dtsi
+@@ -51,7 +51,8 @@
+   };
+ 
+   scm_conf: scm_conf@270 {
+-  compatible = "syscon";
++  compatible = "syscon",
++   "simple-bus";
+   reg = <0x270 0x240>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
+index f884d6adb71e..84be9da74c7e 100644
+--- a/arch/arm/boot/dts/omap4.dtsi
 b/arch/arm/boot/dts/omap4.dtsi
+@@ -191,7 +191,8 @@
+   };
+ 
+   omap4_padconf_global: omap4_padconf_global@5a0 {
+-  compatible = "syscon";
++  compatible = "syscon",
++   "simple-bus";
+   reg = <0x5a0 0x170>;
+   #address-cells = <1>;
+   #size-cells = <1>;
+diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
+index 7d24ae0306b5..874a26f9dc0f 100644
+--- a/arch/arm/boot/dts/omap5.dtsi
 b/arch/arm/boot/dts/omap5.dtsi
+@@ -180,7 +180,8 @@
+   };
+ 
+   omap5_padconf_global: omap5_padconf_global@5a0 {
+-  compatible = "syscon";
++  

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

2015-08-12 Thread Mike Pagano
commit: bf5ec0ef3757347790f7c0269c3a657e2d1fdd2b
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Wed Aug 12 14:17:29 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Wed Aug 12 14:17:29 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=bf5ec0ef

kdbus patch update 8-12-2015

 _README|2 +-
 ...s-7-22-2015.patch = 5015_kdbus-8-12-2015.patch | 1265 
 2 files changed, 757 insertions(+), 510 deletions(-)

diff --git a/_README b/_README
index 148063b..fd7a57d 100644
--- a/_README
+++ b/_README
@@ -115,6 +115,6 @@ Patch:  
5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
 From:   https://github.com/graysky2/kernel_gcc_patch/
 Desc:   Kernel patch enables gcc = v4.9 optimizations for additional CPUs.
 
-Patch:  5015_kdbus-7-22-15.patch
+Patch:  5015_kdbus-8-12-2015.patch
 From:   https://lkml.org
 Desc:   Kernel-level IPC implementation

diff --git a/5015_kdbus-7-22-2015.patch b/5015_kdbus-8-12-2015.patch
similarity index 97%
rename from 5015_kdbus-7-22-2015.patch
rename to 5015_kdbus-8-12-2015.patch
index b110b5c..4e018f2 100644
--- a/5015_kdbus-7-22-2015.patch
+++ b/5015_kdbus-8-12-2015.patch
@@ -7482,10 +7482,10 @@ index 1a0006a..4842a98 100644
  header-y += kernelcapi.h
 diff --git a/include/uapi/linux/kdbus.h b/include/uapi/linux/kdbus.h
 new file mode 100644
-index 000..ecffc6b
+index 000..4fc44cb
 --- /dev/null
 +++ b/include/uapi/linux/kdbus.h
-@@ -0,0 +1,980 @@
+@@ -0,0 +1,984 @@
 +/*
 + * kdbus is free software; you can redistribute it and/or modify it under
 + * the terms of the GNU Lesser General Public License as published by the
@@ -8342,6 +8342,8 @@ index 000..ecffc6b
 + * @KDBUS_NAME_QUEUE: Name should be queued if busy
 + * @KDBUS_NAME_IN_QUEUE:  Name is queued
 + * @KDBUS_NAME_ACTIVATOR: Name is owned by a activator connection
++ * @KDBUS_NAME_PRIMARY:   Primary owner of the name
++ * @KDBUS_NAME_ACQUIRED:  Name was acquired/queued _now_
 + */
 +enum kdbus_name_flags {
 +  KDBUS_NAME_REPLACE_EXISTING = 1ULL   0,
@@ -8349,6 +8351,8 @@ index 000..ecffc6b
 +  KDBUS_NAME_QUEUE= 1ULL   2,
 +  KDBUS_NAME_IN_QUEUE = 1ULL   3,
 +  KDBUS_NAME_ACTIVATOR= 1ULL   4,
++  KDBUS_NAME_PRIMARY  = 1ULL   5,
++  KDBUS_NAME_ACQUIRED = 1ULL   6,
 +};
 +
 +/**
@@ -9072,10 +9076,10 @@ index 000..a67f825
 +}
 diff --git a/ipc/kdbus/bus.h b/ipc/kdbus/bus.h
 new file mode 100644
-index 000..238986e
+index 000..8c2acae
 --- /dev/null
 +++ b/ipc/kdbus/bus.h
-@@ -0,0 +1,99 @@
+@@ -0,0 +1,101 @@
 +/*
 + * Copyright (C) 2013-2015 Kay Sievers
 + * Copyright (C) 2013-2015 Greg Kroah-Hartman gre...@linuxfoundation.org
@@ -9122,6 +9126,7 @@ index 000..238986e
 + * @domain:   Domain of this bus
 + * @creator:  Creator of the bus
 + * @creator_meta: Meta information about the bus creator
++ * @last_message_id:  Last used message id
 + * @policy_db:Policy database for this bus
 + * @name_registry:Name registry of this bus
 + * @conn_rwlock:  Read/Write lock for all lists of child connections
@@ -9145,6 +9150,7 @@ index 000..238986e
 +  struct kdbus_meta_proc *creator_meta;
 +
 +  /* protected by own locks */
++  atomic64_t last_message_id;
 +  struct kdbus_policy_db policy_db;
 +  struct kdbus_name_registry *name_registry;
 +
@@ -9177,10 +9183,10 @@ index 000..238986e
 +#endif
 diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c
 new file mode 100644
-index 000..d94b417e
+index 000..ef63d65
 --- /dev/null
 +++ b/ipc/kdbus/connection.c
-@@ -0,0 +1,2207 @@
+@@ -0,0 +1,2227 @@
 +/*
 + * Copyright (C) 2013-2015 Kay Sievers
 + * Copyright (C) 2013-2015 Greg Kroah-Hartman gre...@linuxfoundation.org
@@ -9235,7 +9241,8 @@ index 000..d94b417e
 +#define KDBUS_CONN_ACTIVE_BIAS(INT_MIN + 2)
 +#define KDBUS_CONN_ACTIVE_NEW (INT_MIN + 1)
 +
-+static struct kdbus_conn *kdbus_conn_new(struct kdbus_ep *ep, bool privileged,
++static struct kdbus_conn *kdbus_conn_new(struct kdbus_ep *ep,
++   struct file *file,
 +   struct kdbus_cmd_hello *hello,
 +   const char *name,
 +   const struct kdbus_creds *creds,
@@ -9255,6 +9262,8 @@ index 000..d94b417e
 +  bool is_policy_holder;
 +  bool is_activator;
 +  bool is_monitor;
++  bool privileged;
++  bool owner;
 +  struct kvec kvec;
 +  int ret;
 +
@@ -9264,6 +9273,9 @@ index 000..d94b417e
 +  struct kdbus_bloom_parameter bloom;
 +  } bloom_item;
 +
++  privileged = kdbus_ep_is_privileged(ep, file);
++  owner = kdbus_ep_is_owner(ep, file);
++
 +  

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

2015-07-22 Thread Mike Pagano
commit: 03632db5397e289b513257c01a2149c7657a3c3c
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Wed Jul 22 10:31:21 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Wed Jul 22 10:31:21 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=03632db5

Update kdbus patch. 7-22-2015.

 _README|2 +-
 ...bus-7-17-15.patch = 5015_kdbus-7-22-2015.patch | 2609 +---
 2 files changed, 2 insertions(+), 2609 deletions(-)

diff --git a/_README b/_README
index 8e9fdc7..eab69c9 100644
--- a/_README
+++ b/_README
@@ -107,6 +107,6 @@ Patch:  
5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
 From:   https://github.com/graysky2/kernel_gcc_patch/
 Desc:   Kernel patch enables gcc = v4.9 optimizations for additional CPUs.
 
-Patch:  5015_kdbus-7-17-15.patch
+Patch:  5015_kdbus-7-22-15.patch
 From:   https://lkml.org
 Desc:   Kernel-level IPC implementation

diff --git a/5015_kdbus-7-17-15.patch b/5015_kdbus-7-22-2015.patch
similarity index 92%
rename from 5015_kdbus-7-17-15.patch
rename to 5015_kdbus-7-22-2015.patch
index 61102dd..b110b5c 100644
--- a/5015_kdbus-7-17-15.patch
+++ b/5015_kdbus-7-22-2015.patch
@@ -8,19 +8,6 @@ index bc05482..e2127a7 100644
 +  filesystems filesystems ia64 kdbus laptops mic misc-devices \
networking pcmcia prctl ptp spi timers vDSO video4linux \
watchdog
-diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt 
b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
-index f5a8ca2..750d577 100644
 a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
-+++ b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
-@@ -1,7 +1,7 @@
- * Marvell Armada 370 / Armada XP Ethernet Controller (NETA)
- 
- Required properties:
--- compatible: marvell,armada-370-neta or marvell,armada-xp-neta.
-+- compatible: should be marvell,armada-370-neta.
- - reg: address and length of the register set for the device.
- - interrupts: interrupt for the device
- - phy: See ethernet.txt file in the same directory.
 diff --git a/Documentation/ioctl/ioctl-number.txt 
b/Documentation/ioctl/ioctl-number.txt
 index 51f4221..ec7c81b 100644
 --- a/Documentation/ioctl/ioctl-number.txt
@@ -7470,20 +7457,9 @@ index d8afd29..02f7668 100644
  M:Vivek Goyal vgo...@redhat.com
  M:Haren Myneni hb...@us.ibm.com
 diff --git a/Makefile b/Makefile
-index cef84c0..a1c8d57 100644
+index f5c8983..a1c8d57 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -1,8 +1,8 @@
- VERSION = 4
- PATCHLEVEL = 1
--SUBLEVEL = 2
-+SUBLEVEL = 0
- EXTRAVERSION =
--NAME = Series 4800
-+NAME = Hurr durr I'ma sheep
- 
- # *DOCUMENTATION*
- # To see a list of typical targets execute make help
 @@ -1343,6 +1343,7 @@ $(help-board-dirs): help-%:
  %docs: scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts build_docproc
@@ -7492,2075 +7468,6 @@ index cef84c0..a1c8d57 100644
  
  else # KBUILD_EXTMOD
  
-diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi 
b/arch/arm/boot/dts/armada-370-xp.dtsi
-index 06a2f2a..ec96f0b 100644
 a/arch/arm/boot/dts/armada-370-xp.dtsi
-+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
-@@ -270,6 +270,7 @@
-   };
- 
-   eth0: ethernet@7 {
-+  compatible = marvell,armada-370-neta;
-   reg = 0x7 0x4000;
-   interrupts = 8;
-   clocks = gateclk 4;
-@@ -285,6 +286,7 @@
-   };
- 
-   eth1: ethernet@74000 {
-+  compatible = marvell,armada-370-neta;
-   reg = 0x74000 0x4000;
-   interrupts = 10;
-   clocks = gateclk 3;
-diff --git a/arch/arm/boot/dts/armada-370.dtsi 
b/arch/arm/boot/dts/armada-370.dtsi
-index ca4257b..00b50db5 100644
 a/arch/arm/boot/dts/armada-370.dtsi
-+++ b/arch/arm/boot/dts/armada-370.dtsi
-@@ -307,14 +307,6 @@
-   dmacap,memset;
-   };
-   };
--
--  ethernet@7 {
--  compatible = marvell,armada-370-neta;
--  };
--
--  ethernet@74000 {
--  compatible = marvell,armada-370-neta;
--  };
-   };
-   };
- };
-diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi 
b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
-index c5fdc99..8479fdc 100644
 a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
-+++ b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
-@@ -318,7 +318,7 @@
-   };
- 
-   eth3: ethernet@34000 {
--  compatible = marvell,armada-xp-neta;
-+  compatible = 

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

2015-07-22 Thread Mike Pagano
commit: 40044434d47f847553adb9b9cde5c31516fe435c
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Wed Jul 22 10:09:43 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Wed Jul 22 10:09:43 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=40044434

Linux patch 4.1.3

 _README|4 +
 1002_linux-4.1.3.patch | 3990 
 2 files changed, 3994 insertions(+)

diff --git a/_README b/_README
index 3b87439..8e9fdc7 100644
--- a/_README
+++ b/_README
@@ -51,6 +51,10 @@ Patch:  1001_linux-4.1.2.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.2
 
+Patch:  1002_linux-4.1.3.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.3
+
 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/1002_linux-4.1.3.patch b/1002_linux-4.1.3.patch
new file mode 100644
index 000..a9dbb97
--- /dev/null
+++ b/1002_linux-4.1.3.patch
@@ -0,0 +1,3990 @@
+diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt
+index 0f7afb2bb442..aef8cc5a677b 100644
+--- a/Documentation/DMA-API-HOWTO.txt
 b/Documentation/DMA-API-HOWTO.txt
+@@ -25,13 +25,18 @@ physical addresses.  These are the addresses in 
/proc/iomem.  The physical
+ address is not directly useful to a driver; it must use ioremap() to map
+ the space and produce a virtual address.
+ 
+-I/O devices use a third kind of address: a bus address or DMA address.
+-If a device has registers at an MMIO address, or if it performs DMA to read
+-or write system memory, the addresses used by the device are bus addresses.
+-In some systems, bus addresses are identical to CPU physical addresses, but
+-in general they are not.  IOMMUs and host bridges can produce arbitrary
++I/O devices use a third kind of address: a bus address.  If a device has
++registers at an MMIO address, or if it performs DMA to read or write system
++memory, the addresses used by the device are bus addresses.  In some
++systems, bus addresses are identical to CPU physical addresses, but in
++general they are not.  IOMMUs and host bridges can produce arbitrary
+ mappings between physical and bus addresses.
+ 
++From a device's point of view, DMA uses the bus address space, but it may
++be restricted to a subset of that space.  For example, even if a system
++supports 64-bit addresses for main memory and PCI BARs, it may use an IOMMU
++so devices only need to use 32-bit DMA addresses.
++
+ Here's a picture and some examples:
+ 
+CPU  CPU  Bus
+@@ -72,11 +77,11 @@ can use virtual address X to access the buffer, but the 
device itself
+ cannot because DMA doesn't go through the CPU virtual memory system.
+ 
+ In some simple systems, the device can do DMA directly to physical address
+-Y.  But in many others, there is IOMMU hardware that translates bus
++Y.  But in many others, there is IOMMU hardware that translates DMA
+ addresses to physical addresses, e.g., it translates Z to Y.  This is part
+ of the reason for the DMA API: the driver can give a virtual address X to
+ an interface like dma_map_single(), which sets up any required IOMMU
+-mapping and returns the bus address Z.  The driver then tells the device to
++mapping and returns the DMA address Z.  The driver then tells the device to
+ do DMA to Z, and the IOMMU maps it to the buffer at address Y in system
+ RAM.
+ 
+@@ -98,7 +103,7 @@ First of all, you should make sure
+ #include linux/dma-mapping.h
+ 
+ is in your driver, which provides the definition of dma_addr_t.  This type
+-can hold any valid DMA or bus address for the platform and should be used
++can hold any valid DMA address for the platform and should be used
+ everywhere you hold a DMA address returned from the DMA mapping functions.
+ 
+What memory is DMA'able?
+@@ -316,7 +321,7 @@ There are two types of DMA mappings:
+   Think of consistent as synchronous or coherent.
+ 
+   The current default is to return consistent memory in the low 32
+-  bits of the bus space.  However, for future compatibility you should
++  bits of the DMA space.  However, for future compatibility you should
+   set the consistent mask even if this default is fine for your
+   driver.
+ 
+@@ -403,7 +408,7 @@ dma_alloc_coherent() returns two values: the virtual 
address which you
+ can use to access it from the CPU and dma_handle which you pass to the
+ card.
+ 
+-The CPU virtual address and the DMA bus address are both
++The CPU virtual address and the DMA address are both
+ guaranteed to be aligned to the smallest PAGE_SIZE order which
+ is greater than or equal to the requested size.  This invariant
+ exists (for example) to guarantee that if you allocate a chunk
+@@ -645,8 +650,8 @@ PLEASE NOTE:  The 'nents' argument to the dma_unmap_sg 
call must be
+   

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

2015-07-10 Thread Mike Pagano
commit: 6de9c5bd82aa04106c0053e3e5da83ecea932eed
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Fri Jul 10 23:34:57 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Fri Jul 10 23:34:57 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=6de9c5bd

Linux patch 4.1.2

 _README|4 +
 1001_linux-4.1.2.patch | 2235 
 2 files changed, 2239 insertions(+)

diff --git a/_README b/_README
index 8bf61f5..784c55d 100644
--- a/_README
+++ b/_README
@@ -47,6 +47,10 @@ Patch:  1000_linux-4.1.1.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.1.1
 
+Patch:  1001_linux-4.1.2.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.2
+
 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/1001_linux-4.1.2.patch b/1001_linux-4.1.2.patch
new file mode 100644
index 000..c8b2f30
--- /dev/null
+++ b/1001_linux-4.1.2.patch
@@ -0,0 +1,2235 @@
+diff --git a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt 
b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
+index 750d577e8083..f5a8ca29aff0 100644
+--- a/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
 b/Documentation/devicetree/bindings/net/marvell-armada-370-neta.txt
+@@ -1,7 +1,7 @@
+ * Marvell Armada 370 / Armada XP Ethernet Controller (NETA)
+ 
+ Required properties:
+-- compatible: should be marvell,armada-370-neta.
++- compatible: marvell,armada-370-neta or marvell,armada-xp-neta.
+ - reg: address and length of the register set for the device.
+ - interrupts: interrupt for the device
+ - phy: See ethernet.txt file in the same directory.
+diff --git a/Makefile b/Makefile
+index 1caf4ad3eb8a..cef84c061f02 100644
+--- a/Makefile
 b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 1
++SUBLEVEL = 2
+ EXTRAVERSION =
+ NAME = Series 4800
+ 
+diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi 
b/arch/arm/boot/dts/armada-370-xp.dtsi
+index ec96f0b36346..06a2f2ae9d1e 100644
+--- a/arch/arm/boot/dts/armada-370-xp.dtsi
 b/arch/arm/boot/dts/armada-370-xp.dtsi
+@@ -270,7 +270,6 @@
+   };
+ 
+   eth0: ethernet@7 {
+-  compatible = marvell,armada-370-neta;
+   reg = 0x7 0x4000;
+   interrupts = 8;
+   clocks = gateclk 4;
+@@ -286,7 +285,6 @@
+   };
+ 
+   eth1: ethernet@74000 {
+-  compatible = marvell,armada-370-neta;
+   reg = 0x74000 0x4000;
+   interrupts = 10;
+   clocks = gateclk 3;
+diff --git a/arch/arm/boot/dts/armada-370.dtsi 
b/arch/arm/boot/dts/armada-370.dtsi
+index 00b50db57c9c..ca4257b2f77d 100644
+--- a/arch/arm/boot/dts/armada-370.dtsi
 b/arch/arm/boot/dts/armada-370.dtsi
+@@ -307,6 +307,14 @@
+   dmacap,memset;
+   };
+   };
++
++  ethernet@7 {
++  compatible = marvell,armada-370-neta;
++  };
++
++  ethernet@74000 {
++  compatible = marvell,armada-370-neta;
++  };
+   };
+   };
+ };
+diff --git a/arch/arm/boot/dts/armada-xp-mv78260.dtsi 
b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+index 8479fdc9e9c2..c5fdc99f0dbe 100644
+--- a/arch/arm/boot/dts/armada-xp-mv78260.dtsi
 b/arch/arm/boot/dts/armada-xp-mv78260.dtsi
+@@ -318,7 +318,7 @@
+   };
+ 
+   eth3: ethernet@34000 {
+-  compatible = marvell,armada-370-neta;
++  compatible = marvell,armada-xp-neta;
+   reg = 0x34000 0x4000;
+   interrupts = 14;
+   clocks = gateclk 1;
+diff --git a/arch/arm/boot/dts/armada-xp-mv78460.dtsi 
b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
+index 661d54c81580..0e24f1a38540 100644
+--- a/arch/arm/boot/dts/armada-xp-mv78460.dtsi
 b/arch/arm/boot/dts/armada-xp-mv78460.dtsi
+@@ -356,7 +356,7 @@
+   };
+ 
+   eth3: ethernet@34000 {
+-  compatible = marvell,armada-370-neta;
++  compatible = marvell,armada-xp-neta;
+   reg = 0x34000 0x4000;
+   interrupts = 14;
+   clocks = gateclk 1;
+diff --git a/arch/arm/boot/dts/armada-xp.dtsi 
b/arch/arm/boot/dts/armada-xp.dtsi
+index 013d63f69e36..8fdd6d7c0ab1 100644
+--- a/arch/arm/boot/dts/armada-xp.dtsi
 

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

2015-07-01 Thread Mike Pagano
commit: b441dda5fa50d4b8c51ccf0641501d3574851296
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Wed Jul  1 15:33:29 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Wed Jul  1 15:33:29 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b441dda5

Add the 4.1.1 patchset. For real this time.

 _README|   4 +
 1000_linux-4.1.1.patch | 388 +
 2 files changed, 392 insertions(+)

diff --git a/_README b/_README
index dd82b40..8bf61f5 100644
--- a/_README
+++ b/_README
@@ -43,6 +43,10 @@ EXPERIMENTAL
 Individual Patch Descriptions:
 --
 
+Patch:  1000_linux-4.1.1.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.1.1
+
 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/1000_linux-4.1.1.patch b/1000_linux-4.1.1.patch
new file mode 100644
index 000..658aefa
--- /dev/null
+++ b/1000_linux-4.1.1.patch
@@ -0,0 +1,388 @@
+diff --git a/Makefile b/Makefile
+index f5c8983aeeb7..1caf4ad3eb8a 100644
+--- a/Makefile
 b/Makefile
+@@ -1,8 +1,8 @@
+ VERSION = 4
+ PATCHLEVEL = 1
+-SUBLEVEL = 0
++SUBLEVEL = 1
+ EXTRAVERSION =
+-NAME = Hurr durr I'ma sheep
++NAME = Series 4800
+ 
+ # *DOCUMENTATION*
+ # To see a list of typical targets execute make help
+diff --git a/arch/x86/kernel/cpu/perf_event.c 
b/arch/x86/kernel/cpu/perf_event.c
+index 4f7001f28936..aa4e3a74e541 100644
+--- a/arch/x86/kernel/cpu/perf_event.c
 b/arch/x86/kernel/cpu/perf_event.c
+@@ -270,11 +270,7 @@ msr_fail:
+ 
+ static void hw_perf_event_destroy(struct perf_event *event)
+ {
+-  if (atomic_dec_and_mutex_lock(active_events, pmc_reserve_mutex)) {
+-  release_pmc_hardware();
+-  release_ds_buffers();
+-  mutex_unlock(pmc_reserve_mutex);
+-  }
++  x86_release_hardware();
+ }
+ 
+ void hw_perf_lbr_event_destroy(struct perf_event *event)
+@@ -324,6 +320,35 @@ set_ext_hw_attr(struct hw_perf_event *hwc, struct 
perf_event *event)
+   return x86_pmu_extra_regs(val, event);
+ }
+ 
++int x86_reserve_hardware(void)
++{
++  int err = 0;
++
++  if (!atomic_inc_not_zero(active_events)) {
++  mutex_lock(pmc_reserve_mutex);
++  if (atomic_read(active_events) == 0) {
++  if (!reserve_pmc_hardware())
++  err = -EBUSY;
++  else
++  reserve_ds_buffers();
++  }
++  if (!err)
++  atomic_inc(active_events);
++  mutex_unlock(pmc_reserve_mutex);
++  }
++
++  return err;
++}
++
++void x86_release_hardware(void)
++{
++  if (atomic_dec_and_mutex_lock(active_events, pmc_reserve_mutex)) {
++  release_pmc_hardware();
++  release_ds_buffers();
++  mutex_unlock(pmc_reserve_mutex);
++  }
++}
++
+ /*
+  * Check if we can create event of a certain type (that no conflicting events
+  * are present).
+@@ -336,9 +361,10 @@ int x86_add_exclusive(unsigned int what)
+   return 0;
+ 
+   mutex_lock(pmc_reserve_mutex);
+-  for (i = 0; i  ARRAY_SIZE(x86_pmu.lbr_exclusive); i++)
++  for (i = 0; i  ARRAY_SIZE(x86_pmu.lbr_exclusive); i++) {
+   if (i != what  atomic_read(x86_pmu.lbr_exclusive[i]))
+   goto out;
++  }
+ 
+   atomic_inc(x86_pmu.lbr_exclusive[what]);
+   ret = 0;
+@@ -527,19 +553,7 @@ static int __x86_pmu_event_init(struct perf_event *event)
+   if (!x86_pmu_initialized())
+   return -ENODEV;
+ 
+-  err = 0;
+-  if (!atomic_inc_not_zero(active_events)) {
+-  mutex_lock(pmc_reserve_mutex);
+-  if (atomic_read(active_events) == 0) {
+-  if (!reserve_pmc_hardware())
+-  err = -EBUSY;
+-  else
+-  reserve_ds_buffers();
+-  }
+-  if (!err)
+-  atomic_inc(active_events);
+-  mutex_unlock(pmc_reserve_mutex);
+-  }
++  err = x86_reserve_hardware();
+   if (err)
+   return err;
+ 
+diff --git a/arch/x86/kernel/cpu/perf_event.h 
b/arch/x86/kernel/cpu/perf_event.h
+index ef78516850fb..f068695eaca0 100644
+--- a/arch/x86/kernel/cpu/perf_event.h
 b/arch/x86/kernel/cpu/perf_event.h
+@@ -703,6 +703,10 @@ int x86_add_exclusive(unsigned int what);
+ 
+ void x86_del_exclusive(unsigned int what);
+ 
++int x86_reserve_hardware(void);
++
++void x86_release_hardware(void);
++
+ void hw_perf_lbr_event_destroy(struct perf_event *event);
+ 
+ int x86_setup_perfctr(struct perf_event *event);
+diff --git a/arch/x86/kernel/cpu/perf_event_intel.c 
b/arch/x86/kernel/cpu/perf_event_intel.c
+index 

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

2015-06-27 Thread Mike Pagano
commit: 45ecdfc0d977755e3f15ba10a6b4fdb93581357b
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Sat Jun 27 19:50:31 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Sat Jun 27 19:50:31 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=45ecdfc0

Update kdbus patch, rename for clarity

 _README|2 +-
 ...kdbus-4.1-rc1.patch = 5015_kdbus-6-27-15.patch | 1765 ++--
 2 files changed, 504 insertions(+), 1263 deletions(-)

diff --git a/_README b/_README
index d33ec2f..dd82b40 100644
--- a/_README
+++ b/_README
@@ -83,6 +83,6 @@ Patch:  
5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
 From:   https://github.com/graysky2/kernel_gcc_patch/
 Desc:   Kernel patch enables gcc = v4.9 optimizations for additional CPUs.
 
-Patch:  5015_kdbus-4.1-rc1.patch
+Patch:  5015_kdbus-6-27-15.patch
 From:   https://lkml.org
 Desc:   Kernel-level IPC implementation

diff --git a/5015_kdbus-4.1-rc1.patch b/5015_kdbus-6-27-15.patch
similarity index 96%
rename from 5015_kdbus-4.1-rc1.patch
rename to 5015_kdbus-6-27-15.patch
index a5169bd..bc17abe 100644
--- a/5015_kdbus-4.1-rc1.patch
+++ b/5015_kdbus-6-27-15.patch
@@ -1,15 +1,15 @@
 diff --git a/Documentation/Makefile b/Documentation/Makefile
-index 6883a1b..5e3fde6 100644
+index bc05482..e2127a7 100644
 --- a/Documentation/Makefile
 +++ b/Documentation/Makefile
 @@ -1,4 +1,4 @@
- subdir-y := accounting arm auxdisplay blackfin connector \
+ subdir-y := accounting auxdisplay blackfin connector \
 -  filesystems filesystems ia64 laptops mic misc-devices \
 +  filesystems filesystems ia64 kdbus laptops mic misc-devices \
networking pcmcia prctl ptp spi timers vDSO video4linux \
watchdog
 diff --git a/Documentation/ioctl/ioctl-number.txt 
b/Documentation/ioctl/ioctl-number.txt
-index 8136e1f..54e091e 100644
+index 51f4221..ec7c81b 100644
 --- a/Documentation/ioctl/ioctl-number.txt
 +++ b/Documentation/ioctl/ioctl-number.txt
 @@ -292,6 +292,7 @@ Code  Seq#(hex)Include FileComments
@@ -2262,7 +2262,7 @@ index 000..8c2a90e
 +/refentry
 diff --git a/Documentation/kdbus/kdbus.item.xml 
b/Documentation/kdbus/kdbus.item.xml
 new file mode 100644
-index 000..09f8b90
+index 000..ee09dfa
 --- /dev/null
 +++ b/Documentation/kdbus/kdbus.item.xml
 @@ -0,0 +1,839 @@
@@ -2337,13 +2337,13 @@ index 000..09f8b90
 +#define KDBUS_ALIGN8(val) (((val) + 7)  ~7)
 +
 +#define KDBUS_ITEM_NEXT(item) \
-+(typeof(item))(((uint8_t *)item) + KDBUS_ALIGN8((item)-size))
++(typeof(item))((uint8_t *)(item) + KDBUS_ALIGN8((item)-size))
 +
 +#define KDBUS_ITEM_FOREACH(item, head, first)  \
-+for (item = (head)-first; \
++for ((item) = (head)-first;   \
 + ((uint8_t *)(item)  (uint8_t *)(head) + (head)-size)  \
 +  ((uint8_t *)(item) = (uint8_t *)(head));\
-+ item = KDBUS_ITEM_NEXT(item))
++ (item) = KDBUS_ITEM_NEXT(item))
 +  ]]/programlisting
 +/refsect2
 +  /refsect1
@@ -7450,10 +7450,10 @@ index 000..52565ea
 +  /template
 +/stylesheet
 diff --git a/MAINTAINERS b/MAINTAINERS
-index 6239a30..e924246 100644
+index d8afd29..02f7668 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -5503,6 +5503,19 @@ S:  Maintained
+@@ -5585,6 +5585,19 @@ S:  Maintained
  F:Documentation/kbuild/kconfig-language.txt
  F:scripts/kconfig/
  
@@ -7474,10 +7474,10 @@ index 6239a30..e924246 100644
  M:Vivek Goyal vgo...@redhat.com
  M:Haren Myneni hb...@us.ibm.com
 diff --git a/Makefile b/Makefile
-index 1100ff3..08c9818 100644
+index f5c8983..a1c8d57 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -1350,6 +1350,7 @@ $(help-board-dirs): help-%:
+@@ -1343,6 +1343,7 @@ $(help-board-dirs): help-%:
  %docs: scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts build_docproc
$(Q)$(MAKE) $(build)=Documentation/DocBook $@
@@ -7486,10 +7486,10 @@ index 1100ff3..08c9818 100644
  else # KBUILD_EXTMOD
  
 diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
-index 68ceb97..ddc413e 100644
+index 1a0006a..4842a98 100644
 --- a/include/uapi/linux/Kbuild
 +++ b/include/uapi/linux/Kbuild
-@@ -214,6 +214,7 @@ header-y += ixjuser.h
+@@ -215,6 +215,7 @@ header-y += ixjuser.h
  header-y += jffs2.h
  header-y += joystick.h
  header-y += kcmp.h
@@ -8483,10 +8483,10 @@ index 000..00a6e14
 +
 +#endif /* _UAPI_KDBUS_H_ */
 diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
-index 7d664ea..1cf05c0 100644
+index 7b1425a..ce2ac5a 100644
 --- a/include/uapi/linux/magic.h
 +++ b/include/uapi/linux/magic.h
-@@ -74,4 +74,6 @@
+@@ -76,4 +76,6 @@
  #define BTRFS_TEST_MAGIC  0x73727279
  #define NSFS_MAGIC0x6e736673
  
@@ -8494,7 +8494,7 @@ index 7d664ea..1cf05c0 100644
 +
  #endif /* __LINUX_MAGIC_H__ */
 diff --git 

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

2015-06-20 Thread Mike Pagano
commit: d02e0e858201a0d8f313e24e2a9e288186007ea4
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Sat Jun 20 17:37:33 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Sat Jun 20 17:37:33 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=d02e0e85

Add check to saved_root_name for supported filesystem path naming.

 2900_dev-root-proc-mount-fix.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/2900_dev-root-proc-mount-fix.patch 
b/2900_dev-root-proc-mount-fix.patch
index 6ea86e2..4cd558e 100644
--- a/2900_dev-root-proc-mount-fix.patch
+++ b/2900_dev-root-proc-mount-fix.patch
@@ -18,7 +18,7 @@
  #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:4.1 commit in: /

2015-06-08 Thread Mike Pagano
commit: d9e0ab9c31aaa675ae74c89e5264d14f2082e02f
Author: Mike Pagano mpagano AT gentoo DOT org
AuthorDate: Mon Jun  8 17:59:22 2015 +
Commit: Mike Pagano mpagano AT gentoo DOT org
CommitDate: Mon Jun  8 17:59:22 2015 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=d9e0ab9c

Patch to enable link security restrictions by default. Patch to disable Windows 
8 compatibility for some Lenovo ThinkPads.  Patch to ensure that /dev/root 
doesn't appear in /proc/mounts when bootint without an initramfs.  Path to not 
not lock when UMH is waiting on current thread spawned by linuxrc. (bug 
#481344) fbcondecor bootsplash patch. Kernel patch that enables gcc  v4.9 
optimizations for additional CPUs.   Fix for lz4 compression. Add patch to 
support namespace user.pax.* on tmpfs, bug #470644.

 _README|   32 +
 ...ble-link-security-restrictions-by-default.patch |   22 +
 2700_ThinkPad-30-brightness-control-fix.patch  |   67 +
 2900_dev-root-proc-mount-fix.patch |   30 +
 2905_2disk-resume-image-fix.patch  |   24 +
 2910_lz4-compression-fix.patch |   30 +
 4200_fbcondecor-3.19.patch | 2119 
 ...able-additional-cpu-optimizations-for-gcc.patch |  327 +++
 ...-additional-cpu-optimizations-for-gcc-4.9.patch |  402 
 9 files changed, 3053 insertions(+)

diff --git a/_README b/_README
index 36c2b96..69f60dc 100644
--- a/_README
+++ b/_README
@@ -47,6 +47,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.
 
+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:  2700_ThinkPad-30-brightness-control-fix.patch
+From:   Seth Forshee seth.fors...@canonical.com
+Desc:   ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads.
+
+Patch:  2900_dev-root-proc-mount-fix.patch
+From:   https://bugs.gentoo.org/show_bug.cgi?id=438380
+Desc:   Ensure that /dev/root doesn't appear in /proc/mounts when bootint 
without an initramfs.
+
+Patch:  2905_s2disk-resume-image-fix.patch
+From:   Al Viro viro at ZenIV.linux.org.uk
+Desc:   Do not lock when UMH is waiting on current thread spawned by linuxrc. 
(bug #481344)
+
+Patch:  2910_lz4-compression-fix.patch
+From:   https://bugs.gentoo.org/show_bug.cgi?id=546422
+Desc:   Fix for lz4 compression regression. Thanks to Christian Xia. See bug 
#546422.
+
+Patch:  4200_fbcondecor-3.19.patch
+From:   http://www.mepiscommunity.org/fbcondecor
+Desc:   Bootsplash ported by Marco. (Bug #539616)
+
 Patch:  4567_distro-Gentoo-Kconfig.patch
 From:   Tom Wijsman tom...@gentoo.org
 Desc:   Add Gentoo Linux support config settings and defaults.
+
+Patch:  5000_enable-additional-cpu-optimizations-for-gcc.patch
+From:   https://github.com/graysky2/kernel_gcc_patch/
+Desc:   Kernel patch enables gcc  v4.9 optimizations for additional CPUs.
+
+Patch:  5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
+From:   https://github.com/graysky2/kernel_gcc_patch/
+Desc:   Kernel patch enables gcc = v4.9 optimizations for additional CPUs.

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

diff --git a/2700_ThinkPad-30-brightness-control-fix.patch 
b/2700_ThinkPad-30-brightness-control-fix.patch
new file mode 100644
index 000..b548c6d
--- /dev/null
+++ b/2700_ThinkPad-30-brightness-control-fix.patch
@@ -0,0 +1,67 @@
+diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
+index cb96296..6c242ed 100644
+--- a/drivers/acpi/blacklist.c
 b/drivers/acpi/blacklist.c
+@@ -269,6 +276,61 @@  static struct dmi_system_id acpi_osi_dmi_table[] 
__initdata = {
+   },
+ 
+   /*
++   * The following Lenovo models have a broken