Re: [PATCH v2 7/9] sparc64: numa: check the node id consistently for sparc64

2019-08-31 Thread David Miller
From: Yunsheng Lin Date: Sat, 31 Aug 2019 16:57:04 +0800 > Did you mean sparc64 system does not has ACPI, the device's node id will > not specified by ACPI, so the ACPI is unrelated here? Yes, sparc64 never has and never will have ACPI. This is also true for several other platforms where you

Re: [PATCH v7 6/6] powerpc/perf: split callchain.c by bitness

2019-08-31 Thread Michal Suchánek
On Fri, 30 Aug 2019 23:03:43 +0200 Michal Suchanek wrote: > Building callchain.c with !COMPAT proved quite ugly with all the > defines. Splitting out the 32bit and 64bit parts looks better. > > No code change intended. valid_user_sp is broken in compat. It needs to be ifdefed for the 32bit

Re: [PATCH v7 0/6] Disable compat cruft on ppc64le v7

2019-08-31 Thread Michal Suchánek
On Sat, 31 Aug 2019 08:41:58 +0200 Christophe Leroy wrote: > Le 30/08/2019 à 23:03, Michal Suchanek a écrit : > > Less code means less bugs so add a knob to skip the compat stuff. > > I guess on PPC64 you have Gigabytes of memory and thousands of bogomips, > hence you focus on bugs. > > My

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-08-31 Thread Peter Zijlstra
On Sat, Aug 31, 2019 at 06:09:39PM +0800, Yunsheng Lin wrote: > > > On 2019/8/31 16:55, Peter Zijlstra wrote: > > On Sat, Aug 31, 2019 at 01:58:16PM +0800, Yunsheng Lin wrote: > >> According to Section 6.2.14 from ACPI spec 6.3 [1], the setting > >> of proximity domain is optional, as below: >

Re: [PATCH v2 8/9] mips: numa: check the node id consistently for mips ip27

2019-08-31 Thread Paul Burton
Hi Yunsheng, On Sat, Aug 31, 2019 at 01:58:22PM +0800, Yunsheng Lin wrote: > According to Section 6.2.14 from ACPI spec 6.3 [1], the setting > of proximity domain is optional, as below: > > This optional object is used to describe proximity domain > associations within a machine. _PXM evaluates

Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro"

2019-08-31 Thread Arnd Bergmann
On Sat, Aug 31, 2019 at 10:39 AM Christoph Hellwig wrote: > > On Fri, Aug 30, 2019 at 09:54:43PM +0200, Arnd Bergmann wrote: > > > -#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) > > > +#ifdef __ARCH_WANT_SYS_LLSEEK > > > SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long,

Re: [PATCH v7 4/6] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-31 Thread Michal Suchánek
On Fri, 30 Aug 2019 23:03:41 +0200 Michal Suchanek wrote: > There are numerous references to 32bit functions in generic and 64bit > code so ifdef them out. > > Signed-off-by: Michal Suchanek > --- > v2: > - fix 32bit ifdef condition in signal.c > - simplify the compat ifdef condition in vdso.c

[RFC PATCH v2 10/10] powerpc/32: Add stack overflow detection with VMAP stack.

2019-08-31 Thread Christophe Leroy
To avoid recursive faults, stack overflow detection has to be performed before writing in the stack in exception prologs. Do it by checking the alignment. If the stack pointer alignment is wrong, it means it is pointing to the following or preceding page. Signed-off-by: Christophe Leroy ---

[RFC PATCH v2 09/10] powerpc: align stack to 2 * THREAD_SIZE with VMAP_STACK

2019-08-31 Thread Christophe Leroy
In order to ease stack overflow detection, align stack to 2 * THREAD_SIZE when using VMAP_STACK. This allow overflow detection using a single bit check. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/thread_info.h | 13 + arch/powerpc/kernel/setup_32.c | 2 +-

[RFC PATCH v2 08/10] powerpc/8xx: Enable CONFIG_VMAP_STACK

2019-08-31 Thread Christophe Leroy
This patch enables CONFIG_VMAP_STACK. For that, a few changes are done in head_8xx.S. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1 + arch/powerpc/kernel/head_8xx.S | 47 +- 2 files changed, 47 insertions(+), 1 deletion(-) diff

[RFC PATCH v2 05/10] powerpc/8xx: drop exception entries for non-existing exceptions

2019-08-31 Thread Christophe Leroy
head_8xx.S has entries for all exceptions from 0x100 to 0x1f00. Several of them do not exist and are never generated by the 8xx in accordance with the documentation. Remove those entry points to make some room for future growing exception code. Signed-off-by: Christophe Leroy ---

[RFC PATCH v2 06/10] powerpc/8xx: move DataStoreTLBMiss perf handler

2019-08-31 Thread Christophe Leroy
Move DataStoreTLBMiss perf handler in order to cope with future growing exception prolog. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S

[RFC PATCH v2 07/10] powerpc/8xx: split breakpoint exception

2019-08-31 Thread Christophe Leroy
Breakpoint exception is big. Split it to support future growth on exception prolog. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S

[RFC PATCH v2 04/10] powerpc/8xx: Use alternative scratch registers in DTLB miss handler

2019-08-31 Thread Christophe Leroy
In preparation of handling CONFIG_VMAP_STACK, we need DTLB miss handler to use different scratch registers than other exception handlers in order to not jeopardise exception entry on stack DTLB misses. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_8xx.S | 28

[RFC PATCH v2 02/10] powerpc/32: Add EXCEPTION_PROLOG_0 in head_32.h

2019-08-31 Thread Christophe Leroy
This patch creates a macro for the very first part of exception prolog, this will help when implementing CONFIG_VMAP_STACK Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.S | 4 +--- arch/powerpc/kernel/head_32.h | 9 ++--- arch/powerpc/kernel/head_8xx.S | 9 ++--- 3

[RFC PATCH v2 01/10] powerpc/32: replace MTMSRD() by mtmsr

2019-08-31 Thread Christophe Leroy
On PPC32, MTMSRD() is simply defined as mtmsr. Replace MTMSRD(reg) by mtmsr reg in files dedicated to PPC32, this makes the code less obscure. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 18 +- arch/powerpc/kernel/head_32.h | 4 ++-- 2 files changed,

[RFC PATCH v2 03/10] powerpc/32: prepare for CONFIG_VMAP_STACK

2019-08-31 Thread Christophe Leroy
To support CONFIG_VMAP_STACK, the kernel has to activate Data MMU Translation for accessing the stack. Before doing that it must save SRR0, SRR1 and DAR in order to not loose them in case there is a Data TLB Miss once the translation is reactivated. This patch defines fields in the thread struct

[RFC PATCH v2 00/10] Enable CONFIG_VMAP_STACK on PPC32

2019-08-31 Thread Christophe Leroy
The purpose of this serie is to enable CONFIG_VMAP_STACK on PPC32. For the time being we have something working on 8xx. Further work I'm working on: - Fix stack overflow detection (doesn't work all the time yet, with the LKDTM STACK_EXHAUST test it hang). - Add support to powerpc 603 - Add

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-08-31 Thread Yunsheng Lin
On 2019/8/31 16:55, Peter Zijlstra wrote: > On Sat, Aug 31, 2019 at 01:58:16PM +0800, Yunsheng Lin wrote: >> According to Section 6.2.14 from ACPI spec 6.3 [1], the setting >> of proximity domain is optional, as below: >> >> This optional object is used to describe proximity domain >>

Re: [PATCH v2 7/9] sparc64: numa: check the node id consistently for sparc64

2019-08-31 Thread Yunsheng Lin
On 2019/8/31 14:53, David Miller wrote: > From: Yunsheng Lin > Date: Sat, 31 Aug 2019 13:58:21 +0800 > >> According to Section 6.2.14 from ACPI spec 6.3 [1], the setting >> of proximity domain is optional, as below: > > What in the world does the ACPI spec have to do with sparc64 NUMA > node ID

Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-08-31 Thread Peter Zijlstra
On Sat, Aug 31, 2019 at 01:58:16PM +0800, Yunsheng Lin wrote: > According to Section 6.2.14 from ACPI spec 6.3 [1], the setting > of proximity domain is optional, as below: > > This optional object is used to describe proximity domain > associations within a machine. _PXM evaluates to an integer

Re: [PATCH] Revert "asm-generic: Remove unneeded __ARCH_WANT_SYS_LLSEEK macro"

2019-08-31 Thread Christoph Hellwig
On Fri, Aug 30, 2019 at 09:54:43PM +0200, Arnd Bergmann wrote: > > -#if !defined(CONFIG_64BIT) || defined(CONFIG_COMPAT) > > +#ifdef __ARCH_WANT_SYS_LLSEEK > > SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high, > > unsigned long, offset_low, loff_t __user *,

[PATCH v2 3/9] alpha: numa: check the node id consistently for alpha

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in

[PATCH v2 9/9] mips: numa: check the node id consistently for mips loongson64

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in

[PATCH v2 1/9] arm64: numa: check the node id consistently for arm64

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in

[PATCH v2 7/9] sparc64: numa: check the node id consistently for sparc64

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in

[PATCH v2 0/9] check the node id consistently across different arches

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in

[PATCH v2 6/9] sh: numa: check the node id consistently for sh

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in

[PATCH v2 5/9] s390: numa: check the node id consistently for s390

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in

[PATCH v2 8/9] mips: numa: check the node id consistently for mips ip27

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in

[PATCH v2 2/9] x86: numa: check the node id consistently for x86

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in

[PATCH v2 4/9] powerpc: numa: check the node id consistently for powerpc

2019-08-31 Thread Yunsheng Lin
According to Section 6.2.14 from ACPI spec 6.3 [1], the setting of proximity domain is optional, as below: This optional object is used to describe proximity domain associations within a machine. _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in

Re: Oops (request_key_auth_describe) while running cve-2016-7042 from LTP

2019-08-31 Thread Hillf Danton
David Howells wrote: >> 1, callee has no pre defined duty to help caller in general; they should not >> try to do anything, however, to help their callers in principle due to >> limited info on their hands IMO. > > Ah, no. It's entirely reasonable for an API to specify that one of its > methods

Re: Oops (request_key_auth_describe) while running cve-2016-7042 from LTP

2019-08-31 Thread Hillf Danton
David Howells wrote: > > Hillf Danton wrote: > > > - struct request_key_auth *rka = dereference_key_rcu(key); > > + struct request_key_auth *rka; > > + > > + rcu_read_lock(); > > + rka = dereference_key_rcu(key); > > This shouldn't help as the caller, proc_keys_show(), is holding the RCU

Re: [PATCH v2 7/9] sparc64: numa: check the node id consistently for sparc64

2019-08-31 Thread David Miller
From: Yunsheng Lin Date: Sat, 31 Aug 2019 13:58:21 +0800 > According to Section 6.2.14 from ACPI spec 6.3 [1], the setting > of proximity domain is optional, as below: What in the world does the ACPI spec have to do with sparc64 NUMA node ID checking?

Re: [PATCH v7 4/6] powerpc/64: make buildable without CONFIG_COMPAT

2019-08-31 Thread Christophe Leroy
Le 30/08/2019 à 23:03, Michal Suchanek a écrit : There are numerous references to 32bit functions in generic and 64bit code so ifdef them out. Signed-off-by: Michal Suchanek Reviewed-by: Christophe Leroy --- v2: - fix 32bit ifdef condition in signal.c - simplify the compat ifdef

Re: [PATCH v7 0/6] Disable compat cruft on ppc64le v7

2019-08-31 Thread Christophe Leroy
Le 30/08/2019 à 23:03, Michal Suchanek a écrit : Less code means less bugs so add a knob to skip the compat stuff. I guess on PPC64 you have Gigabytes of memory and thousands of bogomips, hence you focus on bugs. My main focus usually is kernel size and performance, which makes this