Re: [PATCH] powerpc: Avoid clang warnings around setjmp and longjmp

2019-09-02 Thread Nathan Chancellor
On Thu, Aug 29, 2019 at 09:59:48AM +, David Laight wrote: > From: Nathan Chancellor > > Sent: 28 August 2019 19:45 > ... > > However, I think that -fno-builtin-* would be appropriate here because > > we are providing our own setjmp implementation, meaning clang should not > > be trying to do

[PATCH v2 6/6] powerpc: Don't flush caches when adding memory

2019-09-02 Thread Alastair D'Silva
From: Alastair D'Silva This operation takes a significant amount of time when hotplugging large amounts of memory (~50 seconds with 890GB of persistent memory). This was orignally in commit fb5924fddf9e ("powerpc/mm: Flush cache on memory hot(un)plug") to support memtrace, but the flush on add

[PATCH v2 5/6] powerpc: Remove 'extern' from func prototypes in cache headers

2019-09-02 Thread Alastair D'Silva
From: Alastair D'Silva The 'extern' keyword does not value-add for function prototypes. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/cache.h | 8 arch/powerpc/include/asm/cacheflush.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH v2 4/6] powerpc: Chunk calls to flush_dcache_range in arch_*_memory

2019-09-02 Thread Alastair D'Silva
From: Alastair D'Silva When presented with large amounts of memory being hotplugged (in my test case, ~890GB), the call to flush_dcache_range takes a while (~50 seconds), triggering RCU stalls. This patch breaks up the call into 1GB chunks, calling cond_resched() inbetween to allow the

[PATCH v2 3/6] powerpc: Convert flush_icache_range & friends to C

2019-09-02 Thread Alastair D'Silva
From: Alastair D'Silva Similar to commit 22e9c88d486a ("powerpc/64: reuse PPC32 static inline flush_dcache_range()") this patch converts the following ASM symbols to C: flush_icache_range() __flush_dcache_icache() __flush_dcache_icache_phys() This was done as we discovered a

[PATCH v2 2/6] powerpc: define helpers to get L1 icache sizes

2019-09-02 Thread Alastair D'Silva
From: Alastair D'Silva This patch adds helpers to retrieve icache sizes, and renames the existing helpers to make it clear that they are for dcache. Signed-off-by: Alastair D'Silva --- arch/powerpc/include/asm/cache.h | 29 +++

[PATCH v2 1/6] powerpc: Allow flush_icache_range to work across ranges >4GB

2019-09-02 Thread Alastair D'Silva
From: Alastair D'Silva When calling flush_icache_range with a size >4GB, we were masking off the upper 32 bits, so we would incorrectly flush a range smaller than intended. This patch replaces the 32 bit shifts with 64 bit ones, so that the full size is accounted for. Signed-off-by: Alastair

[PATCH v2 0/6] powerpc: convert cache asm to C

2019-09-02 Thread Alastair D'Silva
From: Alastair D'Silva This series addresses a few issues discovered in how we flush caches: 1. Flushes were truncated at 4GB, so larger flushes were incorrect. 2. Flushing the dcache in arch_add_memory was unnecessary This series also converts much of the cache assembler to C, with the aim of

Re: [PATCH v7 5/6] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

2019-09-02 Thread Christophe Leroy
On 09/02/2019 11:53 PM, Michael Ellerman wrote: Segher Boessenkool writes: On Mon, Sep 02, 2019 at 12:03:12PM +1000, Michael Ellerman wrote: Michal Suchanek writes: On bigendian ppc64 it is common to have 32bit legacy binaries but much less so on littleendian. I think the toolchain

[PATCH 2/3] powerpc/tm: Fix restoring FP/VMX facility incorrectly on interrupts

2019-09-02 Thread Michael Neuling
From: Gustavo Romero When in userspace and MSR FP=0 the hardware FP state is unrelated to the current process. This is extended for transactions where if tbegin is run with FP=0, the hardware checkpoint FP state will also be unrelated to the current process. Due to this, we need to ensure this

[PATCH 1/3] powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction

2019-09-02 Thread Michael Neuling
From: Gustavo Romero When we take an FP unavailable exception in a transaction we have to account for the hardware FP TM checkpointed registers being incorrect. In this case for this process we know the current and checkpointed FP registers must be the same (since FP wasn't used inside the

[PATCH 3/3] powerpc/tm: Add tm-poison test

2019-09-02 Thread Michael Neuling
From: Gustavo Romero Add TM selftest to check if FP or VEC register values from one process can leak into another process when both run on the same CPU. This tests for CVE-2019-15030 and CVE-2019-15031. Signed-off-by: Gustavo Romero Signed-off-by: Michael Neuling ---

RE: [PATCH v3 01/11] PCI: designware-ep: Add multiple PFs support for DWC

2019-09-02 Thread Xiaowei Bao
> -Original Message- > From: Andrew Murray > Sent: 2019年9月3日 0:26 > To: Xiaowei Bao > Cc: robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo > Li ; kis...@ti.com; lorenzo.pieral...@arm.com; M.h. > Lian ; Mingkai Hu ; Roy > Zang ; jingooh...@gmail.com; >

Re: [PATCH] sysfs: add BIN_ATTR_WO() macro

2019-09-02 Thread Michael Ellerman
Greg Kroah-Hartman writes: > This variant was missing from sysfs.h, I guess no one noticed it before. > > Turns out the powerpc secure variable code can use it, so add it to the > tree for it, and potentially others to take advantage of, instead of > open-coding it. > > Reported-by: Nayna Jain >

Re: [PATCH 6/6] powerpc/64s/radix: introduce options to disable use of the tlbie instruction

2019-09-02 Thread Nicholas Piggin
Alistair Popple's on September 3, 2019 10:32 am: > Nick, > > On Tuesday, 3 September 2019 1:29:31 AM AEST Nicholas Piggin wrote: >> Introduce two options to control the use of the tlbie instruction. A >> boot time option which completely disables the kernel using the >> instruction, this is

RE: [PATCH v3 04/11] PCI: designware-ep: Modify MSI and MSIX CAP way of finding

2019-09-02 Thread Xiaowei Bao
> -Original Message- > From: Andrew Murray > Sent: 2019年9月2日 23:07 > To: Xiaowei Bao > Cc: robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo > Li ; kis...@ti.com; lorenzo.pieral...@arm.com; M.h. > Lian ; Mingkai Hu ; Roy > Zang ; jingooh...@gmail.com; >

RE: [PATCH v3 07/11] PCI: layerscape: Modify the way of getting capability with different PEX

2019-09-02 Thread Xiaowei Bao
> -Original Message- > From: Andrew Murray > Sent: 2019年9月2日 21:38 > To: Xiaowei Bao > Cc: robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo > Li ; kis...@ti.com; lorenzo.pieral...@arm.com; M.h. > Lian ; Mingkai Hu ; Roy > Zang ; jingooh...@gmail.com; >

RE: [PATCH v2 06/10] PCI: layerscape: Modify the way of getting capability with different PEX

2019-09-02 Thread Xiaowei Bao
> -Original Message- > From: Andrew Murray > Sent: 2019年9月2日 21:37 > To: Xiaowei Bao > Cc: Kishon Vijay Abraham I ; bhelg...@google.com; > robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo Li > ; lorenzo.pieral...@arm.co > ; a...@arndb.de; gre...@linuxfoundation.org; >

RE: [PATCH v3 10/11] arm64: dts: layerscape: Add PCIe EP node for ls1088a

2019-09-02 Thread Xiaowei Bao
> -Original Message- > From: Andrew Murray > Sent: 2019年9月2日 21:06 > To: Xiaowei Bao > Cc: robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo > Li ; kis...@ti.com; lorenzo.pieral...@arm.com; M.h. > Lian ; Mingkai Hu ; Roy > Zang ; jingooh...@gmail.com; >

RE: [PATCH v3 11/11] misc: pci_endpoint_test: Add LS1088a in pci_device_id table

2019-09-02 Thread Xiaowei Bao
> -Original Message- > From: Andrew Murray > Sent: 2019年9月2日 20:55 > To: Xiaowei Bao > Cc: robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo > Li ; kis...@ti.com; lorenzo.pieral...@arm.com; M.h. > Lian ; Mingkai Hu ; Roy > Zang ; jingooh...@gmail.com; >

RE: [PATCH v3 09/11] PCI: layerscape: Add EP mode support for ls1088a and ls2088a

2019-09-02 Thread Xiaowei Bao
> -Original Message- > From: Andrew Murray > Sent: 2019年9月2日 20:46 > To: Xiaowei Bao > Cc: robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo > Li ; kis...@ti.com; lorenzo.pieral...@arm.com; M.h. > Lian ; Mingkai Hu ; Roy > Zang ; jingooh...@gmail.com; >

RE: [PATCH v3 05/11] dt-bindings: pci: layerscape-pci: add compatible strings for ls1088a and ls2088a

2019-09-02 Thread Xiaowei Bao
> -Original Message- > From: Andrew Murray > Sent: 2019年9月2日 20:32 > To: Xiaowei Bao > Cc: robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo > Li ; kis...@ti.com; lorenzo.pieral...@arm.com; M.h. > Lian ; Mingkai Hu ; Roy > Zang ; jingooh...@gmail.com; >

Re: [PATCH 6/6] powerpc/64s/radix: introduce options to disable use of the tlbie instruction

2019-09-02 Thread Alistair Popple
Nick, On Tuesday, 3 September 2019 1:29:31 AM AEST Nicholas Piggin wrote: > Introduce two options to control the use of the tlbie instruction. A > boot time option which completely disables the kernel using the > instruction, this is currently incompatible with HASH MMU, KVM, and > coherent

Re: [PATCH v7 5/6] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

2019-09-02 Thread Michael Ellerman
Michal Suchánek writes: > On Mon, 02 Sep 2019 12:03:12 +1000 > Michael Ellerman wrote: > >> Michal Suchanek writes: >> > On bigendian ppc64 it is common to have 32bit legacy binaries but much >> > less so on littleendian. >> >> I think the toolchain people will tell you that there is no

Re: [PATCH v7 5/6] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

2019-09-02 Thread Michael Ellerman
Segher Boessenkool writes: > On Mon, Sep 02, 2019 at 12:03:12PM +1000, Michael Ellerman wrote: >> Michal Suchanek writes: >> > On bigendian ppc64 it is common to have 32bit legacy binaries but much >> > less so on littleendian. >> >> I think the toolchain people will tell you that there is no

Re: [PATCH v7 3/6] powerpc/perf: consolidate read_user_stack_32

2019-09-02 Thread Michael Ellerman
Michal Suchánek writes: > On Mon, 02 Sep 2019 14:01:17 +1000 > Michael Ellerman wrote: >> Michael Ellerman writes: >> > Michal Suchanek writes: >> ... >> >> @@ -295,6 +279,12 @@ static inline int current_is_64bit(void) >> >> } >> >> >> >> #else /* CONFIG_PPC64 */ >> >> +static int

[PATCH v2] powerpc/64: system call implement the bulk of the logic in C

2019-09-02 Thread Nicholas Piggin
System call entry and particularly exit code is beyond the limit of what is reasonable to implement in asm. This conversion moves all conditional branches out of the asm code, except for the case that all GPRs should be restored at exit. Null syscall test is about 5% faster after this patch,

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

2019-09-02 Thread Peter Zijlstra
On Mon, Sep 02, 2019 at 08:22:52PM +0200, Ingo Molnar wrote: > > * Peter Zijlstra wrote: > > diff --git a/drivers/base/core.c b/drivers/base/core.c > > index f0dd8e38fee3..2caf204966a0 100644 > > --- a/drivers/base/core.c > > +++ b/drivers/base/core.c > > @@ -2120,8 +2120,16 @@ int

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

2019-09-02 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Mon, Sep 02, 2019 at 08:25:24PM +0800, Yunsheng Lin wrote: > > On 2019/9/2 15:25, Peter Zijlstra wrote: > > > On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote: > > >> On 2019/9/1 0:12, Peter Zijlstra wrote: > > > > > >>> 1) because even it is not set,

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

2019-09-02 Thread Ingo Molnar
* Peter Zijlstra wrote: > Also note that the CONFIG_DEBUG_PER_CPU_MAPS version of > cpumask_of_node() already does this (although it wants the below fix). > > --- > diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c > index e6dad600614c..5f49c10201c7 100644 > --- a/arch/x86/mm/numa.c > +++

Re: [PATCH v3 01/11] PCI: designware-ep: Add multiple PFs support for DWC

2019-09-02 Thread Andrew Murray
On Mon, Sep 02, 2019 at 11:17:06AM +0800, Xiaowei Bao wrote: > Add multiple PFs support for DWC, different PF have different config space > we use pf-offset property which get from the DTS to access the different pF This needs to be updated as this no longer comes from the DT. > config space. >

[PATCH 6/6] powerpc/64s/radix: introduce options to disable use of the tlbie instruction

2019-09-02 Thread Nicholas Piggin
Introduce two options to control the use of the tlbie instruction. A boot time option which completely disables the kernel using the instruction, this is currently incompatible with HASH MMU, KVM, and coherent accelerators. And a debugfs option can be switched at runtime and avoids using tlbie

[PATCH 0/6] Making tlbie optional for radix

2019-09-02 Thread Nicholas Piggin
This is a rebase of the series against the the powerpc next branch with ultravisor changes. Main improvements are implementing and splitting out the precursor patches better. KVM still requires tlbie to run radix guests. A naive implementation of tlbiel + IPI for LPID flushes was crashing so

[PATCH 5/6] powerpc/64s: remove unnecessary translation cache flushes at boot

2019-09-02 Thread Nicholas Piggin
The various translation structure invalidations performed in early boot when the MMU is off are not required, because everything is invalidated immediately before a CPU first enables its MMU (see early_init_mmu and early_init_mmu_secondary). Signed-off-by: Nicholas Piggin ---

[PATCH 4/6] powerpc/64s/pseries: radix flush translations before MMU is enabled at boot

2019-09-02 Thread Nicholas Piggin
Radix guests are responsible for managing their own translation caches, so make them match bare metal radix and hash, and make each CPU flush all its translations right before enabling its MMU. Radix guests may not flush partition scope translations, so in tlbiel_all, make these flushes

[PATCH 3/6] powerpc/64s: make mmu_partition_table_set_entry TLB flush optional

2019-09-02 Thread Nicholas Piggin
No functional change. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/mmu.h | 2 +- arch/powerpc/kvm/book3s_hv_nested.c | 2 +- arch/powerpc/mm/book3s64/hash_utils.c| 2 +- arch/powerpc/mm/book3s64/pgtable.c | 4 ++-- arch/powerpc/mm/book3s64/radix_pgtable.c

[PATCH 1/6] powerpc/64s: remove register_process_table callback

2019-09-02 Thread Nicholas Piggin
This callback is only required because the partition table init comes before process table allocation on powernv (aka bare metal aka native). Change the order to allocate the process table first, and remove the callback. Signed-off-by: Nicholas Piggin ---

[PATCH 2/6] powerpc/64s/radix: tidy up TLB flushing code

2019-09-02 Thread Nicholas Piggin
There should be no functional changes. - Use calls to existing radix_tlb.c functions in flush_partition. - Rename radix__flush_tlb_lpid to radix__flush_all_lpid and similar, because they flush everything, matching flush_all_mm rather than flush_tlb_mm for the lpid. - Remove some unused

Re: microblaze HAVE_MEMBLOCK_NODE_MAP dependency (was Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA)

2019-09-02 Thread Mike Rapoport
On Mon, Sep 02, 2019 at 03:51:25PM +0200, Michal Simek wrote: > On 31. 07. 19 19:15, Mike Rapoport wrote: > > On Wed, Jul 31, 2019 at 04:41:14PM +0200, Michal Hocko wrote: > >> On Wed 31-07-19 17:21:29, Mike Rapoport wrote: > >>> On Wed, Jul 31, 2019 at 03:00:37PM +0200, Michal Hocko wrote: >

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

2019-09-02 Thread David Miller
From: Yunsheng Lin Date: Mon, 2 Sep 2019 14:08:31 +0800 > The NUMA node id in sparc64 system is defined by DT semantics? Sometimes, and in other cases other methods are used to determine the NUMA node id.

Re: [PATCH v3 04/11] PCI: designware-ep: Modify MSI and MSIX CAP way of finding

2019-09-02 Thread Andrew Murray
On Mon, Sep 02, 2019 at 11:17:09AM +0800, Xiaowei Bao wrote: > Each PF of EP device should have it's own MSI or MSIX capabitily > struct, so create a dw_pcie_ep_func struct and remover the msi_cap remover? > and msix_cap to this struce, and manage the PFs with a list. struce? > >

Re: [PATCH v6 1/5] kasan: support backing vmalloc space with real shadow memory

2019-09-02 Thread Mark Rutland
On Tue, Sep 03, 2019 at 12:32:49AM +1000, Daniel Axtens wrote: > Hi Mark, > > >> +static int kasan_depopulate_vmalloc_pte(pte_t *ptep, unsigned long addr, > >> + void *unused) > >> +{ > >> + unsigned long page; > >> + > >> + page = (unsigned

Re: [PATCH v6 1/5] kasan: support backing vmalloc space with real shadow memory

2019-09-02 Thread Daniel Axtens
Hi Mark, >> +static int kasan_depopulate_vmalloc_pte(pte_t *ptep, unsigned long addr, >> +void *unused) >> +{ >> +unsigned long page; >> + >> +page = (unsigned long)__va(pte_pfn(*ptep) << PAGE_SHIFT); >> + >> +spin_lock(_mm.page_table_lock); >> + >>

Re: microblaze HAVE_MEMBLOCK_NODE_MAP dependency (was Re: [PATCH v2 0/5] mm: Enable CONFIG_NODES_SPAN_OTHER_NODES by default for NUMA)

2019-09-02 Thread Michal Simek
On 31. 07. 19 19:15, Mike Rapoport wrote: > On Wed, Jul 31, 2019 at 04:41:14PM +0200, Michal Hocko wrote: >> On Wed 31-07-19 17:21:29, Mike Rapoport wrote: >>> On Wed, Jul 31, 2019 at 03:00:37PM +0200, Michal Hocko wrote: I am sorry, but I still do not follow. Who is consuming that node

Re: [PATCH v3 07/11] PCI: layerscape: Modify the way of getting capability with different PEX

2019-09-02 Thread Andrew Murray
On Mon, Sep 02, 2019 at 11:17:12AM +0800, Xiaowei Bao wrote: > The different PCIe controller in one board may be have different > capability of MSI or MSIX, so change the way of getting the MSI > capability, make it more flexible. > > Signed-off-by: Xiaowei Bao Please see the comments I just

Re: [PATCH v2 06/10] PCI: layerscape: Modify the way of getting capability with different PEX

2019-09-02 Thread Andrew Murray
On Fri, Aug 23, 2019 at 04:13:30AM +, Xiaowei Bao wrote: > > > > -Original Message- > > From: Kishon Vijay Abraham I > > Sent: 2019年8月23日 11:40 > > To: Xiaowei Bao ; bhelg...@google.com; > > robh...@kernel.org; mark.rutl...@arm.com; shawn...@kernel.org; Leo Li > > ;

Re: [PATCH v6 1/5] kasan: support backing vmalloc space with real shadow memory

2019-09-02 Thread Mark Rutland
On Mon, Sep 02, 2019 at 09:20:24PM +1000, Daniel Axtens wrote: > Hook into vmalloc and vmap, and dynamically allocate real shadow > memory to back the mappings. > > Most mappings in vmalloc space are small, requiring less than a full > page of shadow space. Allocating a full shadow page per

Re: [PATCH v3 10/11] arm64: dts: layerscape: Add PCIe EP node for ls1088a

2019-09-02 Thread Andrew Murray
On Mon, Sep 02, 2019 at 11:17:15AM +0800, Xiaowei Bao wrote: > Add PCIe EP node for ls1088a to support EP mode. > > Signed-off-by: Xiaowei Bao > --- > v2: > - Remove the pf-offset proparty. > v3: > - No change. > > arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi | 31 >

Re: [PATCH v7 5/6] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

2019-09-02 Thread Segher Boessenkool
On Mon, Sep 02, 2019 at 12:03:12PM +1000, Michael Ellerman wrote: > Michal Suchanek writes: > > On bigendian ppc64 it is common to have 32bit legacy binaries but much > > less so on littleendian. > > I think the toolchain people will tell you that there is no 32-bit > little endian ABI defined

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

2019-09-02 Thread Peter Zijlstra
On Mon, Sep 02, 2019 at 08:25:24PM +0800, Yunsheng Lin wrote: > On 2019/9/2 15:25, Peter Zijlstra wrote: > > On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote: > >> On 2019/9/1 0:12, Peter Zijlstra wrote: > > > >>> 1) because even it is not set, the device really does belong to a node.

Re: [PATCH v3 11/11] misc: pci_endpoint_test: Add LS1088a in pci_device_id table

2019-09-02 Thread Andrew Murray
On Mon, Sep 02, 2019 at 11:17:16AM +0800, Xiaowei Bao wrote: > Add LS1088a in pci_device_id table so that pci-epf-test can be used > for testing PCIe EP in LS1088a. > > Signed-off-by: Xiaowei Bao > --- > v2: > - No change. > v3: > - No change. > > drivers/misc/pci_endpoint_test.c | 1 + > 1

Re: [PATCH v3 09/11] PCI: layerscape: Add EP mode support for ls1088a and ls2088a

2019-09-02 Thread Andrew Murray
On Mon, Sep 02, 2019 at 11:17:14AM +0800, Xiaowei Bao wrote: > Add PCIe EP mode support for ls1088a and ls2088a, there are some > difference between LS1 and LS2 platform, so refactor the code of > the EP driver. > > Signed-off-by: Xiaowei Bao > --- > v2: > - This is a new patch for supporting

Re: [PATCH v3 05/11] dt-bindings: pci: layerscape-pci: add compatible strings for ls1088a and ls2088a

2019-09-02 Thread Andrew Murray
On Mon, Sep 02, 2019 at 11:17:10AM +0800, Xiaowei Bao wrote: > Add compatible strings for ls1088a and ls2088a. > > Signed-off-by: Xiaowei Bao > --- > v2: > - No change. > v3: > - Use one valid combination of compatible strings. > > Documentation/devicetree/bindings/pci/layerscape-pci.txt | 4

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

2019-09-02 Thread Yunsheng Lin
On 2019/9/2 15:25, Peter Zijlstra wrote: > On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote: >> On 2019/9/1 0:12, Peter Zijlstra wrote: > >>> 1) because even it is not set, the device really does belong to a node. >>> It is impossible a device will have magic uniform access to memory

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

2019-09-02 Thread Hillf Danton
> > Hi Hillf, > > Would you like to me to put you down as the author of this patch? If so, I'll > need a Signed-off-by from you. > Signed-off-by: Hillf Danton

Re: [PATCH v3 08/11] PCI: layerscape: Modify the MSIX to the doorbell mode

2019-09-02 Thread Andrew Murray
On Mon, Sep 02, 2019 at 11:17:13AM +0800, Xiaowei Bao wrote: > dw_pcie_ep_raise_msix_irq was never called in the exisitng driver > before, because the ls1046a platform don't support the MSIX feature > and msix_capable was always set to false. > Now that add the ls1088a platform with MSIX support,

Re: [PATCH v3 3/4] x86/efi: move common keyring handler functions to new file

2019-09-02 Thread Michael Ellerman
Nayna Jain writes: > The handlers to add the keys to the .platform keyring and blacklisted > hashes to the .blacklist keyring is common for both the uefi and powerpc > mechanisms of loading the keys/hashes from the firmware. > > This patch moves the common code from load_uefi.c to

Re: linux-next: build failure after merge of the powerpc tree

2019-09-02 Thread Christoph Hellwig
On Mon, Sep 02, 2019 at 09:40:11PM +1000, Stephen Rothwell wrote: > Hi all, > > After merging the powerpc tree, today's linux-next build (powerpc > ppc44x_defconfig) failed like this: Yes, this conflict is expected and we dicussed it before. I'll make sure Linus is in the loop when sending the

Re: [PATCH v5 2/2] powerpc: Add support to initialize ima policy rules

2019-09-02 Thread Michael Ellerman
Hi Nayna, Some more comments below. Nayna Jain writes: > POWER secure boot relies on the kernel IMA security subsystem to > perform the OS kernel image signature verification. Again this is just a design choice we've made, it's not specified anywhere or anything like that. And it only applies

Re: [PATCH v5 1/2] powerpc: detect the secure boot mode of the system

2019-09-02 Thread Michael Ellerman
Hi Nayna, Sorry I've taken so long to get to this series, there's just too many patches that need reviewing :/ Nayna Jain writes: > Secure boot on POWER defines different IMA policies based on the secure > boot state of the system. The terminology throughout is a bit vague, we have POWER,

linux-next: build failure after merge of the powerpc tree

2019-09-02 Thread Stephen Rothwell
Hi all, After merging the powerpc tree, today's linux-next build (powerpc ppc44x_defconfig) failed like this: arch/powerpc/mm/dma-noncoherent.c: In function 'atomic_pool_init': arch/powerpc/mm/dma-noncoherent.c:128:9: error: implicit declaration of function 'dma_atomic_pool_init'; did you mean

[PATCH v6 5/5] kasan debug: track pages allocated for vmalloc shadow

2019-09-02 Thread Daniel Axtens
Provide the current number of vmalloc shadow pages in /sys/kernel/debug/kasan_vmalloc/shadow_pages. Signed-off-by: Daniel Axtens --- Merging this is probably overkill, but I leave it to the discretion of the broader community. On v4 (no dynamic freeing), I saw the following approximate

[PATCH v6 4/5] x86/kasan: support KASAN_VMALLOC

2019-09-02 Thread Daniel Axtens
In the case where KASAN directly allocates memory to back vmalloc space, don't map the early shadow page over it. We prepopulate pgds/p4ds for the range that would otherwise be empty. This is required to get it synced to hardware on boot, allowing the lower levels of the page tables to be filled

[PATCH v6 3/5] fork: support VMAP_STACK with KASAN_VMALLOC

2019-09-02 Thread Daniel Axtens
Supporting VMAP_STACK with KASAN_VMALLOC is straightforward: - clear the shadow region of vmapped stacks when swapping them in - tweak Kconfig to allow VMAP_STACK to be turned on with KASAN Reviewed-by: Dmitry Vyukov Signed-off-by: Daniel Axtens --- arch/Kconfig | 9 +

[PATCH v6 2/5] kasan: add test for vmalloc

2019-09-02 Thread Daniel Axtens
Test kasan vmalloc support by adding a new test to the module. Signed-off-by: Daniel Axtens -- v5: split out per Christophe Leroy --- lib/test_kasan.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index

[PATCH v6 1/5] kasan: support backing vmalloc space with real shadow memory

2019-09-02 Thread Daniel Axtens
Hook into vmalloc and vmap, and dynamically allocate real shadow memory to back the mappings. Most mappings in vmalloc space are small, requiring less than a full page of shadow space. Allocating a full shadow page per mapping would therefore be wasteful. Furthermore, to ensure that different

[PATCH v6 0/5] kasan: support backing vmalloc space with real shadow memory

2019-09-02 Thread Daniel Axtens
Currently, vmalloc space is backed by the early shadow page. This means that kasan is incompatible with VMAP_STACK. This series provides a mechanism to back vmalloc space with real, dynamically allocated memory. I have only wired up x86, because that's the only currently supported arch I can work

Re: [RFC PATCH] powerpc: Convert ____flush_dcache_icache_phys() to C

2019-09-02 Thread Segher Boessenkool
On Mon, Sep 02, 2019 at 11:48:59AM +1000, Michael Ellerman wrote: > "Alastair D'Silva" writes: > > On Wed, 2019-08-21 at 22:27 +0200, Christophe Leroy wrote: > >> Can we be 100% sure that GCC won't add any code accessing some > >> global data or stack while the Data MMU is OFF ? > > > > +mpe > >

Re: linux-next: manual merge of the powerpc tree with the arm64 tree

2019-09-02 Thread Michael Ellerman
Catalin Marinas writes: > On Mon, Sep 02, 2019 at 11:44:43AM +1000, Michael Ellerman wrote: >> Stephen Rothwell writes: >> > Hi all, >> > >> > Today's linux-next merge of the powerpc tree got a conflict in: >> > >> > arch/Kconfig >> > >> > between commit: >> > >> > 5cf896fb6be3 ("arm64: Add

Re: [PATCH v2 4/4] powerpc/64: system call implement the bulk of the logic in C

2019-09-02 Thread Michael Ellerman
Michal Suchánek writes: > On Sat, 31 Aug 2019 02:48:26 +0800 > kbuild test robot wrote: > >> Hi Nicholas, >> >> I love your patch! Yet something to improve: >> >> [auto build test ERROR on linus/master] >> [cannot apply to v5.3-rc6 next-20190830] >> [if your patch is applied to the wrong git

Re: linux-next: manual merge of the powerpc tree with the arm64 tree

2019-09-02 Thread Will Deacon
On Mon, Sep 02, 2019 at 10:08:46AM +0100, Catalin Marinas wrote: > On Mon, Sep 02, 2019 at 11:44:43AM +1000, Michael Ellerman wrote: > > Stephen Rothwell writes: > > > Hi all, > > > > > > Today's linux-next merge of the powerpc tree got a conflict in: > > > > > > arch/Kconfig > > > > > >

Re: [PATCH v7 5/6] powerpc/64: Make COMPAT user-selectable disabled on littleendian by default.

2019-09-02 Thread Michal Suchánek
On Mon, 02 Sep 2019 12:03:12 +1000 Michael Ellerman wrote: > Michal Suchanek writes: > > On bigendian ppc64 it is common to have 32bit legacy binaries but much > > less so on littleendian. > > I think the toolchain people will tell you that there is no 32-bit > little endian ABI defined at

Re: linux-next: manual merge of the powerpc tree with the arm64 tree

2019-09-02 Thread Catalin Marinas
On Mon, Sep 02, 2019 at 11:44:43AM +1000, Michael Ellerman wrote: > Stephen Rothwell writes: > > Hi all, > > > > Today's linux-next merge of the powerpc tree got a conflict in: > > > > arch/Kconfig > > > > between commit: > > > > 5cf896fb6be3 ("arm64: Add support for relocating the kernel

[PATCH] Revert "powerpc: Add barrier_nospec to raw_copy_in_user()"

2019-09-02 Thread Michal Suchanek
This reverts commit 6fbcdd59094ade30db63f32316e9502425d7b256. Not needed. Data handled by raw_copy_in_user must be loaded through copy_from_user to be used in the kernel which already has the barrier. Signed-off-by: Michal Suchanek --- arch/powerpc/include/asm/uaccess.h | 1 - 1 file

Re: [PATCH v7 3/6] powerpc/perf: consolidate read_user_stack_32

2019-09-02 Thread Michal Suchánek
On Mon, 02 Sep 2019 14:01:17 +1000 Michael Ellerman wrote: > Michael Ellerman writes: > > Michal Suchanek writes: > ... > >> @@ -295,6 +279,12 @@ static inline int current_is_64bit(void) > >> } > >> > >> #else /* CONFIG_PPC64 */ > >> +static int read_user_stack_slow(void __user *ptr,

Re: [PATCH v7 1/7] kvmppc: Driver to manage pages of secure guest

2019-09-02 Thread Christoph Hellwig
On Fri, Aug 30, 2019 at 09:12:59AM +0530, Bharata B Rao wrote: > On Thu, Aug 29, 2019 at 10:38:10AM +0200, Christoph Hellwig wrote: > > On Thu, Aug 22, 2019 at 03:56:14PM +0530, Bharata B Rao wrote: > > > +/* > > > + * Bits 60:56 in the rmap entry will be used to identify the > > > + * different

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

2019-09-02 Thread Peter Zijlstra
On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote: > On 2019/9/1 0:12, Peter Zijlstra wrote: > > 1) because even it is not set, the device really does belong to a node. > > It is impossible a device will have magic uniform access to memory when > > CPUs cannot. > > So it means

Re: [PATCH] powerpc: Perform a bounds check in arch_add_memory

2019-09-02 Thread David Hildenbrand
On 02.09.19 01:54, Alastair D'Silva wrote: > On Tue, 2019-08-27 at 09:13 +0200, David Hildenbrand wrote: >> On 27.08.19 08:39, Alastair D'Silva wrote: >>> On Tue, 2019-08-27 at 08:28 +0200, Michal Hocko wrote: On Tue 27-08-19 15:20:46, Alastair D'Silva wrote: > From: Alastair D'Silva

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

2019-09-02 Thread David Howells
Hi Hillf, Would you like to me to put you down as the author of this patch? If so, I'll need a Signed-off-by from you. David --- commit df882ad6d4e24a3763719c1798ea58e87d56c2d7 Author: Hillf Danton Date: Fri Aug 30 15:54:33 2019 +0100 keys: Fix missing null pointer check in

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

2019-09-02 Thread Yunsheng Lin
On 2019/8/31 23:45, Paul Burton wrote: > 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

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

2019-09-02 Thread Yunsheng Lin
On 2019/9/1 4:02, David Miller wrote: > 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. > >