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

2019-03-19 Thread Mike Pagano
commit: dadae5e6ec2d9d5e86edccb8cbeb728efc26033c
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue Mar 19 16:59:01 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue Mar 19 16:59:01 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=dadae5e6

proj/linux-patches; Linux patch 4.20.17

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |4 +
 1016_linux-4.20.17.patch | 1645 ++
 2 files changed, 1649 insertions(+)

diff --git a/_README b/_README
index 516aaa4..5542a05 100644
--- a/_README
+++ b/_README
@@ -107,6 +107,10 @@ Patch:  1015_linux-4.20.16.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.20.16
 
+Patch:  1016_linux-4.20.17.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.17
+
 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/1016_linux-4.20.17.patch b/1016_linux-4.20.17.patch
new file mode 100644
index 000..cfee915
--- /dev/null
+++ b/1016_linux-4.20.17.patch
@@ -0,0 +1,1645 @@
+diff --git a/Makefile b/Makefile
+index 2979ad27e16a..b15adbe428d9 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 20
+-SUBLEVEL = 16
++SUBLEVEL = 17
+ EXTRAVERSION =
+ NAME = Shy Crocodile
+ 
+diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
+index 3d77c736299f..93a31cf01852 100644
+--- a/arch/x86/events/intel/core.c
 b/arch/x86/events/intel/core.c
+@@ -3398,7 +3398,7 @@ tfa_get_event_constraints(struct cpu_hw_events *cpuc, 
int idx,
+   /*
+* Without TFA we must not use PMC3.
+*/
+-  if (!allow_tsx_force_abort && test_bit(3, c->idxmsk)) {
++  if (!allow_tsx_force_abort && test_bit(3, c->idxmsk) && idx >= 0) {
+   c = dyn_constraint(cpuc, c, idx);
+   c->idxmsk64 &= ~(1ULL << 3);
+   c->weight--;
+@@ -4142,7 +4142,7 @@ static struct attribute *intel_pmu_caps_attrs[] = {
+NULL
+ };
+ 
+-DEVICE_BOOL_ATTR(allow_tsx_force_abort, 0644, allow_tsx_force_abort);
++static DEVICE_BOOL_ATTR(allow_tsx_force_abort, 0644, allow_tsx_force_abort);
+ 
+ static struct attribute *intel_pmu_attrs[] = {
+   _attr_freeze_on_smi.attr,
+diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h
+index a345d079f876..acd72e669c04 100644
+--- a/arch/x86/events/perf_event.h
 b/arch/x86/events/perf_event.h
+@@ -1032,12 +1032,12 @@ static inline int intel_pmu_init(void)
+   return 0;
+ }
+ 
+-static inline int intel_cpuc_prepare(struct cpu_hw_event *cpuc, int cpu)
++static inline int intel_cpuc_prepare(struct cpu_hw_events *cpuc, int cpu)
+ {
+   return 0;
+ }
+ 
+-static inline void intel_cpuc_finish(struct cpu_hw_event *cpuc)
++static inline void intel_cpuc_finish(struct cpu_hw_events *cpuc)
+ {
+ }
+ 
+diff --git a/drivers/connector/cn_proc.c b/drivers/connector/cn_proc.c
+index ed5e42461094..ad48fd52cb53 100644
+--- a/drivers/connector/cn_proc.c
 b/drivers/connector/cn_proc.c
+@@ -250,6 +250,7 @@ void proc_coredump_connector(struct task_struct *task)
+ {
+   struct cn_msg *msg;
+   struct proc_event *ev;
++  struct task_struct *parent;
+   __u8 buffer[CN_PROC_MSG_SIZE] __aligned(8);
+ 
+   if (atomic_read(_event_num_listeners) < 1)
+@@ -262,8 +263,14 @@ void proc_coredump_connector(struct task_struct *task)
+   ev->what = PROC_EVENT_COREDUMP;
+   ev->event_data.coredump.process_pid = task->pid;
+   ev->event_data.coredump.process_tgid = task->tgid;
+-  ev->event_data.coredump.parent_pid = task->real_parent->pid;
+-  ev->event_data.coredump.parent_tgid = task->real_parent->tgid;
++
++  rcu_read_lock();
++  if (pid_alive(task)) {
++  parent = rcu_dereference(task->real_parent);
++  ev->event_data.coredump.parent_pid = parent->pid;
++  ev->event_data.coredump.parent_tgid = parent->tgid;
++  }
++  rcu_read_unlock();
+ 
+   memcpy(>id, _proc_event_id, sizeof(msg->id));
+   msg->ack = 0; /* not used */
+@@ -276,6 +283,7 @@ void proc_exit_connector(struct task_struct *task)
+ {
+   struct cn_msg *msg;
+   struct proc_event *ev;
++  struct task_struct *parent;
+   __u8 buffer[CN_PROC_MSG_SIZE] __aligned(8);
+ 
+   if (atomic_read(_event_num_listeners) < 1)
+@@ -290,8 +298,14 @@ void proc_exit_connector(struct task_struct *task)
+   ev->event_data.exit.process_tgid = task->tgid;
+   ev->event_data.exit.exit_code = task->exit_code;
+   ev->event_data.exit.exit_signal = task->exit_signal;
+-  ev->event_data.exit.parent_pid = task->real_parent->pid;
+-  ev->event_data.exit.parent_tgid = task->real_parent->tgid;
++
++  rcu_read_lock();
++  if (pid_alive(task)) {
++  parent = rcu_dereference(task->real_parent);
++  

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

2019-03-10 Thread Mike Pagano
commit: 12f3c647f24bfba1d73bc6cf0fec459faa52b455
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Mar 10 14:13:54 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Mar 10 14:13:54 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=12f3c647

proj/linux-patches: Linux patch 4.20.15

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |4 +
 1014_linux-4.20.15.patch | 3168 ++
 2 files changed, 3172 insertions(+)

diff --git a/_README b/_README
index dd1fcee..dd61e24 100644
--- a/_README
+++ b/_README
@@ -99,6 +99,10 @@ Patch:  1013_linux-4.20.14.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.20.14
 
+Patch:  1014_linux-4.20.15.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.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.20.15.patch b/1014_linux-4.20.15.patch
new file mode 100644
index 000..6fee7b4
--- /dev/null
+++ b/1014_linux-4.20.15.patch
@@ -0,0 +1,3168 @@
+diff --git a/Makefile b/Makefile
+index f7baaa0a3164b..25b45c24bac0b 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 20
+-SUBLEVEL = 14
++SUBLEVEL = 15
+ EXTRAVERSION =
+ NAME = Shy Crocodile
+ 
+diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
+index ba150c755fcce..85b6c60f285d2 100644
+--- a/arch/mips/kernel/irq.c
 b/arch/mips/kernel/irq.c
+@@ -52,6 +52,7 @@ asmlinkage void spurious_interrupt(void)
+ void __init init_IRQ(void)
+ {
+   int i;
++  unsigned int order = get_order(IRQ_STACK_SIZE);
+ 
+   for (i = 0; i < NR_IRQS; i++)
+   irq_set_noprobe(i);
+@@ -62,8 +63,7 @@ void __init init_IRQ(void)
+   arch_init_irq();
+ 
+   for_each_possible_cpu(i) {
+-  int irq_pages = IRQ_STACK_SIZE / PAGE_SIZE;
+-  void *s = (void *)__get_free_pages(GFP_KERNEL, irq_pages);
++  void *s = (void *)__get_free_pages(GFP_KERNEL, order);
+ 
+   irq_stack[i] = s;
+   pr_debug("CPU%d IRQ stack at 0x%p - 0x%p\n", i,
+diff --git a/arch/x86/boot/compressed/pgtable_64.c 
b/arch/x86/boot/compressed/pgtable_64.c
+index 9e21573714910..f8debf7aeb4c1 100644
+--- a/arch/x86/boot/compressed/pgtable_64.c
 b/arch/x86/boot/compressed/pgtable_64.c
+@@ -1,5 +1,7 @@
++#include 
+ #include 
+ #include 
++#include 
+ #include "pgtable.h"
+ #include "../string.h"
+ 
+@@ -37,9 +39,10 @@ int cmdline_find_option_bool(const char *option);
+ 
+ static unsigned long find_trampoline_placement(void)
+ {
+-  unsigned long bios_start, ebda_start;
++  unsigned long bios_start = 0, ebda_start = 0;
+   unsigned long trampoline_start;
+   struct boot_e820_entry *entry;
++  char *signature;
+   int i;
+ 
+   /*
+@@ -47,8 +50,18 @@ static unsigned long find_trampoline_placement(void)
+* This code is based on reserve_bios_regions().
+*/
+ 
+-  ebda_start = *(unsigned short *)0x40e << 4;
+-  bios_start = *(unsigned short *)0x413 << 10;
++  /*
++   * EFI systems may not provide legacy ROM. The memory may not be mapped
++   * at all.
++   *
++   * Only look for values in the legacy ROM for non-EFI system.
++   */
++  signature = (char *)_params->efi_info.efi_loader_signature;
++  if (strncmp(signature, EFI32_LOADER_SIGNATURE, 4) &&
++  strncmp(signature, EFI64_LOADER_SIGNATURE, 4)) {
++  ebda_start = *(unsigned short *)0x40e << 4;
++  bios_start = *(unsigned short *)0x413 << 10;
++  }
+ 
+   if (bios_start < BIOS_START_MIN || bios_start > BIOS_START_MAX)
+   bios_start = BIOS_START_MAX;
+diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
+index eeea634bee0a7..6a25278e00929 100644
+--- a/arch/x86/kernel/cpu/amd.c
 b/arch/x86/kernel/cpu/amd.c
+@@ -818,11 +818,9 @@ static void init_amd_bd(struct cpuinfo_x86 *c)
+ static void init_amd_zn(struct cpuinfo_x86 *c)
+ {
+   set_cpu_cap(c, X86_FEATURE_ZEN);
+-  /*
+-   * Fix erratum 1076: CPB feature bit not being set in CPUID. It affects
+-   * all up to and including B1.
+-   */
+-  if (c->x86_model <= 1 && c->x86_stepping <= 1)
++
++  /* Fix erratum 1076: CPB feature bit not being set in CPUID. */
++  if (!cpu_has(c, X86_FEATURE_CPB))
+   set_cpu_cap(c, X86_FEATURE_CPB);
+ }
+ 
+diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
+index 4bb68133a72af..5a0e0bd68b769 100644
+--- a/arch/xtensa/kernel/process.c
 b/arch/xtensa/kernel/process.c
+@@ -320,8 +320,8 @@ unsigned long get_wchan(struct task_struct *p)
+ 
+   /* Stack layout: sp-4: ra, sp-3: sp' */
+ 
+-  pc = MAKE_PC_FROM_RA(*(unsigned long*)sp - 4, sp);
+-  sp = *(unsigned long *)sp - 3;
++  

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

2019-03-06 Thread Mike Pagano
commit: 963e5e66d6b39cfb1822b6ba71493be6a20dcb92
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Mar  6 19:02:34 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Mar  6 19:02:34 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=963e5e66

proj/linux-patches: powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning

See bug #679430

Signed-off-by: Mike Pagano  gentoo.org>

 _README|   4 +
 ...pc-vr-get-set-change-to-avoid-gcc-warning.patch | 115 +
 2 files changed, 119 insertions(+)

diff --git a/_README b/_README
index acd1952..dd1fcee 100644
--- a/_README
+++ b/_README
@@ -107,6 +107,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:  1700_ppc-vr-get-set-change-to-avoid-gcc-warning.patch
+From:   
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/patch/?id=ca6d5149d2ad0a8d2f9c28cbe379802260a0a5e0
+Desc:   powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning
+
 Patch:  2500_usb-storage-Disable-UAS-on-JMicron-SATA-enclosure.patch
 From:   https://bugzilla.redhat.com/show_bug.cgi?id=1260207#c5
 Desc:   Add UAS disable quirk. See bug #640082.

diff --git a/1700_ppc-vr-get-set-change-to-avoid-gcc-warning.patch 
b/1700_ppc-vr-get-set-change-to-avoid-gcc-warning.patch
new file mode 100644
index 000..bed4b41
--- /dev/null
+++ b/1700_ppc-vr-get-set-change-to-avoid-gcc-warning.patch
@@ -0,0 +1,115 @@
+From ca6d5149d2ad0a8d2f9c28cbe379802260a0a5e0 Mon Sep 17 00:00:00 2001
+From: Michael Ellerman 
+Date: Thu, 14 Feb 2019 11:08:29 +1100
+Subject: powerpc/ptrace: Simplify vr_get/set() to avoid GCC warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 8 warns about the logic in vr_get/set(), which with -Werror breaks
+the build:
+
+  In function ‘user_regset_copyin’,
+  inlined from ‘vr_set’ at arch/powerpc/kernel/ptrace.c:628:9:
+  include/linux/regset.h:295:4: error: ‘memcpy’ offset [-527, -529] is
+  out of the bounds [0, 16] of object ‘vrsave’ with type ‘union
+  ’ [-Werror=array-bounds]
+  arch/powerpc/kernel/ptrace.c: In function ‘vr_set’:
+  arch/powerpc/kernel/ptrace.c:623:5: note: ‘vrsave’ declared here
+ } vrsave;
+
+This has been identified as a regression in GCC, see GCC bug 88273.
+
+However we can avoid the warning and also simplify the logic and make
+it more robust.
+
+Currently we pass -1 as end_pos to user_regset_copyout(). This says
+"copy up to the end of the regset".
+
+The definition of the regset is:
+   [REGSET_VMX] = {
+   .core_note_type = NT_PPC_VMX, .n = 34,
+   .size = sizeof(vector128), .align = sizeof(vector128),
+   .active = vr_active, .get = vr_get, .set = vr_set
+   },
+
+The end is calculated as (n * size), ie. 34 * sizeof(vector128).
+
+In vr_get/set() we pass start_pos as 33 * sizeof(vector128), meaning
+we can copy up to sizeof(vector128) into/out-of vrsave.
+
+The on-stack vrsave is defined as:
+  union {
+ elf_vrreg_t reg;
+ u32 word;
+  } vrsave;
+
+And elf_vrreg_t is:
+  typedef __vector128 elf_vrreg_t;
+
+So there is no bug, but we rely on all those sizes lining up,
+otherwise we would have a kernel stack exposure/overwrite on our
+hands.
+
+Rather than relying on that we can pass an explict end_pos based on
+the sizeof(vrsave). The result should be exactly the same but it's
+more obviously not over-reading/writing the stack and it avoids the
+compiler warning.
+
+Reported-by: Meelis Roos 
+Reported-by: Mathieu Malaterre 
+Cc: sta...@vger.kernel.org
+Tested-by: Mathieu Malaterre 
+Tested-by: Meelis Roos 
+Signed-off-by: Michael Ellerman 
+---
+ arch/powerpc/kernel/ptrace.c | 10 --
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
+index 7535f89e08cd..d9ac7d94656e 100644
+--- a/arch/powerpc/kernel/ptrace.c
 b/arch/powerpc/kernel/ptrace.c
+@@ -567,6 +567,7 @@ static int vr_get(struct task_struct *target, const struct 
user_regset *regset,
+   /*
+* Copy out only the low-order word of vrsave.
+*/
++  int start, end;
+   union {
+   elf_vrreg_t reg;
+   u32 word;
+@@ -575,8 +576,10 @@ static int vr_get(struct task_struct *target, const 
struct user_regset *regset,
+ 
+   vrsave.word = target->thread.vrsave;
+ 
++  start = 33 * sizeof(vector128);
++  end = start + sizeof(vrsave);
+   ret = user_regset_copyout(, , , , ,
+-33 * sizeof(vector128), -1);
++start, 

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

2019-03-05 Thread Mike Pagano
commit: 65732360a2d3a8ffb26aa2080df673599accbaee
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue Mar  5 18:05:39 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue Mar  5 18:05:39 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=65732360

proj/linux-patches: Linux patch 4.20.14

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |4 +
 1013_linux-4.20.14.patch | 2798 ++
 2 files changed, 2802 insertions(+)

diff --git a/_README b/_README
index 8e75833..acd1952 100644
--- a/_README
+++ b/_README
@@ -95,6 +95,10 @@ Patch:  1012_linux-4.20.13.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.20.13
 
+Patch:  1013_linux-4.20.14.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.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.20.14.patch b/1013_linux-4.20.14.patch
new file mode 100644
index 000..39dd047
--- /dev/null
+++ b/1013_linux-4.20.14.patch
@@ -0,0 +1,2798 @@
+diff --git a/Makefile b/Makefile
+index c83abc1e689b4..f7baaa0a3164b 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 20
+-SUBLEVEL = 13
++SUBLEVEL = 14
+ EXTRAVERSION =
+ NAME = Shy Crocodile
+ 
+diff --git a/arch/arc/include/asm/bitops.h b/arch/arc/include/asm/bitops.h
+index 8da87feec59aa..99e6d8948f4ac 100644
+--- a/arch/arc/include/asm/bitops.h
 b/arch/arc/include/asm/bitops.h
+@@ -340,7 +340,7 @@ static inline __attribute__ ((const)) int __fls(unsigned 
long x)
+ /*
+  * __ffs: Similar to ffs, but zero based (0-31)
+  */
+-static inline __attribute__ ((const)) int __ffs(unsigned long word)
++static inline __attribute__ ((const)) unsigned long __ffs(unsigned long word)
+ {
+   if (!word)
+   return word;
+@@ -400,9 +400,9 @@ static inline __attribute__ ((const)) int ffs(unsigned 
long x)
+ /*
+  * __ffs: Similar to ffs, but zero based (0-31)
+  */
+-static inline __attribute__ ((const)) int __ffs(unsigned long x)
++static inline __attribute__ ((const)) unsigned long __ffs(unsigned long x)
+ {
+-  int n;
++  unsigned long n;
+ 
+   asm volatile(
+   "   ffs.f   %0, %1  \n"  /* 0:31; 31(Z) if src 0 */
+diff --git a/arch/arc/kernel/troubleshoot.c b/arch/arc/kernel/troubleshoot.c
+index e8d9fb4523462..5c6663321e873 100644
+--- a/arch/arc/kernel/troubleshoot.c
 b/arch/arc/kernel/troubleshoot.c
+@@ -18,6 +18,8 @@
+ #include 
+ #include 
+ 
++#define ARC_PATH_MAX  256
++
+ /*
+  * Common routine to print scratch regs (r0-r12) or callee regs (r13-r25)
+  *   -Prints 3 regs per line and a CR.
+@@ -58,11 +60,12 @@ static void show_callee_regs(struct callee_regs *cregs)
+   print_reg_file(&(cregs->r13), 13);
+ }
+ 
+-static void print_task_path_n_nm(struct task_struct *tsk, char *buf)
++static void print_task_path_n_nm(struct task_struct *tsk)
+ {
+   char *path_nm = NULL;
+   struct mm_struct *mm;
+   struct file *exe_file;
++  char buf[ARC_PATH_MAX];
+ 
+   mm = get_task_mm(tsk);
+   if (!mm)
+@@ -72,7 +75,7 @@ static void print_task_path_n_nm(struct task_struct *tsk, 
char *buf)
+   mmput(mm);
+ 
+   if (exe_file) {
+-  path_nm = file_path(exe_file, buf, 255);
++  path_nm = file_path(exe_file, buf, ARC_PATH_MAX-1);
+   fput(exe_file);
+   }
+ 
+@@ -80,10 +83,9 @@ done:
+   pr_info("Path: %s\n", !IS_ERR(path_nm) ? path_nm : "?");
+ }
+ 
+-static void show_faulting_vma(unsigned long address, char *buf)
++static void show_faulting_vma(unsigned long address)
+ {
+   struct vm_area_struct *vma;
+-  char *nm = buf;
+   struct mm_struct *active_mm = current->active_mm;
+ 
+   /* can't use print_vma_addr() yet as it doesn't check for
+@@ -96,8 +98,11 @@ static void show_faulting_vma(unsigned long address, char 
*buf)
+* if the container VMA is not found
+*/
+   if (vma && (vma->vm_start <= address)) {
++  char buf[ARC_PATH_MAX];
++  char *nm = "?";
++
+   if (vma->vm_file) {
+-  nm = file_path(vma->vm_file, buf, PAGE_SIZE - 1);
++  nm = file_path(vma->vm_file, buf, ARC_PATH_MAX-1);
+   if (IS_ERR(nm))
+   nm = "?";
+   }
+@@ -173,13 +178,8 @@ void show_regs(struct pt_regs *regs)
+ {
+   struct task_struct *tsk = current;
+   struct callee_regs *cregs;
+-  char *buf;
+ 
+-  buf = (char *)__get_free_page(GFP_KERNEL);
+-  if (!buf)
+-  return;
+-
+-  print_task_path_n_nm(tsk, buf);
++  print_task_path_n_nm(tsk);
+   show_regs_print_info(KERN_INFO);
+ 
+   show_ecr_verbose(regs);
+@@ -189,7 +189,7 @@ void show_regs(struct pt_regs *regs)
+   (void 

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

2019-02-23 Thread Mike Pagano
commit: 329cbc43a969a4b84509a3df1673799d84cc9413
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Feb 23 11:06:59 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Feb 23 11:06:59 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=329cbc43

proj/linux-patches: Linux patch 4.20.12

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |   4 +
 1011_linux-4.20.12.patch | 936 +++
 2 files changed, 940 insertions(+)

diff --git a/_README b/_README
index 068574e..1c8cc61 100644
--- a/_README
+++ b/_README
@@ -87,6 +87,10 @@ Patch:  1010_linux-4.20.11.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.20.11
 
+Patch:  1011_linux-4.20.12.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.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.20.12.patch b/1011_linux-4.20.12.patch
new file mode 100644
index 000..aa9759c
--- /dev/null
+++ b/1011_linux-4.20.12.patch
@@ -0,0 +1,936 @@
+diff --git a/Makefile b/Makefile
+index 193cfe3a3d70..0a92b4e11621 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 20
+-SUBLEVEL = 11
++SUBLEVEL = 12
+ EXTRAVERSION =
+ NAME = Shy Crocodile
+ 
+diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
+index 778af0b7f7fd..c67081301035 100644
+--- a/arch/arm64/include/asm/memory.h
 b/arch/arm64/include/asm/memory.h
+@@ -303,6 +303,17 @@ static inline void *phys_to_virt(phys_addr_t x)
+ #define virt_addr_valid(kaddr)(_virt_addr_is_linear(kaddr) && 
\
+_virt_addr_valid(kaddr))
+ 
++/*
++ * Given that the GIC architecture permits ITS implementations that can only 
be
++ * configured with a LPI table address once, GICv3 systems with many CPUs may
++ * end up reserving a lot of different regions after a kexec for their LPI
++ * tables (one per CPU), as we are forced to reuse the same memory after kexec
++ * (and thus reserve it persistently with EFI beforehand)
++ */
++#if defined(CONFIG_EFI) && defined(CONFIG_ARM_GIC_V3_ITS)
++# define INIT_MEMBLOCK_RESERVED_REGIONS   (INIT_MEMBLOCK_REGIONS + 
2*(NR_CPUS + 1))
++#endif
++
+ #include 
+ 
+ #endif
+diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
+index f4fc1e0544b7..953e316521fc 100644
+--- a/arch/arm64/kernel/setup.c
 b/arch/arm64/kernel/setup.c
+@@ -313,7 +313,6 @@ void __init setup_arch(char **cmdline_p)
+   arm64_memblock_init();
+ 
+   paging_init();
+-  efi_apply_persistent_mem_reservations();
+ 
+   acpi_table_upgrade();
+ 
+diff --git a/crypto/af_alg.c b/crypto/af_alg.c
+index 17eb09d222ff..ec78a04eb136 100644
+--- a/crypto/af_alg.c
 b/crypto/af_alg.c
+@@ -122,8 +122,10 @@ static void alg_do_release(const struct af_alg_type 
*type, void *private)
+ 
+ int af_alg_release(struct socket *sock)
+ {
+-  if (sock->sk)
++  if (sock->sk) {
+   sock_put(sock->sk);
++  sock->sk = NULL;
++  }
+   return 0;
+ }
+ EXPORT_SYMBOL_GPL(af_alg_release);
+diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
+index 415849bab233..bde3822cf539 100644
+--- a/drivers/firmware/efi/efi.c
 b/drivers/firmware/efi/efi.c
+@@ -592,11 +592,7 @@ int __init efi_config_parse_tables(void *config_tables, 
int count, int sz,
+ 
+   early_memunmap(tbl, sizeof(*tbl));
+   }
+-  return 0;
+-}
+ 
+-int __init efi_apply_persistent_mem_reservations(void)
+-{
+   if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) {
+   unsigned long prsv = efi.mem_reserve;
+ 
+diff --git a/drivers/firmware/efi/libstub/arm-stub.c 
b/drivers/firmware/efi/libstub/arm-stub.c
+index 3d36142cf812..30ac0c975f8a 100644
+--- a/drivers/firmware/efi/libstub/arm-stub.c
 b/drivers/firmware/efi/libstub/arm-stub.c
+@@ -75,9 +75,6 @@ void install_memreserve_table(efi_system_table_t 
*sys_table_arg)
+   efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID;
+   efi_status_t status;
+ 
+-  if (IS_ENABLED(CONFIG_ARM))
+-  return;
+-
+   status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv),
+   (void **));
+   if (status != EFI_SUCCESS) {
+diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c
+index 0e30fa00204c..f9b8e3e23a8e 100644
+--- a/drivers/hwmon/lm80.c
 b/drivers/hwmon/lm80.c
+@@ -393,8 +393,10 @@ static ssize_t set_fan_div(struct device *dev, struct 
device_attribute *attr,
+   }
+ 
+   rv = lm80_read_value(client, LM80_REG_FANDIV);
+-  if (rv < 0)
++  if (rv < 0) {
++  mutex_unlock(>update_lock);
+   return rv;
++  }
+   reg = (rv & ~(3 << (2 * (nr + 1
+   | (data->fan_div[nr] << (2 * (nr + 1)));
+  

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

2019-02-22 Thread Mike Pagano
commit: ee51be5f1cb825aa5845a9badc02fdc43e501c96
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Feb 22 15:18:53 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Feb 22 15:18:53 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=ee51be5f

proj/linux-patches: Add fixed cpu opt. patch for gcc >= v8

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |   4 +
 5011_enable-cpu-optimizations-for-gcc8.patch | 569 +++
 2 files changed, 573 insertions(+)

diff --git a/_README b/_README
index b93c0f3..068574e 100644
--- a/_README
+++ b/_README
@@ -114,3 +114,7 @@ Desc:   Add Gentoo Linux support config settings and 
defaults.
 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.13 optimizations for additional CPUs.
+
+Patch:  5011_enable-cpu-optimizations-for-gcc8.patch
+From:   https://github.com/graysky2/kernel_gcc_patch/
+Desc:   Kernel patch for >= gccv8 enables kernel >= v4.13 optimizations for 
additional CPUs.

diff --git a/5011_enable-cpu-optimizations-for-gcc8.patch 
b/5011_enable-cpu-optimizations-for-gcc8.patch
new file mode 100644
index 000..bfd2065
--- /dev/null
+++ b/5011_enable-cpu-optimizations-for-gcc8.patch
@@ -0,0 +1,569 @@
+WARNING
+This patch works with gcc versions 8.1+ and with kernel version 4.13+ and 
should
+NOT be applied when compiling on older versions of gcc due to key name changes
+of the march flags introduced with the version 4.9 release of gcc.[1]
+
+Use the older version of this patch hosted on the same github for older
+versions of gcc.
+
+FEATURES
+This patch adds additional CPU options to the Linux kernel accessible under:
+ Processor type and features  --->
+  Processor family --->
+
+The expanded microarchitectures include:
+* AMD Improved K8-family
+* AMD K10-family
+* AMD Family 10h (Barcelona)
+* AMD Family 14h (Bobcat)
+* AMD Family 16h (Jaguar)
+* AMD Family 15h (Bulldozer)
+* AMD Family 15h (Piledriver)
+* AMD Family 15h (Steamroller)
+* AMD Family 15h (Excavator)
+* AMD Family 17h (Zen)
+* Intel Silvermont low-power processors
+* 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)
+* Intel 6th Gen Core i3/i5/i7 (Skylake)
+* Intel 6th Gen Core i7/i9 (Skylake X)
+* Intel 8th Gen Core i3/i5/i7 (Cannon Lake)
+* Intel 8th Gen Core i7/i9 (Ice Lake)
+
+It also offers to compile passing the 'native' option which, "selects the CPU
+to generate code for at compilation time by determining the processor type of
+the compiling machine. Using -march=native enables all instruction subsets
+supported by the local machine and will produce code optimized for the local
+machine under the constraints of the selected instruction set."[3]
+
+MINOR NOTES
+This patch also changes 'atom' to 'bonnell' in accordance with the gcc v4.9
+changes. Note that upstream is using the deprecated 'match=atom' flags when I
+believe it should use the newer 'march=bonnell' flag for atom processors.[2]
+
+It is not recommended to compile on Atom-CPUs with the 'native' option.[4] The
+recommendation is to use the 'atom' option instead.
+
+BENEFITS
+Small but real speed increases are measurable using a make endpoint comparing
+a generic kernel to one built with one of the respective microarchs.
+
+See the following experimental evidence supporting this statement:
+https://github.com/graysky2/kernel_gcc_patch
+
+REQUIREMENTS
+linux version >=4.20
+gcc version >=8.1
+
+ACKNOWLEDGMENTS
+This patch builds on the seminal work by Jeroen.[5]
+
+REFERENCES
+1. https://gcc.gnu.org/gcc-4.9/changes.html
+2. https://bugzilla.kernel.org/show_bug.cgi?id=77461
+3. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
+4. https://github.com/graysky2/kernel_gcc_patch/issues/15
+5. http://www.linuxforge.net/docs/linux/linux-gcc.php
+
+--- a/arch/x86/Makefile_32.cpu 2019-02-22 09:22:03.426937735 -0500
 b/arch/x86/Makefile_32.cpu 2019-02-22 09:37:58.680968580 -0500
+@@ -23,7 +23,18 @@ cflags-$(CONFIG_MK6)+= -march=k6
+ # Please note, that patches that add -march=athlon-xp and friends are 
pointless.
+ # They make zero difference whatsosever to performance at this time.
+ cflags-$(CONFIG_MK7)  += -march=athlon
++cflags-$(CONFIG_MNATIVE) += $(call cc-option,-march=native)
+ cflags-$(CONFIG_MK8)  += $(call cc-option,-march=k8,-march=athlon)
++cflags-$(CONFIG_MK8SSE3)  += $(call 
cc-option,-march=k8-sse3,-march=athlon)
++cflags-$(CONFIG_MK10) += $(call cc-option,-march=amdfam10,-march=athlon)
++cflags-$(CONFIG_MBARCELONA)   += $(call 
cc-option,-march=barcelona,-march=athlon)
++cflags-$(CONFIG_MBOBCAT)  += $(call 

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

2019-02-20 Thread Mike Pagano
commit: 0a12686698a25b6e88c7ff415a00e4f135ba736f
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Feb 20 11:27:15 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Feb 20 11:27:15 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=0a126866

proj/linux-patches: Patch not compatible with 4.20

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |   4 -
 5011_enable-cpu-optimizations-for-gcc8.patch | 575 ---
 2 files changed, 579 deletions(-)

diff --git a/_README b/_README
index 068574e..b93c0f3 100644
--- a/_README
+++ b/_README
@@ -114,7 +114,3 @@ Desc:   Add Gentoo Linux support config settings and 
defaults.
 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.13 optimizations for additional CPUs.
-
-Patch:  5011_enable-cpu-optimizations-for-gcc8.patch
-From:   https://github.com/graysky2/kernel_gcc_patch/
-Desc:   Kernel patch for >= gccv8 enables kernel >= v4.13 optimizations for 
additional CPUs.

diff --git a/5011_enable-cpu-optimizations-for-gcc8.patch 
b/5011_enable-cpu-optimizations-for-gcc8.patch
deleted file mode 100644
index 9087ee6..000
--- a/5011_enable-cpu-optimizations-for-gcc8.patch
+++ /dev/null
@@ -1,575 +0,0 @@
-WARNING
-This patch works with gcc versions 8.1+ and with kernel version 4.13+ and 
should
-NOT be applied when compiling on older versions of gcc due to key name changes
-of the march flags introduced with the version 4.9 release of gcc.[1]
-
-Use the older version of this patch hosted on the same github for older
-versions of gcc.
-
-FEATURES
-This patch adds additional CPU options to the Linux kernel accessible under:
- Processor type and features  --->
-  Processor family --->
-
-The expanded microarchitectures include:
-* AMD Improved K8-family
-* AMD K10-family
-* AMD Family 10h (Barcelona)
-* AMD Family 14h (Bobcat)
-* AMD Family 16h (Jaguar)
-* AMD Family 15h (Bulldozer)
-* AMD Family 15h (Piledriver)
-* AMD Family 15h (Steamroller)
-* AMD Family 15h (Excavator)
-* AMD Family 17h (Zen)
-* Intel Silvermont low-power processors
-* 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)
-* Intel 6th Gen Core i3/i5/i7 (Skylake)
-* Intel 6th Gen Core i7/i9 (Skylake X)
-* Intel 8th Gen Core i3/i5/i7 (Cannon Lake)
-* Intel 8th Gen Core i7/i9 (Ice Lake)
-
-It also offers to compile passing the 'native' option which, "selects the CPU
-to generate code for at compilation time by determining the processor type of
-the compiling machine. Using -march=native enables all instruction subsets
-supported by the local machine and will produce code optimized for the local
-machine under the constraints of the selected instruction set."[3]
-
-MINOR NOTES
-This patch also changes 'atom' to 'bonnell' in accordance with the gcc v4.9
-changes. Note that upstream is using the deprecated 'match=atom' flags when I
-believe it should use the newer 'march=bonnell' flag for atom processors.[2]
-
-It is not recommended to compile on Atom-CPUs with the 'native' option.[4] The
-recommendation is to use the 'atom' option instead.
-
-BENEFITS
-Small but real speed increases are measurable using a make endpoint comparing
-a generic kernel to one built with one of the respective microarchs.
-
-See the following experimental evidence supporting this statement:
-https://github.com/graysky2/kernel_gcc_patch
-
-REQUIREMENTS
-linux version >=3.15
-gcc version >=8.1
-
-ACKNOWLEDGMENTS
-This patch builds on the seminal work by Jeroen.[5]
-
-REFERENCES
-1. https://gcc.gnu.org/gcc-4.9/changes.html
-2. https://bugzilla.kernel.org/show_bug.cgi?id=77461
-3. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
-4. https://github.com/graysky2/kernel_gcc_patch/issues/15
-5. http://www.linuxforge.net/docs/linux/linux-gcc.php
-
 a/arch/x86/include/asm/module.h2018-04-01 17:20:27.0 -0400
-+++ b/arch/x86/include/asm/module.h2018-05-09 17:38:40.686541611 -0400
-@@ -25,6 +25,30 @@ struct mod_arch_specific {
- #define MODULE_PROC_FAMILY "586MMX "
- #elif defined CONFIG_MCORE2
- #define MODULE_PROC_FAMILY "CORE2 "
-+#elif defined CONFIG_MNATIVE
-+#define MODULE_PROC_FAMILY "NATIVE "
-+#elif defined CONFIG_MNEHALEM
-+#define MODULE_PROC_FAMILY "NEHALEM "
-+#elif defined CONFIG_MWESTMERE
-+#define MODULE_PROC_FAMILY "WESTMERE "
-+#elif defined CONFIG_MSILVERMONT
-+#define MODULE_PROC_FAMILY "SILVERMONT "
-+#elif defined CONFIG_MSANDYBRIDGE
-+#define MODULE_PROC_FAMILY "SANDYBRIDGE "
-+#elif defined CONFIG_MIVYBRIDGE
-+#define MODULE_PROC_FAMILY "IVYBRIDGE "
-+#elif defined CONFIG_MHASWELL
-+#define MODULE_PROC_FAMILY "HASWELL "
-+#elif defined CONFIG_MBROADWELL
-+#define 

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

2019-02-20 Thread Mike Pagano
commit: 101885640cae489e3732b5d3f803620a1c092c4a
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Feb 20 11:20:02 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Feb 20 11:20:02 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=10188564

proj/linux-patches: Linux patch 4.20.11

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |4 +
 1010_linux-4.20.11.patch | 3570 ++
 2 files changed, 3574 insertions(+)

diff --git a/_README b/_README
index 35bccfa..068574e 100644
--- a/_README
+++ b/_README
@@ -83,6 +83,10 @@ Patch:  1009_linux-4.20.10.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.20.10
 
+Patch:  1010_linux-4.20.11.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.11
+
 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/1010_linux-4.20.11.patch b/1010_linux-4.20.11.patch
new file mode 100644
index 000..5b451cc
--- /dev/null
+++ b/1010_linux-4.20.11.patch
@@ -0,0 +1,3570 @@
+diff --git a/Documentation/devicetree/bindings/eeprom/at24.txt 
b/Documentation/devicetree/bindings/eeprom/at24.txt
+index aededdbc262b..f9a7c984274c 100644
+--- a/Documentation/devicetree/bindings/eeprom/at24.txt
 b/Documentation/devicetree/bindings/eeprom/at24.txt
+@@ -27,6 +27,7 @@ Required properties:
+ "atmel,24c256",
+ "atmel,24c512",
+ "atmel,24c1024",
++"atmel,24c2048",
+ 
+ If  is not "atmel", then a fallback must be used
+ with the same  and "atmel" as manufacturer.
+diff --git a/Makefile b/Makefile
+index 6f7a8172de44..193cfe3a3d70 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 20
+-SUBLEVEL = 10
++SUBLEVEL = 11
+ EXTRAVERSION =
+ NAME = Shy Crocodile
+ 
+diff --git a/arch/alpha/include/asm/irq.h b/arch/alpha/include/asm/irq.h
+index 4d17cacd1462..432402c8e47f 100644
+--- a/arch/alpha/include/asm/irq.h
 b/arch/alpha/include/asm/irq.h
+@@ -56,15 +56,15 @@
+ 
+ #elif defined(CONFIG_ALPHA_DP264) || \
+   defined(CONFIG_ALPHA_LYNX)  || \
+-  defined(CONFIG_ALPHA_SHARK) || \
+-  defined(CONFIG_ALPHA_EIGER)
++  defined(CONFIG_ALPHA_SHARK)
+ # define NR_IRQS  64
+ 
+ #elif defined(CONFIG_ALPHA_TITAN)
+ #define NR_IRQS   80
+ 
+ #elif defined(CONFIG_ALPHA_RAWHIDE) || \
+-  defined(CONFIG_ALPHA_TAKARA)
++  defined(CONFIG_ALPHA_TAKARA) || \
++  defined(CONFIG_ALPHA_EIGER)
+ # define NR_IRQS  128
+ 
+ #elif defined(CONFIG_ALPHA_WILDFIRE)
+diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
+index d73dc473fbb9..188fc9256baf 100644
+--- a/arch/alpha/mm/fault.c
 b/arch/alpha/mm/fault.c
+@@ -78,7 +78,7 @@ __load_new_mm_context(struct mm_struct *next_mm)
+ /* Macro for exception fixup code to access integer registers.  */
+ #define dpf_reg(r)\
+   (((unsigned long *)regs)[(r) <= 8 ? (r) : (r) <= 15 ? (r)-16 :  \
+-   (r) <= 18 ? (r)+8 : (r)-10])
++   (r) <= 18 ? (r)+10 : (r)-10])
+ 
+ asmlinkage void
+ do_page_fault(unsigned long address, unsigned long mmcsr,
+diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
+index a3c9b346721d..f04bc3e15332 100644
+--- a/arch/arm/boot/dts/da850-evm.dts
 b/arch/arm/boot/dts/da850-evm.dts
+@@ -94,6 +94,28 @@
+   regulator-boot-on;
+   };
+ 
++  baseboard_3v3: fixedregulator-3v3 {
++  /* TPS73701DCQ */
++  compatible = "regulator-fixed";
++  regulator-name = "baseboard_3v3";
++  regulator-min-microvolt = <330>;
++  regulator-max-microvolt = <330>;
++  vin-supply = <>;
++  regulator-always-on;
++  regulator-boot-on;
++  };
++
++  baseboard_1v8: fixedregulator-1v8 {
++  /* TPS73701DCQ */
++  compatible = "regulator-fixed";
++  regulator-name = "baseboard_1v8";
++  regulator-min-microvolt = <180>;
++  regulator-max-microvolt = <180>;
++  vin-supply = <>;
++  regulator-always-on;
++  regulator-boot-on;
++  };
++
+   backlight_lcd: backlight-regulator {
+   compatible = "regulator-fixed";
+   regulator-name = "lcd_backlight_pwr";
+@@ -105,7 +127,7 @@
+ 
+   sound {
+   compatible = "simple-audio-card";
+-  simple-audio-card,name = "DA850/OMAP-L138 EVM";
++  simple-audio-card,name = "DA850-OMAPL138 EVM";
+   simple-audio-card,widgets =
+   "Line", "Line In",
+   "Line", "Line Out";
+@@ -210,10 +232,9 @@
+ 
+   

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

2019-02-18 Thread Mike Pagano
commit: bc008124a19efaa1c7bca498375cd34cf6d2e3fe
Author: Mike Pagano  gentoo  org>
AuthorDate: Mon Feb 18 23:27:16 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Mon Feb 18 23:27:16 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=bc008124

proj/linux-patches: cpu optimization patch for gcc >= 8

This patch adds addl CPU options to the Linux kernel accessible under:
 Processor type and features  --->
  Processor family --->

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |   4 +
 5011_enable-cpu-optimizations-for-gcc8.patch | 575 +++
 2 files changed, 579 insertions(+)

diff --git a/_README b/_README
index a248fc7..35bccfa 100644
--- a/_README
+++ b/_README
@@ -110,3 +110,7 @@ Desc:   Add Gentoo Linux support config settings and 
defaults.
 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.13 optimizations for additional CPUs.
+
+Patch:  5011_enable-cpu-optimizations-for-gcc8.patch
+From:   https://github.com/graysky2/kernel_gcc_patch/
+Desc:   Kernel patch for >= gccv8 enables kernel >= v4.13 optimizations for 
additional CPUs.

diff --git a/5011_enable-cpu-optimizations-for-gcc8.patch 
b/5011_enable-cpu-optimizations-for-gcc8.patch
new file mode 100644
index 000..9087ee6
--- /dev/null
+++ b/5011_enable-cpu-optimizations-for-gcc8.patch
@@ -0,0 +1,575 @@
+WARNING
+This patch works with gcc versions 8.1+ and with kernel version 4.13+ and 
should
+NOT be applied when compiling on older versions of gcc due to key name changes
+of the march flags introduced with the version 4.9 release of gcc.[1]
+
+Use the older version of this patch hosted on the same github for older
+versions of gcc.
+
+FEATURES
+This patch adds additional CPU options to the Linux kernel accessible under:
+ Processor type and features  --->
+  Processor family --->
+
+The expanded microarchitectures include:
+* AMD Improved K8-family
+* AMD K10-family
+* AMD Family 10h (Barcelona)
+* AMD Family 14h (Bobcat)
+* AMD Family 16h (Jaguar)
+* AMD Family 15h (Bulldozer)
+* AMD Family 15h (Piledriver)
+* AMD Family 15h (Steamroller)
+* AMD Family 15h (Excavator)
+* AMD Family 17h (Zen)
+* Intel Silvermont low-power processors
+* 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)
+* Intel 6th Gen Core i3/i5/i7 (Skylake)
+* Intel 6th Gen Core i7/i9 (Skylake X)
+* Intel 8th Gen Core i3/i5/i7 (Cannon Lake)
+* Intel 8th Gen Core i7/i9 (Ice Lake)
+
+It also offers to compile passing the 'native' option which, "selects the CPU
+to generate code for at compilation time by determining the processor type of
+the compiling machine. Using -march=native enables all instruction subsets
+supported by the local machine and will produce code optimized for the local
+machine under the constraints of the selected instruction set."[3]
+
+MINOR NOTES
+This patch also changes 'atom' to 'bonnell' in accordance with the gcc v4.9
+changes. Note that upstream is using the deprecated 'match=atom' flags when I
+believe it should use the newer 'march=bonnell' flag for atom processors.[2]
+
+It is not recommended to compile on Atom-CPUs with the 'native' option.[4] The
+recommendation is to use the 'atom' option instead.
+
+BENEFITS
+Small but real speed increases are measurable using a make endpoint comparing
+a generic kernel to one built with one of the respective microarchs.
+
+See the following experimental evidence supporting this statement:
+https://github.com/graysky2/kernel_gcc_patch
+
+REQUIREMENTS
+linux version >=3.15
+gcc version >=8.1
+
+ACKNOWLEDGMENTS
+This patch builds on the seminal work by Jeroen.[5]
+
+REFERENCES
+1. https://gcc.gnu.org/gcc-4.9/changes.html
+2. https://bugzilla.kernel.org/show_bug.cgi?id=77461
+3. https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
+4. https://github.com/graysky2/kernel_gcc_patch/issues/15
+5. http://www.linuxforge.net/docs/linux/linux-gcc.php
+
+--- a/arch/x86/include/asm/module.h2018-04-01 17:20:27.0 -0400
 b/arch/x86/include/asm/module.h2018-05-09 17:38:40.686541611 -0400
+@@ -25,6 +25,30 @@ struct mod_arch_specific {
+ #define MODULE_PROC_FAMILY "586MMX "
+ #elif defined CONFIG_MCORE2
+ #define MODULE_PROC_FAMILY "CORE2 "
++#elif defined CONFIG_MNATIVE
++#define MODULE_PROC_FAMILY "NATIVE "
++#elif defined CONFIG_MNEHALEM
++#define MODULE_PROC_FAMILY "NEHALEM "
++#elif defined CONFIG_MWESTMERE
++#define MODULE_PROC_FAMILY "WESTMERE "
++#elif defined CONFIG_MSILVERMONT
++#define MODULE_PROC_FAMILY "SILVERMONT "
++#elif defined CONFIG_MSANDYBRIDGE
++#define MODULE_PROC_FAMILY "SANDYBRIDGE "
++#elif defined CONFIG_MIVYBRIDGE
++#define MODULE_PROC_FAMILY 

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

2019-02-18 Thread Mike Pagano
commit: 359cd839e3a5c9b3c3482923015a288e8e39ee46
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Feb 16 00:41:30 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Feb 16 00:41:30 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=359cd839

proj/linux-patches: Rename patch for clarity

Signed-off-by: Mike Pagano  gentoo.org>

 _README | 2 +-
 patch => 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch | 0
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/_README b/_README
index e40abc7..a248fc7 100644
--- a/_README
+++ b/_README
@@ -107,6 +107,6 @@ Patch:  4567_distro-Gentoo-Kconfig.patch
 From:   Tom Wijsman 
 Desc:   Add Gentoo Linux support config settings and defaults.
 
-Patch:  5010_enable-additional-cpu-optimizations-for-gcc.patch
+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.13 optimizations for additional CPUs.

diff --git a/5010_enable-additional-cpu-optimizations-for-gcc.patch 
b/5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch
similarity index 100%
rename from 5010_enable-additional-cpu-optimizations-for-gcc.patch
rename to 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch



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

2019-02-15 Thread Mike Pagano
commit: cb73cbeaefb5ee7da3fbe79ec7b7674456f2c557
Author: Mike Pagano  gentoo  org>
AuthorDate: Fri Feb 15 12:35:28 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Fri Feb 15 12:35:28 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=cb73cbea

proj/linux-patches: Linux patches 4.20.9 and 4.20.10

Signed-off-by: Mike Pagano  gentoo.org>

 _README  |8 +
 1008_linux-4.20.9.patch  | 1532 ++
 1009_linux-4.20.10.patch |   35 ++
 3 files changed, 1575 insertions(+)

diff --git a/_README b/_README
index 16edf0d..e40abc7 100644
--- a/_README
+++ b/_README
@@ -75,6 +75,14 @@ Patch:  1007_linux-4.20.8.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.20.8
 
+Patch:  1008_linux-4.20.9.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.9
+
+Patch:  1009_linux-4.20.10.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.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/1008_linux-4.20.9.patch b/1008_linux-4.20.9.patch
new file mode 100644
index 000..8d94fa7
--- /dev/null
+++ b/1008_linux-4.20.9.patch
@@ -0,0 +1,1532 @@
+diff --git a/Makefile b/Makefile
+index d7d190781010..c9b831f5e873 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 20
+-SUBLEVEL = 8
++SUBLEVEL = 9
+ EXTRAVERSION =
+ NAME = Shy Crocodile
+ 
+diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
+index 47aa53ba6b92..559659b399d0 100644
+--- a/arch/arm/boot/dts/da850.dtsi
 b/arch/arm/boot/dts/da850.dtsi
+@@ -476,7 +476,7 @@
+   clocksource: timer@2 {
+   compatible = "ti,da830-timer";
+   reg = <0x2 0x1000>;
+-  interrupts = <12>, <13>;
++  interrupts = <21>, <22>;
+   interrupt-names = "tint12", "tint34";
+   clocks = <_auxclk>;
+   };
+diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c
+index 3b73813c6b04..23e8c93515d4 100644
+--- a/arch/arm/mach-iop32x/n2100.c
 b/arch/arm/mach-iop32x/n2100.c
+@@ -75,8 +75,7 @@ void __init n2100_map_io(void)
+ /*
+  * N2100 PCI.
+  */
+-static int __init
+-n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
++static int n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
+ {
+   int irq;
+ 
+diff --git a/arch/arm/mach-tango/pm.c b/arch/arm/mach-tango/pm.c
+index 028e50c6383f..a32c3b631484 100644
+--- a/arch/arm/mach-tango/pm.c
 b/arch/arm/mach-tango/pm.c
+@@ -3,6 +3,7 @@
+ #include 
+ #include 
+ #include "smc.h"
++#include "pm.h"
+ 
+ static int tango_pm_powerdown(unsigned long arg)
+ {
+@@ -24,10 +25,7 @@ static const struct platform_suspend_ops tango_pm_ops = {
+   .valid = suspend_valid_only_mem,
+ };
+ 
+-static int __init tango_pm_init(void)
++void __init tango_pm_init(void)
+ {
+   suspend_set_ops(_pm_ops);
+-  return 0;
+ }
+-
+-late_initcall(tango_pm_init);
+diff --git a/arch/arm/mach-tango/pm.h b/arch/arm/mach-tango/pm.h
+new file mode 100644
+index ..35ea705a0ee2
+--- /dev/null
 b/arch/arm/mach-tango/pm.h
+@@ -0,0 +1,7 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++
++#ifdef CONFIG_SUSPEND
++void __init tango_pm_init(void);
++#else
++#define tango_pm_init NULL
++#endif
+diff --git a/arch/arm/mach-tango/setup.c b/arch/arm/mach-tango/setup.c
+index 677dd7b5efd9..824f90737b04 100644
+--- a/arch/arm/mach-tango/setup.c
 b/arch/arm/mach-tango/setup.c
+@@ -2,6 +2,7 @@
+ #include 
+ #include 
+ #include "smc.h"
++#include "pm.h"
+ 
+ static void tango_l2c_write(unsigned long val, unsigned int reg)
+ {
+@@ -15,4 +16,5 @@ DT_MACHINE_START(TANGO_DT, "Sigma Tango DT")
+   .dt_compat  = tango_dt_compat,
+   .l2c_aux_mask   = ~0,
+   .l2c_write_sec  = tango_l2c_write,
++  .init_late  = tango_pm_init,
+ MACHINE_END
+diff --git a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts 
b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
+index 2152b7ba65fb..cc8dbea0911f 100644
+--- a/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
 b/arch/mips/boot/dts/xilfpga/nexys4ddr.dts
+@@ -90,11 +90,11 @@
+   interrupts = <0>;
+   };
+ 
+-  axi_i2c: i2c@10A0 {
++  axi_i2c: i2c@10a0 {
+   compatible = "xlnx,xps-iic-2.00.a";
+   interrupt-parent = <_intc>;
+   interrupts = <4>;
+-  reg = < 0x10A0 0x1 >;
++  reg = < 0x10a0 0x1 >;
+   clocks = <>;
+   xlnx,clk-freq = <0x5f5e100>;
+   xlnx,family = "Artix7";
+@@ -106,9 +106,9 @@
+   #address-cells = <1>;
+   #size-cells = <0>;
+ 
+-  ad7420@4B {
++  ad7420@4b {
+   compatible = "adi,adt7420";
+-  reg = <0x4B>;
++  reg = <0x4b>;

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

2019-02-06 Thread Mike Pagano
commit: f7bbb47875585cd1095f9aaab4a30a71a497d3b5
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Feb  6 17:09:32 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Feb  6 17:09:32 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=f7bbb478

proj/linux-patches: Linux patch 4.20.7

Signed-off-by: Mike Pagano  gentoo.org>

 _README |4 +
 1006_linux-4.20.7.patch | 3159 +++
 2 files changed, 3163 insertions(+)

diff --git a/_README b/_README
index 8bd4163..82d04f4 100644
--- a/_README
+++ b/_README
@@ -67,6 +67,10 @@ Patch:  1005_linux-4.20.6.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.20.6
 
+Patch:  1006_linux-4.20.7.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.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.20.7.patch b/1006_linux-4.20.7.patch
new file mode 100644
index 000..c2844b2
--- /dev/null
+++ b/1006_linux-4.20.7.patch
@@ -0,0 +1,3159 @@
+diff --git a/Makefile b/Makefile
+index 523922ea9c97..efc46cce5919 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 20
+-SUBLEVEL = 6
++SUBLEVEL = 7
+ EXTRAVERSION =
+ NAME = Shy Crocodile
+ 
+diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c
+index 318394ed5c7a..5e11ad3164e0 100644
+--- a/arch/arm/mach-cns3xxx/pcie.c
 b/arch/arm/mach-cns3xxx/pcie.c
+@@ -83,7 +83,7 @@ static void __iomem *cns3xxx_pci_map_bus(struct pci_bus *bus,
+   } else /* remote PCI bus */
+   base = cnspci->cfg1_regs + ((busno & 0xf) << 20);
+ 
+-  return base + (where & 0xffc) + (devfn << 12);
++  return base + where + (devfn << 12);
+ }
+ 
+ static int cns3xxx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
+diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c
+index 29cdc99688f3..9859e1178e6b 100644
+--- a/arch/arm64/kernel/hibernate.c
 b/arch/arm64/kernel/hibernate.c
+@@ -299,8 +299,10 @@ int swsusp_arch_suspend(void)
+   dcache_clean_range(__idmap_text_start, __idmap_text_end);
+ 
+   /* Clean kvm setup code to PoC? */
+-  if (el2_reset_needed())
++  if (el2_reset_needed()) {
+   dcache_clean_range(__hyp_idmap_text_start, 
__hyp_idmap_text_end);
++  dcache_clean_range(__hyp_text_start, __hyp_text_end);
++  }
+ 
+   /* make the crash dump kernel image protected again */
+   crash_post_resume();
+diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S
+index e1261fbaa374..17f325ba831e 100644
+--- a/arch/arm64/kernel/hyp-stub.S
 b/arch/arm64/kernel/hyp-stub.S
+@@ -28,6 +28,8 @@
+ #include 
+ 
+   .text
++  .pushsection.hyp.text, "ax"
++
+   .align 11
+ 
+ ENTRY(__hyp_stub_vectors)
+diff --git a/arch/arm64/kernel/kaslr.c b/arch/arm64/kernel/kaslr.c
+index ba6b41790fcd..b09b6f75f759 100644
+--- a/arch/arm64/kernel/kaslr.c
 b/arch/arm64/kernel/kaslr.c
+@@ -88,6 +88,7 @@ u64 __init kaslr_early_init(u64 dt_phys)
+* we end up running with module randomization disabled.
+*/
+   module_alloc_base = (u64)_etext - MODULES_VSIZE;
++  __flush_dcache_area(_alloc_base, sizeof(module_alloc_base));
+ 
+   /*
+* Try to map the FDT early. If this fails, we simply bail,
+diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c
+index 30695a868107..5c9073bace83 100644
+--- a/arch/arm64/mm/flush.c
 b/arch/arm64/mm/flush.c
+@@ -33,7 +33,11 @@ void sync_icache_aliases(void *kaddr, unsigned long len)
+   __clean_dcache_area_pou(kaddr, len);
+   __flush_icache_all();
+   } else {
+-  flush_icache_range(addr, addr + len);
++  /*
++   * Don't issue kick_all_cpus_sync() after I-cache invalidation
++   * for user mappings.
++   */
++  __flush_icache_range(addr, addr + len);
+   }
+ }
+ 
+diff --git a/drivers/gpio/gpio-altera-a10sr.c 
b/drivers/gpio/gpio-altera-a10sr.c
+index 6b11f1314248..7f9e0304b510 100644
+--- a/drivers/gpio/gpio-altera-a10sr.c
 b/drivers/gpio/gpio-altera-a10sr.c
+@@ -66,8 +66,10 @@ static int altr_a10sr_gpio_direction_input(struct gpio_chip 
*gc,
+ static int altr_a10sr_gpio_direction_output(struct gpio_chip *gc,
+   unsigned int nr, int value)
+ {
+-  if (nr <= (ALTR_A10SR_OUT_VALID_RANGE_HI - ALTR_A10SR_LED_VALID_SHIFT))
++  if (nr <= (ALTR_A10SR_OUT_VALID_RANGE_HI - ALTR_A10SR_LED_VALID_SHIFT)) 
{
++  altr_a10sr_gpio_set(gc, nr, value);
+   return 0;
++  }
+   return -EINVAL;
+ }
+ 
+diff --git a/drivers/gpio/gpio-eic-sprd.c b/drivers/gpio/gpio-eic-sprd.c
+index 

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

2019-01-22 Thread Mike Pagano
commit: 1d0b7141a46c176a558850740bde1516bee9e89d
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue Jan 22 23:07:29 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue Jan 22 23:07:29 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=1d0b7141

proj/linux-patches: Linux patch 4.20.4

Signed-off-by: Mike Pagano  gentoo.org>

 _README |4 +
 1003_linux-4.20.4.patch | 4396 +++
 2 files changed, 4400 insertions(+)

diff --git a/_README b/_README
index d6c119a..a9b0f09 100644
--- a/_README
+++ b/_README
@@ -55,6 +55,10 @@ Patch:  1002_linux-4.20.3.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.20.3
 
+Patch:  1003_linux-4.20.4.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.4
+
 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/1003_linux-4.20.4.patch b/1003_linux-4.20.4.patch
new file mode 100644
index 000..1cb8b3d
--- /dev/null
+++ b/1003_linux-4.20.4.patch
@@ -0,0 +1,4396 @@
+diff --git a/Makefile b/Makefile
+index 3b9e4658d31f..a056dba5ede0 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 20
+-SUBLEVEL = 3
++SUBLEVEL = 4
+ EXTRAVERSION =
+ NAME = Shy Crocodile
+ 
+@@ -967,6 +967,7 @@ ifdef CONFIG_STACK_VALIDATION
+   endif
+ endif
+ 
++PHONY += prepare0
+ 
+ ifeq ($(KBUILD_EXTMOD),)
+ core-y+= kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
+@@ -1075,8 +1076,7 @@ scripts: scripts_basic scripts_dtc asm-generic 
gcc-plugins $(autoksyms_h)
+ # archprepare is used in arch Makefiles and when processed asm symlink,
+ # version.h and scripts_basic is processed / created.
+ 
+-# Listed in dependency order
+-PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
++PHONY += prepare archprepare prepare1 prepare2 prepare3
+ 
+ # prepare3 is used to check if we are building in a separate output directory,
+ # and if so do:
+@@ -1545,9 +1545,6 @@ else # KBUILD_EXTMOD
+ 
+ # We are always building modules
+ KBUILD_MODULES := 1
+-PHONY += crmodverdir
+-crmodverdir:
+-  $(cmd_crmodverdir)
+ 
+ PHONY += $(objtree)/Module.symvers
+ $(objtree)/Module.symvers:
+@@ -1559,7 +1556,7 @@ $(objtree)/Module.symvers:
+ 
+ module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
+ PHONY += $(module-dirs) modules
+-$(module-dirs): crmodverdir $(objtree)/Module.symvers
++$(module-dirs): prepare $(objtree)/Module.symvers
+   $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
+ 
+ modules: $(module-dirs)
+@@ -1600,7 +1597,8 @@ help:
+ 
+ # Dummies...
+ PHONY += prepare scripts
+-prepare: ;
++prepare:
++  $(cmd_crmodverdir)
+ scripts: ;
+ endif # KBUILD_EXTMOD
+ 
+@@ -1724,17 +1722,14 @@ endif
+ 
+ # Modules
+ /: prepare scripts FORCE
+-  $(cmd_crmodverdir)
+   $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+   $(build)=$(build-dir)
+ # Make sure the latest headers are built for Documentation
+ Documentation/ samples/: headers_install
+ %/: prepare scripts FORCE
+-  $(cmd_crmodverdir)
+   $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+   $(build)=$(build-dir)
+ %.ko: prepare scripts FORCE
+-  $(cmd_crmodverdir)
+   $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
+   $(build)=$(build-dir) $(@:.ko=.o)
+   $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+diff --git a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi 
b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
+index 7d94c1fa592a..7f799cb5668e 100644
+--- a/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
 b/arch/arm64/boot/dts/marvell/armada-ap806.dtsi
+@@ -28,6 +28,23 @@
+   method = "smc";
+   };
+ 
++  reserved-memory {
++  #address-cells = <2>;
++  #size-cells = <2>;
++  ranges;
++
++  /*
++   * This area matches the mapping done with a
++   * mainline U-Boot, and should be updated by the
++   * bootloader.
++   */
++
++  psci-area@400 {
++  reg = <0x0 0x400 0x0 0x20>;
++  no-map;
++  };
++  };
++
+   ap806 {
+   #address-cells = <2>;
+   #size-cells = <2>;
+diff --git a/arch/arm64/include/asm/kvm_arm.h 
b/arch/arm64/include/asm/kvm_arm.h
+index 2dafd936d84d..bc2327d4a505 100644
+--- a/arch/arm64/include/asm/kvm_arm.h
 b/arch/arm64/include/asm/kvm_arm.h
+@@ -24,6 +24,8 @@
+ 
+ /* Hyp Configuration Register (HCR) bits */
+ #define HCR_FWB   (UL(1) << 46)
++#define HCR_API   (UL(1) << 41)
++#define HCR_APK   (UL(1) << 40)
+ #define HCR_TEA   (UL(1) << 37)
+ #define HCR_TERR  (UL(1) << 36)
+ #define HCR_TLOR  (UL(1) << 35)
+@@ -87,6 +89,7 @@
+HCR_AMO | 

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

2019-01-16 Thread Mike Pagano
commit: 50b5973dba7e280fdff49b75c5e01b25f78ec68e
Author: Mike Pagano  gentoo  org>
AuthorDate: Wed Jan 16 23:33:48 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Wed Jan 16 23:33:48 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=50b5973d

proj/linux-patches: Linux patch 4.20.3

Signed-off-by: Mike Pagano  gentoo.org>

 _README |4 +
 1002_linux-4.20.3.patch | 1927 +++
 2 files changed, 1931 insertions(+)

diff --git a/_README b/_README
index 0e0dc28..d6c119a 100644
--- a/_README
+++ b/_README
@@ -51,6 +51,10 @@ Patch:  1001_linux-4.20.2.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.20.2
 
+Patch:  1002_linux-4.20.3.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.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.20.3.patch b/1002_linux-4.20.3.patch
new file mode 100644
index 000..268cb43
--- /dev/null
+++ b/1002_linux-4.20.3.patch
@@ -0,0 +1,1927 @@
+diff --git a/Makefile b/Makefile
+index 4ba3dd0bf35d..3b9e4658d31f 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 20
+-SUBLEVEL = 2
++SUBLEVEL = 3
+ EXTRAVERSION =
+ NAME = Shy Crocodile
+ 
+diff --git a/arch/arm/mach-davinci/board-da830-evm.c 
b/arch/arm/mach-davinci/board-da830-evm.c
+index 7d8ab36ff83d..b3a3f5a59b5c 100644
+--- a/arch/arm/mach-davinci/board-da830-evm.c
 b/arch/arm/mach-davinci/board-da830-evm.c
+@@ -207,9 +207,9 @@ static struct gpiod_lookup_table mmc_gpios_table = {
+   .dev_id = "da830-mmc.0",
+   .table = {
+   /* gpio chip 1 contains gpio range 32-63 */
+-  GPIO_LOOKUP("davinci_gpio.0", DA830_MMCSD_CD_PIN, "cd",
++  GPIO_LOOKUP("davinci_gpio", DA830_MMCSD_CD_PIN, "cd",
+   GPIO_ACTIVE_LOW),
+-  GPIO_LOOKUP("davinci_gpio.0", DA830_MMCSD_WP_PIN, "wp",
++  GPIO_LOOKUP("davinci_gpio", DA830_MMCSD_WP_PIN, "wp",
+   GPIO_ACTIVE_LOW),
+   },
+ };
+diff --git a/arch/arm/mach-davinci/board-da850-evm.c 
b/arch/arm/mach-davinci/board-da850-evm.c
+index e1a949b47306..bf2549e1894b 100644
+--- a/arch/arm/mach-davinci/board-da850-evm.c
 b/arch/arm/mach-davinci/board-da850-evm.c
+@@ -780,9 +780,9 @@ static struct gpiod_lookup_table mmc_gpios_table = {
+   .dev_id = "da830-mmc.0",
+   .table = {
+   /* gpio chip 2 contains gpio range 64-95 */
+-  GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_CD_PIN, "cd",
++  GPIO_LOOKUP("davinci_gpio", DA850_MMCSD_CD_PIN, "cd",
+   GPIO_ACTIVE_LOW),
+-  GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_WP_PIN, "wp",
++  GPIO_LOOKUP("davinci_gpio", DA850_MMCSD_WP_PIN, "wp",
+   GPIO_ACTIVE_HIGH),
+   },
+ };
+diff --git a/arch/arm/mach-davinci/board-dm355-evm.c 
b/arch/arm/mach-davinci/board-dm355-evm.c
+index f53a461a606f..f7fa960c23e3 100644
+--- a/arch/arm/mach-davinci/board-dm355-evm.c
 b/arch/arm/mach-davinci/board-dm355-evm.c
+@@ -117,9 +117,9 @@ static struct platform_device davinci_nand_device = {
+ static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
+   .dev_id = "i2c_davinci.1",
+   .table = {
+-  GPIO_LOOKUP("davinci_gpio.0", DM355_I2C_SDA_PIN, "sda",
++  GPIO_LOOKUP("davinci_gpio", DM355_I2C_SDA_PIN, "sda",
+   GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+-  GPIO_LOOKUP("davinci_gpio.0", DM355_I2C_SCL_PIN, "scl",
++  GPIO_LOOKUP("davinci_gpio", DM355_I2C_SCL_PIN, "scl",
+   GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+   },
+ };
+diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c 
b/arch/arm/mach-davinci/board-dm644x-evm.c
+index e4a8f9225d16..f752d828e42f 100644
+--- a/arch/arm/mach-davinci/board-dm644x-evm.c
 b/arch/arm/mach-davinci/board-dm644x-evm.c
+@@ -638,9 +638,9 @@ static struct i2c_board_info __initdata i2c_info[] =  {
+ static struct gpiod_lookup_table i2c_recovery_gpiod_table = {
+   .dev_id = "i2c_davinci.1",
+   .table = {
+-  GPIO_LOOKUP("davinci_gpio.0", DM644X_I2C_SDA_PIN, "sda",
++  GPIO_LOOKUP("davinci_gpio", DM644X_I2C_SDA_PIN, "sda",
+   GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+-  GPIO_LOOKUP("davinci_gpio.0", DM644X_I2C_SCL_PIN, "scl",
++  GPIO_LOOKUP("davinci_gpio", DM644X_I2C_SCL_PIN, "scl",
+   GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN),
+   },
+ };
+diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c 
b/arch/arm/mach-davinci/board-omapl138-hawk.c
+index 8e8d51f4a276..94c4f126ef86 100644
+--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
 

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

2019-01-15 Thread Mike Pagano
commit: 01cdc47039ab80f6a8f19137d3c000e2f4f0e3fd
Author: Mike Pagano  gentoo  org>
AuthorDate: Tue Jan 15 15:08:00 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Tue Jan 15 15:08:00 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=01cdc470

proj/linux-patches: Fix typo in patch name

Signed-off-by: Mike Pagano  gentoo.org>

 1001_linux-4.20.1.patch => 1000_linux-4.20.1.patch | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/1001_linux-4.20.1.patch b/1000_linux-4.20.1.patch
similarity index 100%
rename from 1001_linux-4.20.1.patch
rename to 1000_linux-4.20.1.patch



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

2019-01-13 Thread Mike Pagano
commit: 255753c89d48f9d5e6428111ab1439c1ed6d1985
Author: Mike Pagano  gentoo  org>
AuthorDate: Sun Jan 13 19:29:52 2019 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sun Jan 13 19:29:52 2019 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=255753c8

proj/linux-patches: Linux patch 4.20.2

Signed-off-by: Mike Pagano  gentoo.org>

 _README |4 +
 1001_linux-4.20.2.patch | 3086 +++
 2 files changed, 3090 insertions(+)

diff --git a/_README b/_README
index 543d775..0e0dc28 100644
--- a/_README
+++ b/_README
@@ -47,6 +47,10 @@ Patch:  1000_linux-4.20.1.patch
 From:   http://www.kernel.org
 Desc:   Linux 4.20.1
 
+Patch:  1001_linux-4.20.2.patch
+From:   http://www.kernel.org
+Desc:   Linux 4.20.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.20.2.patch b/1001_linux-4.20.2.patch
new file mode 100644
index 000..212bec9
--- /dev/null
+++ b/1001_linux-4.20.2.patch
@@ -0,0 +1,3086 @@
+diff --git a/Makefile b/Makefile
+index 84d2f8deea30..4ba3dd0bf35d 100644
+--- a/Makefile
 b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 4
+ PATCHLEVEL = 20
+-SUBLEVEL = 1
++SUBLEVEL = 2
+ EXTRAVERSION =
+ NAME = Shy Crocodile
+ 
+diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
+index 6327fd79b0fb..fd59fef9931b 100644
+--- a/arch/powerpc/kernel/signal_32.c
 b/arch/powerpc/kernel/signal_32.c
+@@ -848,7 +848,23 @@ static long restore_tm_user_regs(struct pt_regs *regs,
+   /* If TM bits are set to the reserved value, it's an invalid context */
+   if (MSR_TM_RESV(msr_hi))
+   return 1;
+-  /* Pull in the MSR TM bits from the user context */
++
++  /*
++   * Disabling preemption, since it is unsafe to be preempted
++   * with MSR[TS] set without recheckpointing.
++   */
++  preempt_disable();
++
++  /*
++   * CAUTION:
++   * After regs->MSR[TS] being updated, make sure that get_user(),
++   * put_user() or similar functions are *not* called. These
++   * functions can generate page faults which will cause the process
++   * to be de-scheduled with MSR[TS] set but without calling
++   * tm_recheckpoint(). This can cause a bug.
++   *
++   * Pull in the MSR TM bits from the user context
++   */
+   regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr_hi & MSR_TS_MASK);
+   /* Now, recheckpoint.  This loads up all of the checkpointed (older)
+* registers, including FP and V[S]Rs.  After recheckpointing, the
+@@ -873,6 +889,8 @@ static long restore_tm_user_regs(struct pt_regs *regs,
+   }
+ #endif
+ 
++  preempt_enable();
++
+   return 0;
+ }
+ #endif
+@@ -1140,11 +1158,11 @@ SYSCALL_DEFINE0(rt_sigreturn)
+ {
+   struct rt_sigframe __user *rt_sf;
+   struct pt_regs *regs = current_pt_regs();
+-  int tm_restore = 0;
+ #ifdef CONFIG_PPC_TRANSACTIONAL_MEM
+   struct ucontext __user *uc_transact;
+   unsigned long msr_hi;
+   unsigned long tmp;
++  int tm_restore = 0;
+ #endif
+   /* Always make any pending restarted system calls return -EINTR */
+   current->restart_block.fn = do_no_restart_syscall;
+@@ -1192,19 +1210,11 @@ SYSCALL_DEFINE0(rt_sigreturn)
+   goto bad;
+   }
+   }
+-  if (!tm_restore) {
+-  /*
+-   * Unset regs->msr because ucontext MSR TS is not
+-   * set, and recheckpoint was not called. This avoid
+-   * hitting a TM Bad thing at RFID
+-   */
+-  regs->msr &= ~MSR_TS_MASK;
+-  }
+-  /* Fall through, for non-TM restore */
+-#endif
+   if (!tm_restore)
+-  if (do_setcontext(_sf->uc, regs, 1))
+-  goto bad;
++  /* Fall through, for non-TM restore */
++#endif
++  if (do_setcontext(_sf->uc, regs, 1))
++  goto bad;
+ 
+   /*
+* It's not clear whether or why it is desirable to save the
+diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
+index daa28cb72272..bbd1c73243d7 100644
+--- a/arch/powerpc/kernel/signal_64.c
 b/arch/powerpc/kernel/signal_64.c
+@@ -467,20 +467,6 @@ static long restore_tm_sigcontexts(struct task_struct 
*tsk,
+   if (MSR_TM_RESV(msr))
+   return -EINVAL;
+ 
+-  /* pull in MSR TS bits from user context */
+-  regs->msr = (regs->msr & ~MSR_TS_MASK) | (msr & MSR_TS_MASK);
+-
+-  /*
+-   * Ensure that TM is enabled in regs->msr before we leave the signal
+-   * handler. It could be the case that (a) user disabled the TM bit
+-   * through the manipulation of the MSR bits in uc_mcontext or (b) the
+-   * TM bit was disabled because a sufficient number of context switches
+-   * 

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

2018-12-28 Thread Mike Pagano
commit: bc7126d88b11af5d3384c18ca682974d59d3fdaf
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Dec 29 01:06:22 2018 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Dec 29 01:06:22 2018 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=bc7126d8

proj/linux-patches: Select PID_NS to support FEATURES=pid-sandbox

For portage: >=sys-apps/portage-2.3.53
See bug #673896

Signed-off-by: Mike Pagano  gentoo.org>

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

diff --git a/4567_distro-Gentoo-Kconfig.patch b/4567_distro-Gentoo-Kconfig.patch
index ec31768..d6e791a 100644
--- a/4567_distro-Gentoo-Kconfig.patch
+++ b/4567_distro-Gentoo-Kconfig.patch
@@ -6,9 +6,9 @@
  source "lib/Kconfig.debug"
 +
 +source "distro/Kconfig"
 /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 @@
+--- /dev/null  2018-12-28 10:40:34.08934 -0500
 b/distro/Kconfig   2018-12-28 18:54:40.467970759 -0500
+@@ -0,0 +1,147 @@
 +menu "Gentoo Linux"
 +
 +config GENTOO_LINUX
@@ -63,6 +63,7 @@
 +  select NAMESPACES
 +  select IPC_NS
 +  select NET_NS
++  select PID_NS
 +  select SYSVIPC
 +
 +  help
@@ -72,6 +73,7 @@
 +  CGROUPS (required for FEATURES=cgroup)
 +  IPC_NS  (required for FEATURES=ipc-sandbox)
 +  NET_NS  (required for FEATURES=network-sandbox)
++  PID_NS  (required for FEATURES=pid-sandbox)
 +  SYSVIPC (required by IPC_NS)
 +   
 +



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

2018-11-17 Thread Mike Pagano
commit: 8eefaf79a2b1d9b42374f02f4c13f2a74f87713d
Author: Mike Pagano  gentoo  org>
AuthorDate: Sat Nov 17 14:51:58 2018 +
Commit: Mike Pagano  gentoo  org>
CommitDate: Sat Nov 17 14:51:58 2018 +
URL:https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=8eefaf79

proj/linux-patches: Port patches to the 4.20 branch

Patch to support for namespace user.pax.* on tmpfs.
Enable link security restrictions by default.
Add UAS disable quirk. See bug #640082.
hid-apple patch to enable swapping of the FN and left Control keys and
on some apple keyboards. See bug #622902.
Enable control of the unaligned access control policy from sysctl
Kernel patch enables gcc >= v4.13 optimizations for additional CPUs.

Signed-off-by: Mike Pagano  gentoo.org>

 _README|  24 +
 1500_XATTR_USER_PREFIX.patch   |  69 +++
 ...ble-link-security-restrictions-by-default.patch |  20 +
 ...age-Disable-UAS-on-JMicron-SATA-enclosure.patch |  40 ++
 2600_enable-key-swapping-for-apple-mac.patch   | 114 +
 4400_alpha-sysctl-uac.patch| 142 ++
 ...able-additional-cpu-optimizations-for-gcc.patch | 545 +
 7 files changed, 954 insertions(+)

diff --git a/_README b/_README
index 9018993..f19e624 100644
--- a/_README
+++ b/_README
@@ -43,6 +43,30 @@ EXPERIMENTAL
 Individual Patch Descriptions:
 --
 
+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:  2500_usb-storage-Disable-UAS-on-JMicron-SATA-enclosure.patch
+From:   https://bugzilla.redhat.com/show_bug.cgi?id=1260207#c5
+Desc:   Add UAS disable quirk. See bug #640082.
+
+Patch:  2600_enable-key-swapping-for-apple-mac.patch
+From:   https://github.com/free5lot/hid-apple-patched
+Desc:   This hid-apple patch enables swapping of the FN and left Control keys 
and some additional on some apple keyboards. See bug #622902
+
+Patch:  4400_alpha-sysctl-uac.patch
+From:   Tobias Klausmann (klaus...@gentoo.org) and 
http://bugs.gentoo.org/show_bug.cgi?id=217323
+Desc:   Enable control of the unaligned access control policy from sysctl
+
 Patch:  4567_distro-Gentoo-Kconfig.patch
 From:   Tom Wijsman 
 Desc:   Add Gentoo Linux support config settings and defaults.
+
+Patch:  5010_enable-additional-cpu-optimizations-for-gcc.patch
+From:   https://github.com/graysky2/kernel_gcc_patch/
+Desc:   Kernel patch enables gcc >= v4.13 optimizations for additional CPUs.

diff --git a/1500_XATTR_USER_PREFIX.patch b/1500_XATTR_USER_PREFIX.patch
new file mode 100644
index 000..bacd032
--- /dev/null
+++ b/1500_XATTR_USER_PREFIX.patch
@@ -0,0 +1,69 @@
+From: Anthony G. Basile 
+
+This patch adds support for a restricted user-controlled namespace on
+tmpfs filesystem used to house PaX flags.  The namespace must be of the
+form user.pax.* and its value cannot exceed a size of 8 bytes.
+
+This is needed even on all Gentoo systems so that XATTR_PAX flags
+are preserved for users who might build packages using portage on
+a tmpfs system with a non-hardened kernel and then switch to a
+hardened kernel with XATTR_PAX enabled.
+
+The namespace is added to any user with Extended Attribute support
+enabled for tmpfs.  Users who do not enable xattrs will not have
+the XATTR_PAX flags preserved.
+
+diff --git a/include/uapi/linux/xattr.h b/include/uapi/linux/xattr.h
+index 1590c49..5eab462 100644
+--- a/include/uapi/linux/xattr.h
 b/include/uapi/linux/xattr.h
+@@ -73,5 +73,9 @@
+ #define XATTR_POSIX_ACL_DEFAULT  "posix_acl_default"
+ #define XATTR_NAME_POSIX_ACL_DEFAULT XATTR_SYSTEM_PREFIX 
XATTR_POSIX_ACL_DEFAULT
+ 
++/* User namespace */
++#define XATTR_PAX_PREFIX XATTR_USER_PREFIX "pax."
++#define XATTR_PAX_FLAGS_SUFFIX "flags"
++#define XATTR_NAME_PAX_FLAGS XATTR_PAX_PREFIX XATTR_PAX_FLAGS_SUFFIX
+ 
+ #endif /* _UAPI_LINUX_XATTR_H */
+diff --git a/mm/shmem.c b/mm/shmem.c
+index 440e2a7..c377172 100644
+--- a/mm/shmem.c
 b/mm/shmem.c
+@@ -2667,6 +2667,14 @@ static int shmem_xattr_handler_set(const struct 
xattr_handler *handler,
+   struct shmem_inode_info *info = SHMEM_I(d_inode(dentry));
+ 
+   name = xattr_full_name(handler, name);
++
++  if (!strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN)) {
++  if (strcmp(name, XATTR_NAME_PAX_FLAGS))
++  return -EOPNOTSUPP;
++  if (size > 8)
++  return -EINVAL;
++  }
++
+   return simple_xattr_set(>xattrs, name, value, size, flags);
+ }
+ 
+@@ -2682,6 +2690,12 @@ static const struct xattr_handler