Re: [PATCH] powerpc/powernv/prd: Validate whether address to be mapped is part of system RAM

2019-10-04 Thread Vaidyanathan Srinivasan
* Jeremy Kerr [2019-10-04 11:27:46]: > Hi Vaidy, > > > The current topic is who owns setting up the ATT bits for that piece > > of memory. It is the kernel today. Kernel decides to set this up as > > normal memory or I/O memory and sets the bits in page table entry. > > > > > Or, what if

Re: [PATCH] powerpc/kvm: Fix kvmppc_vcore->in_guest value in kvmhv_switch_to_host

2019-10-04 Thread Alexey Kardashevskiy
On 04/10/2019 12:53, Jordan Niethe wrote: > kvmhv_switch_to_host() in arch/powerpc/kvm/book3s_hv_rmhandlers.S needs > to set kvmppc_vcore->in_guest to 0 to signal secondary CPUs to continue. > This happens after resetting the PCR. Before commit 13c7bb3c57dc > ("powerpc/64s: Set reserved PCR

[RESEND TRIVIAL 3/3] treewide: arch: Fix Kconfig indentation

2019-10-04 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^/\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski --- arch/Kconfig | 4 ++-- arch/alpha/Kconfig | 2 +-

[RESEND TRIVIAL 2/3] treewide: Fix Kconfig indentation

2019-10-04 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^/\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski --- certs/Kconfig | 14 ++--- init/Kconfig | 28 +-

[RESEND TRIVIAL 1/3] treewide: drivers: Fix Kconfig indentation

2019-10-04 Thread Krzysztof Kozlowski
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^/\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski --- drivers/acpi/Kconfig | 8 +- drivers/ata/Kconfig | 12 +--

Re: [PATCH] crypto: talitos - fix hash result for VMAP_STACK

2019-10-04 Thread Herbert Xu
On Tue, Sep 10, 2019 at 06:04:14AM +, Christophe Leroy wrote: > When VMAP_STACK is selected, stack cannot be DMA-mapped. > Therefore, the hash result has to be DMA-mapped in the request > context and copied into areq->result at completion. > > Signed-off-by: Christophe Leroy > --- >

Re: [PATCH v5 00/11] Introduces new count-based method for tracking lockless pagetable walks

2019-10-04 Thread Peter Zijlstra
On Fri, Oct 04, 2019 at 01:42:36PM +0200, Peter Zijlstra wrote: > If you can find anything there that isn't right, please explain that in > detail and we'll need to look hard at fixing _that_. Also, I can't imagine Nick is happy with 128 CPUs banging on that atomic counter, esp. since atomics are

Re: [PATCH v5 00/11] Introduces new count-based method for tracking lockless pagetable walks

2019-10-04 Thread Peter Zijlstra
On Thu, Oct 03, 2019 at 05:36:31PM -0300, Leonardo Bras wrote: > > Also, I'm not sure I understand things properly. > > > > So serialize_against_pte_lookup() wants to wait for all currently > > out-standing __find_linux_pte() instances (which are very similar to > > gup_fast). > > > > It seems

Re: [PATCH v5 01/11] asm-generic/pgtable: Adds generic functions to monitor lockless pgtable walks

2019-10-04 Thread Peter Zijlstra
On Thu, Oct 03, 2019 at 06:24:07PM -0300, Leonardo Bras wrote: > Hello Peter, thanks for the feedback! > > On Thu, 2019-10-03 at 13:51 +0200, Peter Zijlstra wrote: > > On Thu, Oct 03, 2019 at 09:11:45AM +0200, Peter Zijlstra wrote: > > > On Wed, Oct 02, 2019 at 10:33:15PM -0300, Leonardo Bras

Re: [PATCH v5 01/11] asm-generic/pgtable: Adds generic functions to monitor lockless pgtable walks

2019-10-04 Thread Peter Zijlstra
On Thu, Oct 03, 2019 at 01:40:38PM -0700, John Hubbard wrote: > On 10/3/19 4:51 AM, Peter Zijlstra wrote: > > On Thu, Oct 03, 2019 at 09:11:45AM +0200, Peter Zijlstra wrote: > >> On Wed, Oct 02, 2019 at 10:33:15PM -0300, Leonardo Bras wrote: > ... > > > > I'm still really confused about this

[PATCH] ASoC: fsl_mqs: Fix error handling in probe

2019-10-04 Thread Dan Carpenter
There are several problems in the error handling in fsl_mqs_probe(). 1) "ret" isn't initialized on some paths. GCC has a feature which warns about uninitialized variables but the code initializes "ret" to zero at the start of the function so the checking is turned off. 2) "gpr_np" is a

Re: [PATCH 2/2] powerpc/powernv: Use common code for the symbol_map export

2019-10-04 Thread Oliver O'Halloran
On Fri, Oct 4, 2019 at 7:24 PM kbuild test robot wrote: > > Hi Oliver, > > I love your patch! Yet something to improve: > > [auto build test ERROR on powerpc/next] > [cannot apply to v5.4-rc1 next-20191004] > [if your patch is applied to the wrong git tree, please drop us

Re: [PATCH v5 01/10] mm/memunmap: Use the correct start and end pfn when removing pages from zone

2019-10-04 Thread David Hildenbrand
On 04.10.19 11:03, David Hildenbrand wrote: > On 04.10.19 11:00, David Hildenbrand wrote: >> On 03.10.19 18:48, Aneesh Kumar K.V wrote: >>> On 10/1/19 8:33 PM, David Hildenbrand wrote: On 01.10.19 16:57, David Hildenbrand wrote: > On 01.10.19 16:40, David Hildenbrand wrote: >> From:

Re: [PATCH 2/2] powerpc/powernv: Use common code for the symbol_map export

2019-10-04 Thread kbuild test robot
Hi Oliver, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [cannot apply to v5.4-rc1 next-20191004] [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 '--base' option to specify

Re: [PATCH v5 01/10] mm/memunmap: Use the correct start and end pfn when removing pages from zone

2019-10-04 Thread David Hildenbrand
On 04.10.19 11:00, David Hildenbrand wrote: > On 03.10.19 18:48, Aneesh Kumar K.V wrote: >> On 10/1/19 8:33 PM, David Hildenbrand wrote: >>> On 01.10.19 16:57, David Hildenbrand wrote: On 01.10.19 16:40, David Hildenbrand wrote: > From: "Aneesh Kumar K.V" > > With altmap, all the

Re: [PATCH v5 01/10] mm/memunmap: Use the correct start and end pfn when removing pages from zone

2019-10-04 Thread David Hildenbrand
On 03.10.19 18:48, Aneesh Kumar K.V wrote: > On 10/1/19 8:33 PM, David Hildenbrand wrote: >> On 01.10.19 16:57, David Hildenbrand wrote: >>> On 01.10.19 16:40, David Hildenbrand wrote: From: "Aneesh Kumar K.V" With altmap, all the resource pfns are not initialized. While

[PATCH 2/2] powerpc/powernv: Use common code for the symbol_map export

2019-10-04 Thread Oliver O'Halloran
Long before we had a generic way for firmware to export memory ranges of interest we added a special case for the skiboot symbol map. The code is pretty much identical to the generic export so re-use the code. Signed-off-by: Oliver O'Halloran --- arch/powerpc/platforms/powernv/opal.c | 47

[PATCH 1/2] powerpc/powernv: Rework exports to support subnodes

2019-10-04 Thread Oliver O'Halloran
Originally we only had a handful of exported memory ranges, but we'd to export the per-core trace buffers. This results in a lot of files in the exports directory which is a but unfortunate. We can clean things up a bit by turning subnodes into subdirectories of the exports directory.

[PATCH v3 4/4] powerpc: Enable STRICT_MODULE_RWX

2019-10-04 Thread Russell Currey
Whether STRICT_MODULE_RWX is enabled by default depends on powerpc platform - in arch/Kconfig, STRICT_MODULE_RWX depends on ARCH_OPTIONAL_KERNEL_RWX, which in arch/powerpc/Kconfig is selected if ARCH_HAS_STRICT_KERNEL_RWX is selected, which is only true with CONFIG_RELOCATABLE *disabled*.

[PATCH v3 0/4] Implement STRICT_MODULE_RWX for powerpc

2019-10-04 Thread Russell Currey
It's been quite a while since the last iteration, there were a few things to hunt down and fix. The first was the way that I was updating PTEs was using set_pte_at() unsafely - now, each page is updated by clearing -> flushing -> setting. This should be generic across all MMUs, I know that there

[PATCH v3 1/4] powerpc/mm: Implement set_memory() routines

2019-10-04 Thread Russell Currey
The set_memory_{ro/rw/nx/x}() functions are required for STRICT_MODULE_RWX, and are generally useful primitives to have. This implementation is designed to be completely generic across powerpc's many MMUs. It's possible that this could be optimised to be faster for specific MMUs, but the focus

[PATCH v3 2/4] powerpc/kprobes: Mark newly allocated probes as RO

2019-10-04 Thread Russell Currey
With CONFIG_STRICT_KERNEL_RWX=y and CONFIG_KPROBES=y, there will be one W+X page at boot by default. This can be tested with CONFIG_PPC_PTDUMP=y and CONFIG_PPC_DEBUG_WX=y set, and checking the kernel log during boot. powerpc doesn't implement its own alloc() for kprobes like other architectures

[PATCH v3 3/4] powerpc/mm/ptdump: debugfs handler for W+X checks at runtime

2019-10-04 Thread Russell Currey
Very rudimentary, just echo 1 > [debugfs]/check_wx_pages and check the kernel log. Useful for testing strict module RWX. Also fixed a typo. Signed-off-by: Russell Currey --- arch/powerpc/mm/ptdump/ptdump.c | 31 +-- 1 file changed, 25 insertions(+), 6