[PATCH] selftests/powerpc: Handle more misreporting cases in spectre_v2

2021-06-07 Thread Russell Currey
In commit f3054ffd71b5 ("selftests/powerpc: Return skip code for spectre_v2"), the spectre_v2 selftest is updated to be aware of cases where the vulnerability status reported in sysfs is incorrect, skipping the test instead. This happens because qemu can misrepresent the mitigation status of the h

Re: [PATCH] powerpc: Fix kernel-jump address for ppc64 wrapper boot

2021-06-07 Thread He Ying
Hello, 在 2021/6/8 13:26, Oliver O'Halloran 写道: On Fri, Jun 4, 2021 at 7:39 PM He Ying wrote: From "64-bit PowerPC ELF Application Binary Interface Supplement 1.9", we know that the value of a function pointer in a language like C is the address of the function descriptor and the first doublew

[PATCH] selftests/powerpc: Fix typo in spectre_v2

2021-06-07 Thread Russell Currey
Signed-off-by: Russell Currey --- tools/testing/selftests/powerpc/security/spectre_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/security/spectre_v2.c b/tools/testing/selftests/powerpc/security/spectre_v2.c index adc2b7294e5f..e66f66bc48

Re: [PATCH v2 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA

2021-06-07 Thread Mike Rapoport
Hi, On Mon, Jun 07, 2021 at 10:53:08AM +0200, Geert Uytterhoeven wrote: > Hi Mike, > > On Fri, Jun 4, 2021 at 8:50 AM Mike Rapoport wrote: > > From: Mike Rapoport > > > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > > configuration options are equivalent. > > > > Drop CONFIG

Re: [PATCH v2] libnvdimm/pmem: Fix blk_cleanup_disk() usage

2021-06-07 Thread Sachin Sant
> Reported-by: Sachin Sant > Fixes: 87eb73b2ca7c ("nvdimm-pmem: convert to > blk_alloc_disk/blk_cleanup_disk") > Link: > http://lore.kernel.org/r/dfb75ba8-603f-4a35-880b-c5b23ef8f...@linux.vnet.ibm.com > Cc: Christoph Hellwig > Cc: Ulf Hansson > Cc: Jens Axboe > Signed-off-by: Dan Williams

Re: [PATCH 20/30] nullb: use blk_mq_alloc_disk

2021-06-07 Thread Christoph Hellwig
On Thu, Jun 03, 2021 at 12:10:09AM +, Chaitanya Kulkarni wrote: > > diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c > > index d8e098f1e5b5..74fb2ec63219 100644 > > --- a/drivers/block/null_blk/main.c > > +++ b/drivers/block/null_blk/main.c > > @@ -1851,13 +1851,12 @@

Re: [PATCH v2] libnvdimm/pmem: Fix blk_cleanup_disk() usage

2021-06-07 Thread Christoph Hellwig
Thanks Dan, this looks good to me: Reviewed-by: Christoph Hellwig Jens, can you quickly pick this up?

Re: [PATCH] powerpc: Fix kernel-jump address for ppc64 wrapper boot

2021-06-07 Thread Oliver O'Halloran
On Fri, Jun 4, 2021 at 7:39 PM He Ying wrote: > > From "64-bit PowerPC ELF Application Binary Interface Supplement 1.9", > we know that the value of a function pointer in a language like C is > the address of the function descriptor and the first doubleword > of the function descriptor contains th

Re: [PATCH v7 00/11] Speedup mremap on ppc64

2021-06-07 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of June 8, 2021 2:39 pm: > On 6/7/21 3:40 PM, Nick Piggin wrote: >> On Monday, 7 June 2021, Aneesh Kumar K.V >> wrote: This patchset enables MOVE_PMD/MOVE_PUD support on power. This >> requires the platform to support updating higher-level page tables >>

Re: [PATCH] powerpc/kprobes: Pass ppc_inst as a pointer to emulate_step() on ppc32

2021-06-07 Thread Christophe Leroy
Le 07/06/2021 à 19:36, Christophe Leroy a écrit : Le 07/06/2021 à 16:31, Christophe Leroy a écrit : Le 07/06/2021 à 13:34, Naveen N. Rao a écrit : Naveen N. Rao wrote: Trying to use a kprobe on ppc32 results in the below splat:     BUG: Unable to handle kernel data access on read at 0x7

Re: [PATCH] powerpc: Fix kernel-jump address for ppc64 wrapper boot

2021-06-07 Thread Christophe Leroy
Le 04/06/2021 à 11:22, He Ying a écrit : From "64-bit PowerPC ELF Application Binary Interface Supplement 1.9", we know that the value of a function pointer in a language like C is the address of the function descriptor and the first doubleword of the function descriptor contains the address

Re: [PATCH v7 00/11] Speedup mremap on ppc64

2021-06-07 Thread Aneesh Kumar K.V
On 6/7/21 3:40 PM, Nick Piggin wrote: On Monday, 7 June 2021, Aneesh Kumar K.V wrote: This patchset enables MOVE_PMD/MOVE_PUD support on power. This requires the platform to support updating higher-level page tables without updating page table ZjQcmQRYFpfptBannerStart This Message Is From an

Re: [PATCH v4 1/4] lazy tlb: introduce lazy mm refcount helper functions

2021-06-07 Thread Nicholas Piggin
Excerpts from Andrew Morton's message of June 8, 2021 11:48 am: > On Tue, 08 Jun 2021 11:39:56 +1000 Nicholas Piggin wrote: > >> > Looks like a functional change. What's happening here? >> >> That's kthread_use_mm being clever about the lazy tlb mm. If it happened >> that the kthread had inher

Re: [PATCH v7 01/11] mm/mremap: Fix race between MOVE_PMD mremap and pageout

2021-06-07 Thread Hugh Dickins
On Mon, 7 Jun 2021, Aneesh Kumar K.V wrote: > CPU 1 CPU 2 CPU 3 > > mremap(old_addr, new_addr) page_shrinker/try_to_unmap_one > > mmap_write_lock_killable() > > addr = old_addr >

Re: [PATCH v4 3/4] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2021-06-07 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of June 5, 2021 11:42 am: > On big systems, the mm refcount can become highly contented when doing > a lot of context switching with threaded applications (particularly > switching between the idle thread and an application thread). > > Abandoning lazy tlb s

Re: [PATCH v4 2/4] lazy tlb: allow lazy tlb mm refcounting to be configurable

2021-06-07 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of June 5, 2021 11:42 am: > Add CONFIG_MMU_TLB_REFCOUNT which enables refcounting of the lazy tlb mm > when it is context switched. This can be disabled by architectures that > don't require this refcounting if they clean up lazy tlb mms when the > last refco

Re: [PATCH] powerpc: Fix duplicate included _clear.h

2021-06-07 Thread Michael Ellerman
Jiapeng Chong writes: > Clean up the following includecheck warning: > > ./arch/powerpc/perf/req-gen/perf.h: _clear.h is included more than once. That's by design. See the error reported by the kbuild robot. > No functional change. Not true. cheers > Reported-by: Abaci Robot > Signed-off-by

Re: [PATCH v4 4/4] powerpc/64s: enable MMU_LAZY_TLB_SHOOTDOWN

2021-06-07 Thread Nicholas Piggin
Excerpts from Andrew Morton's message of June 8, 2021 9:52 am: > On Sat, 5 Jun 2021 11:42:16 +1000 Nicholas Piggin wrote: > >> On a 16-socket 192-core POWER8 system, a context switching benchmark >> with as many software threads as CPUs (so each switch will go in and >> out of idle), upstream ca

Re: [PATCH v4 1/4] lazy tlb: introduce lazy mm refcount helper functions

2021-06-07 Thread Andrew Morton
On Tue, 08 Jun 2021 11:39:56 +1000 Nicholas Piggin wrote: > > Looks like a functional change. What's happening here? > > That's kthread_use_mm being clever about the lazy tlb mm. If it happened > that the kthread had inherited a the lazy tlb mm that happens to be the > one we want to use here

Re: [PATCH v4 1/4] lazy tlb: introduce lazy mm refcount helper functions

2021-06-07 Thread Nicholas Piggin
Excerpts from Andrew Morton's message of June 8, 2021 9:49 am: > On Sat, 5 Jun 2021 11:42:13 +1000 Nicholas Piggin wrote: > >> Add explicit _lazy_tlb annotated functions for lazy mm refcounting. >> This makes lazy mm references more obvious, and allows explicit >> refcounting to be removed if it

[PATCH -next] soc: fsl: dpio: use list_move_tail instead of list_del/list_add_tail

2021-06-07 Thread Zou Wei
Using list_move_tail() instead of list_del() + list_add_tail(). Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/soc/fsl/dpio/dpio-service.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/fsl/dpio/dpio-service.c b/drivers/soc/fsl/dpio/dpio-service.c

[PATCH v2] libnvdimm/pmem: Fix blk_cleanup_disk() usage

2021-06-07 Thread Dan Williams
The queue_to_disk() helper can not be used after del_gendisk() communicate @disk via the pgmap->owner. Otherwise, queue_to_disk() returns NULL resulting in the splat below. Kernel attempted to read user page (330) - exploit attempt? (uid: 0) BUG: Kernel NULL pointer dereference on read at 0x000

Re: [PATCH v4 4/4] powerpc/64s: enable MMU_LAZY_TLB_SHOOTDOWN

2021-06-07 Thread Andrew Morton
On Sat, 5 Jun 2021 11:42:16 +1000 Nicholas Piggin wrote: > On a 16-socket 192-core POWER8 system, a context switching benchmark > with as many software threads as CPUs (so each switch will go in and > out of idle), upstream can achieve a rate of about 1 million context > switches per second. Aft

Re: [PATCH v4 1/4] lazy tlb: introduce lazy mm refcount helper functions

2021-06-07 Thread Andrew Morton
On Sat, 5 Jun 2021 11:42:13 +1000 Nicholas Piggin wrote: > Add explicit _lazy_tlb annotated functions for lazy mm refcounting. > This makes lazy mm references more obvious, and allows explicit > refcounting to be removed if it is not used. > > ... > > --- a/kernel/kthread.c > +++ b/kernel/kthre

[PATCH 1/2] selftests/powerpc: Add missing clobbered register to to ptrace TM tests

2021-06-07 Thread Jordan Niethe
ISA v3.1 removes TM but includes a synthetic implementation for backwards compatibility. With this implementation, the tests ptrace-tm-spd-gpr and ptrace-tm-gpr should never be able to make any forward progress and eventually should be killed by the timeout. Instead on a P10 running in P9 mode, p

[PATCH 2/2] selftests: Skip TM tests on synthetic TM implementations

2021-06-07 Thread Jordan Niethe
Transactional Memory was removed from the architecture in ISA v3.1. For threads running in P8/P9 compatibility mode on P10 a synthetic TM implementation is provided. In this implementation, tbegin. always sets cr0 eq meaning the abort handler is always called. This is not an issue as users of TM ar

[PATCH] libnvdimm/pmem: Fix blk_cleanup_disk() usage

2021-06-07 Thread Dan Williams
The queue_to_disk() helper can not be used after del_gendisk() communicate @disk via the pgmap->owner. Reported-by: Sachin Sant Fixes: 87eb73b2ca7c ("nvdimm-pmem: convert to blk_alloc_disk/blk_cleanup_disk") Cc: Christoph Hellwig Cc: Ulf Hansson Cc: Jens Axboe Signed-off-by: Dan Williams ---

Re: [PATCH v7 00/11] Speedup mremap on ppc64

2021-06-07 Thread Nick Piggin
On Monday, 7 June 2021, Aneesh Kumar K.V wrote: > > This patchset enables MOVE_PMD/MOVE_PUD support on power. This requires > the platform to support updating higher-level page tables without > updating page table entries. This also needs to invalidate the Page Walk > Cache on architecture suppor

Re: [PATCH] powerpc/stacktrace: fix raise_backtrace_ipi() logic

2021-06-07 Thread Nathan Lynch
Michael Ellerman writes: > Nathan Lynch writes: >> Hi Michael, >> >> Michael Ellerman writes: >>> Nathan Lynch writes: When smp_send_safe_nmi_ipi() indicates that the target CPU has responded to the IPI, skip the remote paca inspection fallback. Otherwise both the sending and tar

Re: [PATCH] powerpc: Fix duplicate included _clear.h

2021-06-07 Thread kernel test robot
Hi Jiapeng, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on v5.13-rc5 next-20210607] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--bas

[PATCH v1 05/12] mm/memory_hotplug: remove nid parameter from remove_memory() and friends

2021-06-07 Thread David Hildenbrand
There is only a single user remaining. We can simply try to offline all online nodes - which is fast, because we usually span pages and can skip such nodes right away. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Dan Williams Cc

[PATCH v1 04/12] mm/memory_hotplug: remove nid parameter from arch_remove_memory()

2021-06-07 Thread David Hildenbrand
The parameter is unused, let's remove it. Cc: Catalin Marinas Cc: Will Deacon Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Yoshinori Sato Cc: Rich Felker Cc: Dave Hansen Cc: Andy Lutomirski Cc: Pet

Re: [PATCH] powerpc/kprobes: Pass ppc_inst as a pointer to emulate_step() on ppc32

2021-06-07 Thread Christophe Leroy
Le 07/06/2021 à 16:31, Christophe Leroy a écrit : Le 07/06/2021 à 13:34, Naveen N. Rao a écrit : Naveen N. Rao wrote: Trying to use a kprobe on ppc32 results in the below splat:     BUG: Unable to handle kernel data access on read at 0x7c0802a6     Faulting instruction address: 0xc002e9f0

Re: [PATCH v1 1/1] powerpc/prom_init: Move custom isspace() to its own namespace

2021-06-07 Thread Andy Shevchenko
On Mon, May 10, 2021 at 05:49:25PM +0300, Andy Shevchenko wrote: > If by some reason any of the headers will include ctype.h > we will have a name collision. Avoid this by moving isspace() > to the dedicate namespace. > > First appearance of the code is in the commit cf68787b68a2 > ("powerpc/prom_

Re: [PATCH] Revert "powerpc: Switch to relative jump labels"

2021-06-07 Thread Greg Kurz
On Tue, 01 Jun 2021 17:36:15 +1000 Michael Ellerman wrote: > Roman Bolshakov writes: > > On Sat, May 29, 2021 at 09:39:49AM +1000, Michael Ellerman wrote: > >> Roman Bolshakov writes: > >> > This reverts commit b0b3b2c78ec075cec4721986a95abbbac8c3da4f. > >> > > >> > Otherwise, direct kernel boo

Re: [PATCH] powerpc/kprobes: Pass ppc_inst as a pointer to emulate_step() on ppc32

2021-06-07 Thread Christophe Leroy
Le 07/06/2021 à 13:34, Naveen N. Rao a écrit : Naveen N. Rao wrote: Trying to use a kprobe on ppc32 results in the below splat:     BUG: Unable to handle kernel data access on read at 0x7c0802a6     Faulting instruction address: 0xc002e9f0     Oops: Kernel access of bad area, sig: 11 [#1]    

Re: [PATCH] Fixup for "[v2] powerpc/8xx: Allow disabling KUAP at boot time"

2021-06-07 Thread Michael Ellerman
Christophe Leroy writes: > Le 06/06/2021 à 19:43, Christophe Leroy a écrit : > > Michael, I sent it as a Fixup because it's in next-test, but if you prefer I > can sent a v3. That's fine, I squashed it in. cheers

Re: [PATCH v3] powerpc: Fixup for v3 "powerpc/nohash: Refactor update of BDI2000 pointers in switch_mmu_context()" in next-test

2021-06-07 Thread Michael Ellerman
Christophe Leroy writes: > As mentionned in history, v3 doesn't apply to book3s/32 so the hunk > on head_book3s_32.S has to be dropped from the commit mentionned > in the title. > > Signed-off-by: Christophe Leroy > --- > Michael, tell me if you prefer a v4 of the series. Nah that's OK, I squash

Re: [PATCH] powerpc/kprobes: Pass ppc_inst as a pointer to emulate_step() on ppc32

2021-06-07 Thread Naveen N. Rao
Naveen N. Rao wrote: Trying to use a kprobe on ppc32 results in the below splat: BUG: Unable to handle kernel data access on read at 0x7c0802a6 Faulting instruction address: 0xc002e9f0 Oops: Kernel access of bad area, sig: 11 [#1] BE PAGE_SIZE=4K PowerPC 44x Platform Modules l

Re: [PATCH] watchdog: Remove MV64x60 watchdog driver

2021-06-07 Thread Guenter Roeck
On Mon, Jun 07, 2021 at 11:43:26AM +1000, Michael Ellerman wrote: > Guenter Roeck writes: > > On 5/17/21 4:17 AM, Michael Ellerman wrote: > >> Guenter Roeck writes: > >>> On 3/18/21 10:25 AM, Christophe Leroy wrote: > Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") > >>

[PATCH 3/3] powerpc/32s: Rename PTE_SIZE to PTE_T_SIZE

2021-06-07 Thread Christophe Leroy
PTE_SIZE means PTE page table size in most placed, whereas in hash_low.S in means size of one entry in the table. Rename it PTE_T_SIZE, and define it directly in hash_low.S instead of going through asm-offsets. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/asm-offsets.c | 2 -- arch

[PATCH 2/3] powerpc: Define swapper_pg_dir[] in C

2021-06-07 Thread Christophe Leroy
Don't duplicate swapper_pg_dir[] in each platform's head.S Define it in mm/pgtable.c Define MAX_PTRS_PER_PGD because on book3s/64 PTRS_PER_PGD is not a constant. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/pgtable.h | 3 +++ arch/powerpc/include/asm/pgtable.h

[PATCH 1/3] powerpc: Define empty_zero_page[] in C

2021-06-07 Thread Christophe Leroy
At the time being, empty_zero_page[] is defined in each platform head.S. Define it in mm/mem.c instead, and put it in BSS section instead of the DATA section. Commit 5227cfa71f9e ("arm64: mm: place empty_zero_page in bss") explains why it is interesting to have it in BSS. Signed-off-by: Christoph

[PATCH] powerpc: Fix duplicate included _clear.h

2021-06-07 Thread Jiapeng Chong
Clean up the following includecheck warning: ./arch/powerpc/perf/req-gen/perf.h: _clear.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/perf/req-gen/perf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerp

[PATCH] powerpc: Fix duplicate included linux/sched/clock.h

2021-06-07 Thread Jiapeng Chong
Clean up the following includecheck warning: ./arch/powerpc/kernel/time.c: linux/sched/clock.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kernel/time.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc

[PATCH v3] powerpc: Fixup for v3 "powerpc/nohash: Refactor update of BDI2000 pointers in switch_mmu_context()" in next-test

2021-06-07 Thread Christophe Leroy
As mentionned in history, v3 doesn't apply to book3s/32 so the hunk on head_book3s_32.S has to be dropped from the commit mentionned in the title. Signed-off-by: Christophe Leroy --- Michael, tell me if you prefer a v4 of the series. --- arch/powerpc/kernel/head_book3s_32.S | 6 ++ 1 file ch

Re: [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code

2021-06-07 Thread Russell King (Oracle)
On Mon, Jun 07, 2021 at 07:48:54AM +0200, Christophe Leroy wrote: > Hi Kefeng, > > What you could do is to define a __weak function that architectures can > override and call that function from mm_init() as suggested by Mike, The problem with weak functions is that they bloat the kernel. Each tim

Re: [PATCH v2 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA

2021-06-07 Thread Geert Uytterhoeven
Hi Mike, On Fri, Jun 4, 2021 at 8:50 AM Mike Rapoport wrote: > From: Mike Rapoport > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > configuration options are equivalent. > > Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. > > Done with > > $ sed -i 's/CON

Re: [PATCH v2 0/9] Remove DISCINTIGMEM memory model

2021-06-07 Thread Geert Uytterhoeven
Hi Mike, You may want to fix the DISCINTIGMEM typo in the subject for v3, unless you think that makes tracking series versions more complicated ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal c

Re: [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code

2021-06-07 Thread Kefeng Wang
On 2021/6/7 13:48, Christophe Leroy wrote: Hi Kefeng, Le 07/06/2021 à 02:55, Kefeng Wang a écrit : On 2021/6/7 5:29, Mike Rapoport wrote: Hello Kefeng, On Fri, Jun 04, 2021 at 03:06:18PM +0800, Kefeng Wang wrote: Add setup_initial_init_mm() helper, then use it to cleanup the text, data an

Re: [PATCH 00/21] Rid W=1 warnings from IDE

2021-06-07 Thread Christoph Hellwig
Please don't touch this code as it is about to be removed entirely.

Re: [FSL P50x0] KVM HV doesn't work anymore

2021-06-07 Thread Christian Zigotzky
On 02 June 2021 at 01:26pm, Christian Zigotzky wrote: On 20 May 2021 at 01:07am, Nicholas Piggin wrote: Hmm, okay that probably rules out those notifier changes then. Can you remind me were you able to rule these out as suspects? 8f6cc75a97d1 powerpc: move norestart trap flag to bit 0 8dc7f0229