Re: [PATCH v3 04/27] ocxl: Remove unnecessary externs

2020-02-26 Thread Baoquan He
On 02/21/20 at 02:26pm, Alastair D'Silva wrote: > From: Alastair D'Silva > > Function declarations don't need externs, remove the existing ones > so they are consistent with newer code > > Signed-off-by: Alastair D'Silva > --- > arch/powerpc/include/asm/pnv-ocxl.h | 32 ++--

Re: [PATCH v3 0/6] implement KASLR for powerpc/fsl_booke/64

2020-02-26 Thread Jason Yan
Hi Daniel, 在 2020/2/26 15:16, Daniel Axtens 写道: Hi Jason, This is a try to implement KASLR for Freescale BookE64 which is based on my earlier implementation for Freescale BookE32: https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=131718 The implementation for Freescale BookE64 is

RE: [PATCH v3 04/27] ocxl: Remove unnecessary externs

2020-02-26 Thread Alastair D'Silva
> -Original Message- > From: Baoquan He > Sent: Wednesday, 26 February 2020 7:15 PM > To: Alastair D'Silva > Cc: alast...@d-silva.org; Aneesh Kumar K . V > ; Oliver O'Halloran ; > Benjamin Herrenschmidt ; Paul Mackerras > ; Michael Ellerman ; Frederic > Barrat ; Andrew Donnellan ; > Arnd

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-26 Thread Mike Rapoport
On Tue, Feb 18, 2020 at 12:54:40PM +0200, Mike Rapoport wrote: > On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote: > > > > > > Le 16/02/2020 à 09:18, Mike Rapoport a écrit : > > > From: Mike Rapoport > > > > > > Implement primitives necessary for the 4th level folding, add walks

Re: [PATCH v3 04/27] ocxl: Remove unnecessary externs

2020-02-26 Thread Greg Kurz
On Wed, 26 Feb 2020 19:26:34 +1100 "Alastair D'Silva" wrote: > > -Original Message- > > From: Baoquan He > > Sent: Wednesday, 26 February 2020 7:15 PM > > To: Alastair D'Silva > > Cc: alast...@d-silva.org; Aneesh Kumar K . V > > ; Oliver O'Halloran ; > > Benjamin Herrenschmidt ; Paul Ma

[Bug 206669] Little-endian kernel crashing on POWER8 on heavy big-endian PowerKVM load

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206669 --- Comment #3 from npig...@gmail.com --- bugzilla-dae...@bugzilla.kernel.org's on February 26, 2020 5:26 pm: > https://bugzilla.kernel.org/show_bug.cgi?id=206669 > > --- Comment #2 from John Paul Adrian Glaubitz (glaub...@physik.fu-berlin.de) >

Re: [Bug 206669] Little-endian kernel crashing on POWER8 on heavy big-endian PowerKVM load

2020-02-26 Thread Nicholas Piggin
bugzilla-dae...@bugzilla.kernel.org's on February 26, 2020 5:26 pm: > https://bugzilla.kernel.org/show_bug.cgi?id=206669 > > --- Comment #2 from John Paul Adrian Glaubitz (glaub...@physik.fu-berlin.de) > --- > (In reply to npiggin from comment #1) >> Thanks for the report, we need to get more dat

Re: [PATCH] evh_bytechan: fix out of bounds accesses

2020-02-26 Thread Laurentiu Tudor
On 25.02.2020 22:56, Stephen Rothwell wrote: Hi Laurentiu, On Tue, 25 Feb 2020 11:54:17 +0200 Laurentiu Tudor wrote: On 21.02.2020 01:57, Stephen Rothwell wrote: On Thu, 16 Jan 2020 11:37:14 +1100 Stephen Rothwell wrote: On Wed, 15 Jan 2020 14:01:35 -0600 Scott Wood wrote: On Thu

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-26 Thread Christophe Leroy
Le 26/02/2020 à 10:13, Mike Rapoport a écrit : On Tue, Feb 18, 2020 at 12:54:40PM +0200, Mike Rapoport wrote: On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote: Le 16/02/2020 à 09:18, Mike Rapoport a écrit : From: Mike Rapoport Implement primitives necessary for the 4th l

[Bug 206669] Little-endian kernel crashing on POWER8 on heavy big-endian PowerKVM load

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206669 --- Comment #4 from John Paul Adrian Glaubitz (glaub...@physik.fu-berlin.de) --- (In reply to npiggin from comment #3) > Do you have tracing / ftrace enabled in the host kernel for any > reason? Turning that off might let the oops message get prin

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-26 Thread Mike Rapoport
On Wed, Feb 26, 2020 at 10:46:13AM +0100, Christophe Leroy wrote: > > > Le 26/02/2020 à 10:13, Mike Rapoport a écrit : > > On Tue, Feb 18, 2020 at 12:54:40PM +0200, Mike Rapoport wrote: > > > On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote: > > > > > > > > > > > > Le 16/02/2020

Re: [Bug 206669] Little-endian kernel crashing on POWER8 on heavy big-endian PowerKVM load

2020-02-26 Thread Nicholas Piggin
bugzilla-dae...@bugzilla.kernel.org's on February 26, 2020 8:28 pm: > https://bugzilla.kernel.org/show_bug.cgi?id=206669 > > --- Comment #4 from John Paul Adrian Glaubitz (glaub...@physik.fu-berlin.de) > --- > (In reply to npiggin from comment #3) >> Do you have tracing / ftrace enabled in the ho

[Bug 206669] Little-endian kernel crashing on POWER8 on heavy big-endian PowerKVM load

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206669 --- Comment #5 from npig...@gmail.com --- bugzilla-dae...@bugzilla.kernel.org's on February 26, 2020 8:28 pm: > https://bugzilla.kernel.org/show_bug.cgi?id=206669 > > --- Comment #4 from John Paul Adrian Glaubitz (glaub...@physik.fu-berlin.de) >

Re: [PATCH v2 07/13] powerpc: add support for folded p4d page tables

2020-02-26 Thread Christophe Leroy
Le 26/02/2020 à 11:56, Mike Rapoport a écrit : On Wed, Feb 26, 2020 at 10:46:13AM +0100, Christophe Leroy wrote: Le 26/02/2020 à 10:13, Mike Rapoport a écrit : On Tue, Feb 18, 2020 at 12:54:40PM +0200, Mike Rapoport wrote: On Sun, Feb 16, 2020 at 11:41:07AM +0100, Christophe Leroy wrote:

Re: [PATCH v3 0/6] implement KASLR for powerpc/fsl_booke/64

2020-02-26 Thread Daniel Axtens
Jason Yan writes: > Hi Daniel, > > 在 2020/2/26 15:16, Daniel Axtens 写道: >> Hi Jason, >> >>> This is a try to implement KASLR for Freescale BookE64 which is based on >>> my earlier implementation for Freescale BookE32: >>> https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=131718 >>>

[PATCH v3 02/13] powerpc/ptrace: remove unused header includes

2020-02-26 Thread Christophe Leroy
Remove unused header includes in ptrace.c and ptrace32.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/ptrace.c | 19 ++- arch/powerpc/kernel/ptrace/ptrace32.c | 11 --- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/arch/powerpc/kernel

[PATCH v3 00/13] Reduce ifdef mess in ptrace

2020-02-26 Thread Christophe Leroy
The purpose of this series is to reduce the amount of #ifdefs in ptrace.c Link: https://github.com/linuxppc/issues/issues/128 Tentatively build checked on kisskb allthough kisskb seems overloaded and failing to complete the tests. See http://kisskb.ellerman.id.au/kisskb/branch/chleroy/head/ff12

[PATCH v3 03/13] powerpc/ptrace: drop unnecessary #ifdefs CONFIG_PPC64

2020-02-26 Thread Christophe Leroy
Drop a bunch of #ifdefs CONFIG_PPC64 that are not vital. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ptrace.h | 2 ++ arch/powerpc/kernel/ptrace/ptrace.c | 18 +++--- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/include/asm/ptrace.h

[PATCH v3 01/13] powerpc: move ptrace into a subdirectory.

2020-02-26 Thread Christophe Leroy
In order to allow splitting of ptrace depending on the different CONFIG_ options, create a subdirectory dedicated to ptrace and move ptrace.c and ptrace32.c into it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/Makefile| 7 +++ arch/powerpc/kernel/ptrace/Makefile

[PATCH v3 04/13] powerpc/ptrace: drop PARAMETER_SAVE_AREA_OFFSET

2020-02-26 Thread Christophe Leroy
PARAMETER_SAVE_AREA_OFFSET is not used, drop it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/ptrace.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/arch/powerpc/kernel/ptrace/ptrace.c b/arch/powerpc/kernel/ptrace/ptrace.c index 3dd94c296ac7..22826c942eae 1006

[PATCH v3 05/13] powerpc/ptrace: split out VSX related functions.

2020-02-26 Thread Christophe Leroy
Move CONFIG_VSX functions out of ptrace.c, into ptrace-vsx.c and ptrace-novsx.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/Makefile | 4 + arch/powerpc/kernel/ptrace/ptrace-decl.h | 26 arch/powerpc/kernel/ptrace/ptrace-novsx.c | 57 +++ arch/powerpc/kerne

[PATCH v3 07/13] powerpc/ptrace: split out SPE related functions.

2020-02-26 Thread Christophe Leroy
Move CONFIG_SPE functions out of ptrace.c, into ptrace-spe.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/Makefile | 1 + arch/powerpc/kernel/ptrace/ptrace-decl.h | 9 arch/powerpc/kernel/ptrace/ptrace-spe.c | 66 arch/powerpc/kernel/ptrace

[PATCH v3 06/13] powerpc/ptrace: split out ALTIVEC related functions.

2020-02-26 Thread Christophe Leroy
Move CONFIG_ALTIVEC functions out of ptrace.c, into ptrace-altivec.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/Makefile | 1 + arch/powerpc/kernel/ptrace/ptrace-altivec.c | 126 arch/powerpc/kernel/ptrace/ptrace-decl.h| 9 ++ arch/powerpc

[PATCH v3 08/13] powerpc/ptrace: split out TRANSACTIONAL_MEM related functions.

2020-02-26 Thread Christophe Leroy
Move TRANSACTIONAL_MEM functions out of ptrace.c, into ptrace-tm.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/Makefile | 1 + arch/powerpc/kernel/ptrace/ptrace-decl.h | 89 +++ arch/powerpc/kernel/ptrace/ptrace-tm.c | 851 + arch/powerpc/kernel/p

[PATCH v3 11/13] powerpc/ptrace: create ptrace_get_debugreg()

2020-02-26 Thread Christophe Leroy
Create ptrace_get_debugreg() to handle PTRACE_GET_DEBUGREG and reduce ifdef mess Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/ptrace-adv.c | 9 + arch/powerpc/kernel/ptrace/ptrace-decl.h | 2 ++ arch/powerpc/kernel/ptrace/ptrace-noadv.c | 13 + arch/pow

[PATCH v3 12/13] powerpc/ptrace: create ppc_gethwdinfo()

2020-02-26 Thread Christophe Leroy
Create ippc_gethwdinfo() to handle PPC_PTRACE_GETHWDBGINFO and reduce ifdef mess Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/ptrace-adv.c | 15 +++ arch/powerpc/kernel/ptrace/ptrace-decl.h | 1 + arch/powerpc/kernel/ptrace/ptrace-noadv.c | 20 ++ arch/p

[PATCH v3 10/13] powerpc/ptrace: split out ADV_DEBUG_REGS related functions.

2020-02-26 Thread Christophe Leroy
Move ADV_DEBUG_REGS functions out of ptrace.c, into ptrace-adv.c and ptrace-noadv.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/Makefile | 4 + arch/powerpc/kernel/ptrace/ptrace-adv.c | 468 arch/powerpc/kernel/ptrace/ptrace-decl.h | 5 + arch/pow

[PATCH v3 09/13] powerpc/ptrace: move register viewing functions out of ptrace.c

2020-02-26 Thread Christophe Leroy
Create a dedicated ptrace-view.c file. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/Makefile | 4 +- arch/powerpc/kernel/ptrace/ptrace-decl.h | 43 + arch/powerpc/kernel/ptrace/ptrace-view.c | 904 + arch/powerpc/kernel/ptrace/ptrace.c | 966 ---

[PATCH v3 13/13] powerpc/ptrace: move ptrace_triggered() into hw_breakpoint.c

2020-02-26 Thread Christophe Leroy
ptrace_triggered() is declared in asm/hw_breakpoint.h and only needed when CONFIG_HW_BREAKPOINT is set, so move it into hw_breakpoint.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/hw_breakpoint.c | 16 arch/powerpc/kernel/ptrace/ptrace.c | 18 -- 2 fi

[Bug 206669] Little-endian kernel crashing on POWER8 on heavy big-endian PowerKVM load

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206669 --- Comment #6 from John Paul Adrian Glaubitz (glaub...@physik.fu-berlin.de) --- (In reply to npiggin from comment #5) > I thought it might only be going down that path if you have already done > some tracing. Perhaps ensure /sys/kernel/debug/trac

Re: [RFC PATCH v2 00/12] Reduce ifdef mess in ptrace

2020-02-26 Thread Christophe Leroy
Le 24/02/2020 à 11:54, Michael Ellerman a écrit : Christophe Leroy writes: Le 24/02/2020 à 03:15, Michael Neuling a écrit : Christophe, Le 28/06/2019 à 17:47, Christophe Leroy a écrit : The purpose of this series is to reduce the amount of #ifdefs in ptrace.c Any feedback on this series

Re: [RFC PATCH v2 04/12] powerpc/ptrace: split out VSX related functions.

2020-02-26 Thread Christophe Leroy
Le 24/02/2020 à 11:51, Michael Ellerman a écrit : Christophe Leroy writes: diff --git a/arch/powerpc/kernel/ptrace/ptrace-novsx.c b/arch/powerpc/kernel/ptrace/ptrace-novsx.c new file mode 100644 index ..55fbbb4aa9d7 --- /dev/null +++ b/arch/powerpc/kernel/ptrace/ptrace-novsx.c @

Re: [RFC PATCH v2 02/12] powerpc/ptrace: drop unnecessary #ifdefs CONFIG_PPC64

2020-02-26 Thread Christophe Leroy
Le 24/02/2020 à 11:48, Michael Ellerman a écrit : Christophe Leroy writes: Drop a bunch of #ifdefs CONFIG_PPC64 that are not vital. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ptrace.h | 9 - arch/powerpc/include/uapi/asm/ptrace.h | 12 arch/

Re: [PATCH v2 2/3] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-02-26 Thread Shengjiu Wang
Hi On Thu, Feb 20, 2020 at 4:38 AM Rob Herring wrote: > > On Tue, Feb 18, 2020 at 02:39:36PM +0800, Shengjiu Wang wrote: > > EASRC (Enhanced Asynchronous Sample Rate Converter) is a new > > IP module found on i.MX8MN. > > > > Signed-off-by: Shengjiu Wang > > --- > > .../devicetree/bindings/soun

Re: [PATCH 2/3] mm/vma: Make vma_is_foreign() available for general use

2020-02-26 Thread Vlastimil Babka
On 2/26/20 5:50 AM, Anshuman Khandual wrote: > Idea of a foreign VMA with respect to the present context is very generic. > But currently there are two identical definitions for this in powerpc and > x86 platforms. Lets consolidate those redundant definitions while making > vma_is_foreign() availab

Re: [PATCH V14] mm/debug: Add tests validating architecture page table helpers

2020-02-26 Thread Qian Cai
R_CPUS=256 DEBUG_PAGEALLOC NUMA PowerNV [   23.263731][T1] Modules linked in: [   23.263752][T1] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 5.6.0-rc3-next- 20200226 #1 [   23.263776][T1] NIP:  c007308c LR: c103dbd8 CTR: 0000 [   23.263810][T1] REGS: c

Re: [PATCH V14] mm/debug: Add tests validating architecture page table helpers

2020-02-26 Thread Qian Cai
lpers [  146.643995][T1] [ cut here ] [  146.649350][T1] virt_to_phys used for non-linear address: (ptrval) (start_kernel+0x0/0x580) [  146.658840][T1] WARNING: CPU: 165 PID: 1 at arch/arm64/mm/physaddr.c:15 __virt_to_phys+0x98/0xe0 [  146.66

Re: [PATCH v3 04/27] ocxl: Remove unnecessary externs

2020-02-26 Thread 'Baoquan He'
On 02/26/20 at 10:01am, Greg Kurz wrote: > On Wed, 26 Feb 2020 19:26:34 +1100 > "Alastair D'Silva" wrote: > > > > -Original Message- > > > From: Baoquan He > > > Sent: Wednesday, 26 February 2020 7:15 PM > > > To: Alastair D'Silva > > > Cc: alast...@d-silva.org; Aneesh Kumar K . V > > >

Re: [PATCH V14] mm/debug: Add tests validating architecture page table helpers

2020-02-26 Thread Christophe Leroy
Le 26/02/2020 à 15:12, Qian Cai a écrit : On Wed, 2020-02-26 at 09:09 -0500, Qian Cai wrote: On Mon, 2020-02-17 at 08:47 +0530, Anshuman Khandual wrote: How useful is this that straightly crash the powerpc? And then generate warnings on arm64, [  146.634626][T1] debug_vm_pgtable: debu

Re: [PATCH V14] mm/debug: Add tests validating architecture page table helpers

2020-02-26 Thread Christophe Leroy
Le 26/02/2020 à 15:09, Qian Cai a écrit : On Mon, 2020-02-17 at 08:47 +0530, Anshuman Khandual wrote: This adds tests which will validate architecture page table helpers and other accessors in their compliance with expected generic MM semantics. This will help various architectures in validat

Re: [PATCH v3 04/27] ocxl: Remove unnecessary externs

2020-02-26 Thread 'Baoquan He'
On 02/26/20 at 03:20pm, Greg Kurz wrote: > On Wed, 26 Feb 2020 22:15:23 +0800 > 'Baoquan He' wrote: > > > On 02/26/20 at 10:01am, Greg Kurz wrote: > > > On Wed, 26 Feb 2020 19:26:34 +1100 > > > "Alastair D'Silva" wrote: > > > > > > > > -Original Message- > > > > > From: Baoquan He > >

[Bug 206527] Kernel 5.6-rc1 w. CONFIG_VMAP_STACK=y + CONFIG_KASAN=y fails to boot on a PowerMac G4 3,6

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206527 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|NEW |RESOLVED Resol

[Bug 206501] Kernel 5.6-rc1 fails to boot on a PowerMac G4 3,6 with CONFIG_VMAP_STACK=y: Oops! Machine check, sig: 7 [#1]

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206501 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|NEW |RESOLVED Resol

Re: [PATCH v6 2/3] arm64: dts: ls1028a: Add PCIe controller DT nodes

2020-02-26 Thread Michael Walle
Am 2020-02-24 10:22, schrieb Z.q. Hou: Hi Michael and Shawn, I'll update the patch with iommu-map property. friendly ping :) -michael Thanks, Zhiqiang -Original Message- From: Michael Walle Sent: 2020年2月24日 16:54 To: Shawn Guo Cc: Xiaowei Bao ; Z.q. Hou ; bhelg...@google.com; d

[Bug 205099] KASAN hit at raid6_pq: BUG: Unable to handle kernel data access at 0x00f0fd0d

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #286251|0 |1 is obsolete|

Re: [PATCH V14] mm/debug: Add tests validating architecture page table helpers

2020-02-26 Thread Qian Cai
On Wed, 2020-02-26 at 15:45 +0100, Christophe Leroy wrote: > > Le 26/02/2020 à 15:09, Qian Cai a écrit : > > On Mon, 2020-02-17 at 08:47 +0530, Anshuman Khandual wrote: > > > This adds tests which will validate architecture page table helpers and > > > other accessors in their compliance with expe

[Bug 205099] KASAN hit at raid6_pq: BUG: Unable to handle kernel data access at 0x00f0fd0d

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #286249|0 |1 is obsolete|

[Bug 205099] KASAN hit at raid6_pq: BUG: Unable to handle kernel data access at 0x00f0fd0d

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #286395|0 |1 is obsolete|

[Bug 205283] BUG: KASAN: global-out-of-bounds in _copy_to_iter+0x3d4/0x5a8

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205283 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|NEW |RESOLVED Resol

Re: [PATCH V2 2/4] mm/vma: Make vma_is_accessible() available for general use

2020-02-26 Thread Vlastimil Babka
On 2/24/20 6:03 AM, Anshuman Khandual wrote: > Lets move vma_is_accessible() helper to include/linux/mm.h which makes it > available for general use. While here, this replaces all remaining open > encodings for VMA access check with vma_is_accessible(). > > Cc: Guo Ren > Cc: Geert Uytterhoeven >

Re: [PATCH V2 3/4] mm/vma: Replace all remaining open encodings with is_vm_hugetlb_page()

2020-02-26 Thread Vlastimil Babka
On 2/24/20 6:03 AM, Anshuman Khandual wrote: > This replaces all remaining open encodings with is_vm_hugetlb_page(). > > Cc: Paul Mackerras > Cc: Benjamin Herrenschmidt > Cc: Michael Ellerman > Cc: Alexander Viro > Cc: Will Deacon > Cc: "Aneesh Kumar K.V" > Cc: Andrew Morton > Cc: Nick Pigg

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-26 Thread Christopher Lameter
On Mon, 24 Feb 2020, Michal Hocko wrote: > Hmm, nasty. Is there any reason why kmalloc_node behaves differently > from the page allocator? The page allocator will do the same thing if you pass GFP_THISNODE and insist on allocating memory from a node that does not exist. > > > A short summary. k

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-26 Thread Michal Hocko
On Wed 26-02-20 18:25:28, Cristopher Lameter wrote: > On Mon, 24 Feb 2020, Michal Hocko wrote: > > > Hmm, nasty. Is there any reason why kmalloc_node behaves differently > > from the page allocator? > > The page allocator will do the same thing if you pass GFP_THISNODE and > insist on allocating

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-26 Thread Christopher Lameter
On Wed, 26 Feb 2020, Michal Hocko wrote: > Besides that kmalloc_node shouldn't really have an implicit GFP_THISNODE > semantic right? At least I do not see anything like that documented > anywhere. Kmalloc_node does not support memory policies etc. Only kmalloc does. kmalloc_node is mostly used b

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-26 Thread Michal Hocko
On Wed 26-02-20 18:44:13, Cristopher Lameter wrote: > On Wed, 26 Feb 2020, Michal Hocko wrote: > > > Besides that kmalloc_node shouldn't really have an implicit GFP_THISNODE > > semantic right? At least I do not see anything like that documented > > anywhere. > > Kmalloc_node does not support mem

Re: [PATCH v3 04/27] ocxl: Remove unnecessary externs

2020-02-26 Thread Greg Kurz
On Wed, 26 Feb 2020 22:15:23 +0800 'Baoquan He' wrote: > On 02/26/20 at 10:01am, Greg Kurz wrote: > > On Wed, 26 Feb 2020 19:26:34 +1100 > > "Alastair D'Silva" wrote: > > > > > > -Original Message- > > > > From: Baoquan He > > > > Sent: Wednesday, 26 February 2020 7:15 PM > > > > To: A

Re: [PATCH v3 10/13] powerpc/ptrace: split out ADV_DEBUG_REGS related functions.

2020-02-26 Thread kbuild test robot
Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.6-rc3 next-20200226] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '-

Re: [PATCH] ima: add a new CONFIG for loading arch-specific policies

2020-02-26 Thread Lakshmi Ramasubramanian
Hi Nayna, + +config IMA_SECURE_AND_OR_TRUSTED_BOOT + bool + depends on IMA + depends on IMA_ARCH_POLICY + default n + help + This option is selected by architectures to enable secure and/or + trusted boot based on IMA runtime policies. Why is th

[PATCH] ima: add a new CONFIG for loading arch-specific policies

2020-02-26 Thread Nayna Jain
Every time a new architecture defines the IMA architecture specific functions - arch_ima_get_secureboot() and arch_ima_get_policy(), the IMA include file needs to be updated. To avoid this "noise", this patch defines a new IMA Kconfig IMA_SECURE_AND_OR_TRUSTED_BOOT option, allowing the different ar

Re: [PATCH] ima: add a new CONFIG for loading arch-specific policies

2020-02-26 Thread Mimi Zohar
On Wed, 2020-02-26 at 11:21 -0800, Lakshmi Ramasubramanian wrote: > Hi Nayna, > > > + > > +config IMA_SECURE_AND_OR_TRUSTED_BOOT > > + bool > > + depends on IMA > > + depends on IMA_ARCH_POLICY > > + default n > > + help > > + This option is selected by architectures to enable secur

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-26 Thread Michal Hocko
On Wed 26-02-20 12:31:56, David Rientjes wrote: > On Wed, 26 Feb 2020, Michal Hocko wrote: > > > On Wed 26-02-20 18:44:13, Cristopher Lameter wrote: > > > On Wed, 26 Feb 2020, Michal Hocko wrote: > > > > > > > Besides that kmalloc_node shouldn't really have an implicit GFP_THISNODE > > > > semant

[Bug 206525] BUG: KASAN: stack-out-of-bounds in test_bit+0x30/0x44 (kernel 5.6-rc1)

2020-02-26 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206525 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|NEW |RESOLVED Resol

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-26 Thread Vlastimil Babka
On 2/26/20 7:41 PM, Michal Hocko wrote: > On Wed 26-02-20 18:25:28, Cristopher Lameter wrote: >> On Mon, 24 Feb 2020, Michal Hocko wrote: >> >>> Hmm, nasty. Is there any reason why kmalloc_node behaves differently >>> from the page allocator? >> >> The page allocator will do the same thing if you p

Re: [PATCH v5 3/8] powerpc/mm/ptdump: debugfs handler for W+X checks at runtime

2020-02-26 Thread Kees Cook
On Wed, Feb 26, 2020 at 05:35:46PM +1100, Russell Currey wrote: > Very rudimentary, just > > echo 1 > [debugfs]/check_wx_pages > > and check the kernel log. Useful for testing strict module RWX. > > Updated the Kconfig entry to reflect this. Oh, I like this! This would be handy to have o

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-26 Thread Vlastimil Babka
On 2/26/20 10:45 PM, Vlastimil Babka wrote: > > > if (node == NUMA_NO_NODE) > page = alloc_pages(flags, order); > else > page = __alloc_pages_node(node, flags, order); > > So yeah looks like SLUB's kmalloc_node() is supposed to behave like the > page allocator's __alloc_pages_node() and

Re: [PATCH v2 0/3] Fix some incompatibilites between KASAN and FORTIFY_SOURCE

2020-02-26 Thread Daniel Axtens
Daniel Axtens writes: > 3 KASAN self-tests fail on a kernel with both KASAN and FORTIFY_SOURCE: > memchr, memcmp and strlen. I have observed this on x86 and powerpc. > > When FORTIFY_SOURCE is on, a number of functions are replaced with > fortified versions, which attempt to check the sizes of th

Re: [PATCH v3 07/14] powerpc/traps: Check for prefixed instructions in facility_unavailable_exception()

2020-02-26 Thread Jordan Niethe
On Wed, Feb 26, 2020 at 5:53 PM Nicholas Piggin wrote: > > Jordan Niethe's on February 26, 2020 2:07 pm: > > If prefixed instructions are made unavailable by the [H]FSCR, attempting > > to use them will cause a facility unavailable exception. Add "PREFIX" to > > the facility_strings[]. > > > > Cur

Re: [PATCH v3 08/14] powerpc/xmon: Remove store_inst() for patch_instruction()

2020-02-26 Thread Jordan Niethe
On Wed, Feb 26, 2020 at 6:04 PM Nicholas Piggin wrote: > > Jordan Niethe's on February 26, 2020 2:07 pm: > > For modifying instructions in xmon, patch_instruction() can serve the > > same role that store_inst() is performing with the advantage of not > > being specific to xmon. In some places patc

Re: [PATCH v3 09/14] powerpc/xmon: Add initial support for prefixed instructions

2020-02-26 Thread Jordan Niethe
On Wed, Feb 26, 2020 at 6:10 PM Nicholas Piggin wrote: > > Jordan Niethe's on February 26, 2020 2:07 pm: > > A prefixed instruction is composed of a word prefix and a word suffix. > > It does not make sense to be able to have a breakpoint on the suffix of > > a prefixed instruction, so make this i

Re: [PATCH v3 11/14] powerpc/kprobes: Support kprobes on prefixed instructions

2020-02-26 Thread Jordan Niethe
On Wed, Feb 26, 2020 at 6:18 PM Nicholas Piggin wrote: > > Jordan Niethe's on February 26, 2020 2:07 pm: > > @@ -136,11 +148,14 @@ int arch_prepare_kprobe(struct kprobe *p) > > } > > > > if (!ret) { > > - patch_instruction(p->ainsn.insn, *p->addr); > > + patch_i

Re: [PATCH] macintosh: therm_windtunnel: fix regression when instantiating devices

2020-02-26 Thread Michael Ellerman
Wolfram Sang writes: > Removing attach_adapter from this driver caused a regression for at > least some machines. Those machines had the sensors described in their > DT, too, so they didn't need manual creation of the sensor devices. The > old code worked, though, because manual creation came firs

Re: [PATCH 1/2] cpufreq/powernv: Fix use-after-free

2020-02-26 Thread Michael Ellerman
Andrew Donnellan writes: > On 6/2/20 5:26 pm, Oliver O'Halloran wrote: >> The cpufreq driver has a use-after-free that we can hit if: >> >> a) There's an OCC message pending when the notifier is registered, and >> b) The cpufreq driver fails to register with the core. >> >> When a) occurs the no

Re: [PATCH v3 0/6] implement KASLR for powerpc/fsl_booke/64

2020-02-26 Thread Jason Yan
在 2020/2/26 19:41, Daniel Axtens 写道: I suspect that you will find it easier to convince people to accept a change to %pK than removal:) BTW, I have a T4240RDB so I might be able to test this series at some point - do I need an updated bootloader to pass in a random seed, or is the kernel able

Re: [PATCH V14] mm/debug: Add tests validating architecture page table helpers

2020-02-26 Thread Anshuman Khandual
Rather than respining the patch once more, will just send a fix replacing this helper __pa() with __pa_symbol() for Andrew to pick up as this patch is already part of linux-next (next-20200226). But can definitely respin if that will be preferred. Thanks Qian for catching this. > > Christophe >

[PATCH v3 0/4] ASoC: Add new module driver for new ASRC

2020-02-26 Thread Shengjiu Wang
Add new module driver for new ASRC in i.MX8MN Shengjiu Wang (4): ASoC: fsl_asrc: Change asrc_width to asrc_format ASoC: fsl_asrc: Move common definition to fsl_asrc_common ASoC: dt-bindings: fsl_easrc: Add document for EASRC ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers cha

[PATCH v3 3/4] ASoC: dt-bindings: fsl_easrc: Add document for EASRC

2020-02-26 Thread Shengjiu Wang
EASRC (Enhanced Asynchronous Sample Rate Converter) is a new IP module found on i.MX8MN. Signed-off-by: Shengjiu Wang --- .../devicetree/bindings/sound/fsl,easrc.yaml | 96 +++ 1 file changed, 96 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,easrc

[PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format

2020-02-26 Thread Shengjiu Wang
asrc_format is more inteligent variable, which is align with the alsa definition snd_pcm_format_t. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_asrc.c | 23 +++ sound/soc/fsl/fsl_asrc.h | 4 ++-- sound/soc/fsl/fsl_asrc_dma.c | 2 +- 3 files changed, 14 inserti

[PATCH v3 2/4] ASoC: fsl_asrc: Move common definition to fsl_asrc_common

2020-02-26 Thread Shengjiu Wang
There is a new ASRC included in i.MX serial platform, there are some common definition can be shared with each other. So move the common definition to a separate header file. And add fsl_asrc_pair_internal and fsl_asrc_internal for the variable specific for the module, which can be used internally

[PATCH v3 4/4] ASoC: fsl_easrc: Add EASRC ASoC CPU DAI and platform drivers

2020-02-26 Thread Shengjiu Wang
EASRC (Enhanced Asynchronous Sample Rate Converter) is a new IP module found on i.MX8MN. It is different with old ASRC module. The primary features for the EASRC are as follows: - 4 Contexts - groups of channels with an independent time base - Fully independent and concurrent context control - Sim

Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format

2020-02-26 Thread Nicolin Chen
On Thu, Feb 27, 2020 at 10:41:55AM +0800, Shengjiu Wang wrote: > asrc_format is more inteligent variable, which is align > with the alsa definition snd_pcm_format_t. > > Signed-off-by: Shengjiu Wang > --- > sound/soc/fsl/fsl_asrc.c | 23 +++ > sound/soc/fsl/fsl_asrc.h

Re: [PATCH v3 13/27] powerpc/powernv/pmem: Read the capability registers & wait for device ready

2020-02-26 Thread Andrew Donnellan
On 21/2/20 2:27 pm, Alastair D'Silva wrote: +/** + * read_device_metadata() - Retrieve config information from the AFU and save it for future use + * @ocxlpmem: the device metadata + * Return: 0 on success, negative on failure + */ +static int read_device_metadata(struct ocxlpmem *ocxlpmem) +{ +

Re: [PATCH v3 13/27] powerpc/powernv/pmem: Read the capability registers & wait for device ready

2020-02-26 Thread Alastair D'Silva
On Thu, 2020-02-27 at 14:54 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > +/** > > + * read_device_metadata() - Retrieve config information from the > > AFU and save it for future use > > + * @ocxlpmem: the device metadata > > + * Return: 0 on success, negative on

Re: [PATCH V14] mm/debug: Add tests validating architecture page table helpers

2020-02-26 Thread Andrew Morton
> better > to use __pa_symbol() here rather than __pa(). > > Rather than respining the patch once more, will just send a fix replacing this > helper __pa() with __pa_symbol() for Andrew to pick up as this patch is > already > part of linux-next (next-20200226). But can defini

Re: [PATCH V14] mm/debug: Add tests validating architecture page table helpers

2020-02-26 Thread Anshuman Khandual
es check for linear address with __is_lm_address() >> and >> switch accordingly if it is a kernel text symbol. Nevertheless, its much >> better >> to use __pa_symbol() here rather than __pa(). >> >> Rather than respining the patch once more, will just send a

[PATCH 1/2] powerpc/vmlinux.lds: Explicitly retain .gnu.hash

2020-02-26 Thread Michael Ellerman
Relocatable kernel builds produce a warning about .gnu.hash being an orphan section: ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in section `.gnu.hash' If we try to discard it the build fails: ld -EL -m elf64lppc -pie --orphan-handling=warn --build-id -o .tm

[PATCH 2/2] powerpc/vmlinux.lds: Discard .interp section

2020-02-26 Thread Michael Ellerman
The .interp section specifies which "interpreter", ie. dynamic loader, the kernel requests. But that doesn't make any sense, the kernel is not a regular binary that is run with an interpreter. The content seems to be some default value, this file doesn't even exist on my system: 2f 75

Re: [PATCH v3 12/27] powerpc/powernv/pmem: Add register addresses & status values to the header

2020-02-26 Thread Andrew Donnellan
On 21/2/20 2:27 pm, Alastair D'Silva wrote: From: Alastair D'Silva These values have been taken from the device specifications. Signed-off-by: Alastair D'Silva I've compared these values against the internal version of the device specifications that I have access to, and they appear to mat

Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format

2020-02-26 Thread Shengjiu Wang
On Thu, Feb 27, 2020 at 11:43 AM Nicolin Chen wrote: > > On Thu, Feb 27, 2020 at 10:41:55AM +0800, Shengjiu Wang wrote: > > asrc_format is more inteligent variable, which is align > > with the alsa definition snd_pcm_format_t. > > > > Signed-off-by: Shengjiu Wang > > --- > > sound/soc/fsl/fsl_as

Re: [PATCH v3 12/27] powerpc/powernv/pmem: Add register addresses & status values to the header

2020-02-26 Thread Alastair D'Silva
On Thu, 2020-02-27 at 16:08 +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > From: Alastair D'Silva > > > > These values have been taken from the device specifications. > > > > Signed-off-by: Alastair D'Silva > > I've compared these values against the internal v

[PATCH V2 0/3] mm/vma: some more minor changes

2020-02-26 Thread Anshuman Khandual
The motivation here is to consolidate VMA flags and helpers in generic memory header and reduce code duplication when ever applicable. If there are other possible similar instances which might be missing here, please do let me me know. I will be happy to incorporate them. This series is based on v

[PATCH V2 2/3] mm/vma: Make vma_is_foreign() available for general use

2020-02-26 Thread Anshuman Khandual
Idea of a foreign VMA with respect to the present context is very generic. But currently there are two identical definitions for this in powerpc and x86 platforms. Lets consolidate those redundant definitions while making vma_is_foreign() available for general use later. This should not cause any f

Re: [PATCH 1/2] powerpc/vmlinux.lds: Explicitly retain .gnu.hash

2020-02-26 Thread Alan Modra
On Thu, Feb 27, 2020 at 03:59:32PM +1100, Michael Ellerman wrote: > Relocatable kernel builds produce a warning about .gnu.hash being an > orphan section: > > ld: warning: orphan section `.gnu.hash' from `linker stubs' being placed in > section `.gnu.hash' > > If we try to discard it the build

Re: [PATCH 2/2] powerpc/vmlinux.lds: Discard .interp section

2020-02-26 Thread Alan Modra
On Thu, Feb 27, 2020 at 03:59:33PM +1100, Michael Ellerman wrote: > The .interp section specifies which "interpreter", ie. dynamic loader, > the kernel requests. But that doesn't make any sense, the kernel is > not a regular binary that is run with an interpreter. > > The content seems to be some

[RFC PATCH 00/21] Avoid IPI while updating page table entries.

2020-02-26 Thread Aneesh Kumar K.V
Problem Summary: Slow termination of KVM guest with large guest RAM config due to a large number of IPIs that were caused by clearing level 1 PTE entries (THP) entries. This is shown in the stack trace below. - qemu-system-ppc [kernel.vmlinux][k] smp_call_function_many - smp_call_

[RFC PATCH 01/21] powerpc/pkeys: Avoid using lockless page table walk

2020-02-26 Thread Aneesh Kumar K.V
Fetch pkey from vma instead of linux page table. Also document the fact that in some cases the pkey returned in siginfo won't be the same as the one we took keyfault on. Even with linux page table walk, we can end up in a similar scenario. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/includ

[RFC PATCH 02/21] powerpc/pkeys: Check vma before returning key fault error to the user

2020-02-26 Thread Aneesh Kumar K.V
If multiple threads in userspace keep changing the protection keys mapping a range, there can be a scenario where kernel takes a key fault but the pkey value found in the siginfo struct is a permissive one. This can confuse the userspace as shown in the below test case. /* use this to control the

[RFC PATCH 03/21] powerpc/mm/hash64: use _PAGE_PTE when checking for pte_present

2020-02-26 Thread Aneesh Kumar K.V
This makes the pte_present check stricter by checking for additional _PAGE_PTE bit. A level 1 pte pointer (THP pte) can be switched to a pointer to level 0 pte page table page by following two operations. 1) THP split. 2) madvise(MADV_DONTNEED) in parallel to page fault. A lockless page table wal

[RFC PATCH 04/21] powerpc/hash64: Restrict page table lookup using init_mm with __flush_hash_table_range

2020-02-26 Thread Aneesh Kumar K.V
This is only used with init_mm currently. Walking init_mm is much simpler because we don't need to handle concurrent page table like other mm_context Signed-off-by: Aneesh Kumar K.V --- .../include/asm/book3s/64/tlbflush-hash.h| 3 +-- arch/powerpc/kernel/pci_64.c |

[RFC PATCH 05/21] powerpc/book3s64/hash: Use the pte_t address from the caller

2020-02-26 Thread Aneesh Kumar K.V
Don't fetch the pte value using lockless page table walk. Instead use the value from the caller. hash_preload is called with ptl lock held. So it is safe to use the pte_t address directly. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/hash_utils.c | 27 +--

[RFC PATCH 06/21] powerpc/book3s/hash64/devmap: Use H_PAGE_THP_HUGE when setting up level huge devmap pte entries

2020-02-26 Thread Aneesh Kumar K.V
H_PAGE_THP_HUGE is used to differentiate between a THP hugepage and hugetlb hugepage entries. The difference is w.r.t how we handle hash fault on these address. THP address enables MPSS in segments. We want to manage devmap hugepage entries similar to THP pt entries. Hence use H_PAGE_THP_HUGE for d

  1   2   >