Re: [PATCH] [RFC] crash: Lock-free crash hotplug support reporting

2024-09-08 Thread Baoquan He
On 09/07/24 at 10:30am, Sourabh Jain wrote: > Hello Baoquan, > > Do you think this patch would help reduce lock contention when > CPU/Memory resources are removed in bulk from a system? .snip... -- > > include/linux/kexec.h | 11 --- > > kernel/crash_core.c | 27 +-

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-09-08 Thread Baoquan He
On 09/05/24 at 02:07pm, Sourabh Jain wrote: > Hello Baoquan, > > On 05/09/24 08:53, Baoquan He wrote: > > On 09/04/24 at 02:55pm, Sourabh Jain wrote: > > > Hello Baoquan, > > > > > > On 30/08/24 16:47, Baoquan He wrote: > > > > On 08/20/24 at 12:10pm, Sourabh Jain wrote: > > > > > Hello Baoquan,

Re: [PATCH 2/2] Fixup for 3279be36b671 ("powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32")

2024-09-08 Thread Christophe Leroy
Le 07/09/2024 à 16:35, Jason A. Donenfeld a écrit : On Fri, Sep 06, 2024 at 08:54:49PM +0200, Jason A. Donenfeld wrote: On Fri, Sep 06, 2024 at 05:14:43PM +0200, Christophe Leroy wrote: Le 06/09/2024 à 16:46, Jason A. Donenfeld a écrit : On Fri, Sep 06, 2024 at 04:26:32PM +0200, Christoph

[PATCH] set_memory: Add __must_check to generic stubs

2024-09-08 Thread Christophe Leroy
Following query shows that architectures that don't provide asm/set_memory.h don't use set_memory_...() functions. $ git grep set_memory_ alpha arc csky hexagon loongarch m68k microblaze mips nios2 openrisc parisc sh sparc um xtensa Following query shows that all core users of set_memory_...()

[PATCH] powerpc: Add __must_check to set_memory_...()

2024-09-08 Thread Christophe Leroy
After the following powerpc commits, all calls to set_memory_...() functions check returned value. - Commit 8f17bd2f4196 ("powerpc: Handle error in mark_rodata_ro() and mark_initmem_nx()") - Commit f7f18e30b468 ("powerpc/kprobes: Handle error returned by set_memory_rox()") - Commit 009cf11d4aab ("p

Re: [PATCH v4 RESEND] powerpc: Replace kretprobe code with rethook on powerpc

2024-09-08 Thread Google
On Fri, 06 Sep 2024 21:52:52 +1000 Michael Ellerman wrote: > On Fri, 30 Aug 2024 07:31:31 -0400, Abhishek Dubey wrote: > > This is an adaptation of commit f3a112c0c40d ("x86,rethook,kprobes: > > Replace kretprobe with rethook on x86") to powerpc. > > > > Rethook follows the existing kretprobe im

Re: [PATCH] crash: Default to CRASH_DUMP=n when support for it is unlikely

2024-09-08 Thread Dave Vasilevsky
I received a notification from Patchwork that my patch is now in the state "Handled Elsewhere".[0] Does that mean someone merged it somewhere? Or that I should be using a different mailing list? Or something else? I'd appreciate some guidance. Thanks, Dave [0] http://patchwork.ozlabs.org/pro

Re: [PATCH RFC v3 0/2] mm: Introduce ADDR_LIMIT_47BIT personality flag

2024-09-08 Thread Jiaxun Yang
在2024年9月5日九月 下午10:15,Charlie Jenkins写道: > Some applications rely on placing data in free bits addresses allocated > by mmap. Various architectures (eg. x86, arm64, powerpc) restrict the > address returned by mmap to be less than the 48-bit address space, > unless the hint address uses more than

Re: [PATCH v4 RESEND] powerpc: Replace kretprobe code with rethook on powerpc

2024-09-08 Thread Andrii Nakryiko
On Sun, Sep 8, 2024 at 6:11 AM Masami Hiramatsu wrote: > > On Fri, 06 Sep 2024 21:52:52 +1000 > Michael Ellerman wrote: > > > On Fri, 30 Aug 2024 07:31:31 -0400, Abhishek Dubey wrote: > > > This is an adaptation of commit f3a112c0c40d ("x86,rethook,kprobes: > > > Replace kretprobe with rethook on

Re: [PATCH] crash: Default to CRASH_DUMP=n when support for it is unlikely

2024-09-08 Thread Baoquan He
On 09/08/24 at 03:57pm, Dave Vasilevsky wrote: > I received a notification from Patchwork that my patch is now in the state > "Handled Elsewhere".[0] Does that mean someone merged it somewhere? Or that I > should be using a different mailing list? Or something else? I guess it's powerpc dev's pa

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-09-08 Thread Sourabh Jain
On 08/09/24 16:00, Baoquan He wrote: On 09/05/24 at 02:07pm, Sourabh Jain wrote: Hello Baoquan, On 05/09/24 08:53, Baoquan He wrote: On 09/04/24 at 02:55pm, Sourabh Jain wrote: Hello Baoquan, On 30/08/24 16:47, Baoquan He wrote: On 08/20/24 at 12:10pm, Sourabh Jain wrote: Hello Baoquan,

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-09-08 Thread Baoquan He
On 09/09/24 at 10:35am, Sourabh Jain wrote: > > > On 08/09/24 16:00, Baoquan He wrote: > > On 09/05/24 at 02:07pm, Sourabh Jain wrote: > > > Hello Baoquan, > > > > > > On 05/09/24 08:53, Baoquan He wrote: > > > > On 09/04/24 at 02:55pm, Sourabh Jain wrote: > > > > > Hello Baoquan, > > > > > > >

Re: [PATCH 1/2] powerpc/vdso: Fix VDSO data access when running in a non-root time namespace

2024-09-08 Thread Michael Ellerman
"Jason A. Donenfeld" writes: > On Fri, Sep 06, 2024 at 03:43:17PM +0200, Jason A. Donenfeld wrote: >> On Fri, Sep 06, 2024 at 10:23:08PM +1000, Michael Ellerman wrote: >> > Christophe Leroy writes: >> > > When running in a non-root time namespace, the global VDSO data page >> > > is replaced by a

Re: [PATCH] powerpc/xive: Use cpumask_intersects()

2024-09-08 Thread Michael Ellerman
Costa Shulyupin writes: > Replace `cpumask_any_and(a, b) >= nr_cpu_ids` > with the more readable `!cpumask_intersects(a, b)`. I agree it's more readable. It would be nice if the change log told me that both functions have similar performance behaviour. I'm not saying this is a super hot path, bu

Re: [PATCH] kexec/crash: no crash update when kexec in progress

2024-09-08 Thread Sourabh Jain
Hello Baoquan, On 09/09/24 10:53, Baoquan He wrote: On 09/09/24 at 10:35am, Sourabh Jain wrote: On 08/09/24 16:00, Baoquan He wrote: On 09/05/24 at 02:07pm, Sourabh Jain wrote: Hello Baoquan, On 05/09/24 08:53, Baoquan He wrote: On 09/04/24 at 02:55pm, Sourabh Jain wrote: Hello Baoquan,

Re: [PATCH] crash: Default to CRASH_DUMP=n when support for it is unlikely

2024-09-08 Thread Michael Ellerman
Dave Vasilevsky writes: > I received a notification from Patchwork that my patch is now in the > state "Handled Elsewhere".[0] Does that mean someone merged it > somewhere? Or that I should be using a different mailing list? Or > something else? > > I'd appreciate some guidance. It was sent/Cc'ed

Re: [PATCH v4 RESEND] powerpc: Replace kretprobe code with rethook on powerpc

2024-09-08 Thread Michael Ellerman
Masami Hiramatsu (Google) writes: > On Fri, 06 Sep 2024 21:52:52 +1000 > Michael Ellerman wrote: > >> On Fri, 30 Aug 2024 07:31:31 -0400, Abhishek Dubey wrote: >> > This is an adaptation of commit f3a112c0c40d ("x86,rethook,kprobes: >> > Replace kretprobe with rethook on x86") to powerpc. >> > >

[PATCH v3 0/8] x86/module: use large ROX pages for text allocations

2024-09-08 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Hi, These patches add support for using large ROX pages for allocations of executable memory on x86. They address Andy's comments [1] about having executable mappings for code that was not completely formed. The approach taken is to allocate ROX memory along w

[PATCH v3 1/8] mm: vmalloc: group declarations depending on CONFIG_MMU together

2024-09-08 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" There are a couple of declarations that depend on CONFIG_MMU in include/linux/vmalloc.h spread all over the file. Group them all together to improve code readability. No functional changes. Signed-off-by: Mike Rapoport (Microsoft) --- include/linux/vmalloc.h

[PATCH v3 2/8] mm: vmalloc: don't account for number of nodes for HUGE_VMAP allocations

2024-09-08 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" vmalloc allocations with VM_ALLOW_HUGE_VMAP that do not explicitly specify node ID will use huge pages only if size_per_node is larger than a huge page. Still the actual allocated memory is not distributed between nodes and there is no advantage in such approach.

[PATCH v3 3/8] asm-generic: introduce text-patching.h

2024-09-08 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Several architectures support text patching, but they name the header files that declare patching functions differently. Make all such headers consistently named text-patching.h and add an empty header in asm-generic for architectures that do not support text pa

[PATCH v3 4/8] module: prepare to handle ROX allocations for text

2024-09-08 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" In order to support ROX allocations for module text, it is necessary to handle modifications to the code, such as relocations and alternatives patching, without write access to that memory. One option is to use text patching, but this would make module loading e

[PATCH v3 5/8] ftrace: Add swap_func to ftrace_process_locs()

2024-09-08 Thread Mike Rapoport
From: Song Liu ftrace_process_locs sorts module mcount, which is inside RO memory. Add a ftrace_swap_func so that archs can use RO-memory-poke function to do the sorting. Signed-off-by: Song Liu Signed-off-by: Mike Rapoport (Microsoft) --- include/linux/ftrace.h | 2 ++ kernel/trace/ftrace.c

[PATCH v3 6/8] x86/module: perpare module loading for ROX allocations of text

2024-09-08 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" When module text memory will be allocated with ROX permissions, the memory at the actual address where the module will live will contain invalid instructions and there will be a writable copy that contains the actual module code. Update relocations and alternati

[PATCH v3 7/8] execmem: add support for cache of large ROX pages

2024-09-08 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Using large pages to map text areas reduces iTLB pressure and improves performance. Extend execmem_alloc() with an ability to use huge pages with ROX permissions as a cache for smaller allocations. To populate the cache, a writable large page is allocated from

[PATCH v3 8/8] x86/module: enable ROX caches for module text

2024-09-08 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Enable execmem's cache of PMD_SIZE'ed pages mapped as ROX for module text allocations. Signed-off-by: Mike Rapoport (Microsoft) --- arch/x86/mm/init.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/in