Re: [PATCH] MAINTAINERS: powerpc: Remove Aneesh

2024-04-29 Thread Aneesh Kumar K . V
Michael Ellerman writes: > Aneesh is stepping down from powerpc maintenance. > > Signed-off-by: Michael Ellerman Acked-by: Aneesh Kumar K.V (Arm) > --- > MAINTAINERS | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 7c121493f43d..93af33ee8541 100644 >

Re: [PATCH] MAINTAINERS: MMU GATHER: Update Aneesh's address

2024-04-29 Thread Aneesh Kumar K . V
Michael Ellerman writes: > Aneesh's IBM address no longer works, switch to his preferred kernel.org > address. > > Signed-off-by: Michael Ellerman Acked-by: Aneesh Kumar K.V (Arm) > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS

[PATCH] MAINTAINERS: MMU GATHER: Update Aneesh's address

2024-04-29 Thread Michael Ellerman
Aneesh's IBM address no longer works, switch to his preferred kernel.org address. Signed-off-by: Michael Ellerman --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 93af33ee8541..f096c9fff5b3 100644 --- a/MAINTAINERS +++

[PATCH] MAINTAINERS: powerpc: Remove Aneesh

2024-04-29 Thread Michael Ellerman
Aneesh is stepping down from powerpc maintenance. Signed-off-by: Michael Ellerman --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7c121493f43d..93af33ee8541 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12478,7 +12478,6 @@ LINUX FOR POWERPC

Re: [PATCH v2 0/2] powerpc/pseries: Fixes for lparstat boot reports

2024-04-29 Thread Michael Ellerman
Shrikanth Hegde writes: > On 4/12/24 2:50 PM, Shrikanth Hegde wrote: >> Currently lparstat reports which shows since LPAR boot are wrong for >> some fields. There is a need for storing the PIC(Pool Idle Count) at >> boot for accurate reporting. PATCH 1 Does that. >> >> While there, it was

Re: WARNING: CPU: 1 PID: 1 at net/core/netpoll.c:370 netpoll_send_skb+0x1fc/0x20c at boot when netconsole is enabled (kernel v6.9-rc5, v6.8.7, sungem, PowerMac G4 DP)

2024-04-29 Thread Jakub Kicinski
On Sun, 28 Apr 2024 12:53:06 +0200 Erhard Furtner wrote: > With netconsole enabled I get this "WARNING: CPU: 1 PID: 1 at > net/core/netpoll.c:370 netpoll_send_skb+0x1fc/0x20c" and "WARNING: > CPU: 1 PID: 1 at kernel/locking/irqflag-debug.c:10 > warn_bogus_irq_restore+0x30/0x44" at boot on my

Re: [PATCH v2] kprobe/ftrace: bail out if ftrace was killed

2024-04-29 Thread Steven Rostedt
On Mon, 29 Apr 2024 10:47:18 -0700 Stephen Brennan wrote: > If an error happens in ftrace, ftrace_kill() will prevent disarming > kprobes. Eventually, the ftrace_ops associated with the kprobes will be > freed, yet the kprobes will still be active, and when triggered, they > will use the freed

Re: [PATCH] kprobe/ftrace: bail out if ftrace was killed

2024-04-29 Thread Stephen Brennan
Masami Hiramatsu (Google) writes: > Hi Stephen, > > On Fri, 26 Apr 2024 15:58:34 -0700 > Stephen Brennan wrote: > >> If an error happens in ftrace, ftrace_kill() will prevent disarming >> kprobes. Eventually, the ftrace_ops associated with the kprobes will be >> freed, yet the kprobes will still

[PATCH v2] kprobe/ftrace: bail out if ftrace was killed

2024-04-29 Thread Stephen Brennan
If an error happens in ftrace, ftrace_kill() will prevent disarming kprobes. Eventually, the ftrace_ops associated with the kprobes will be freed, yet the kprobes will still be active, and when triggered, they will use the freed memory, likely resulting in a page fault and panic. This behavior

Re: [PATCH][next] crypto/nx: Avoid potential -Wflex-array-member-not-at-end warning

2024-04-29 Thread Kees Cook
On Mon, Mar 25, 2024 at 03:01:56PM -0600, Gustavo A. R. Silva wrote: > -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting > ready to enable it globally. > > Use the `__struct_group()` helper to separate the flexible array > from the rest of the members in flexible `struct

Re: [PATCH v7 00/16] mm: jit/text allocator

2024-04-29 Thread Luis Chamberlain
On Mon, Apr 29, 2024 at 03:16:04PM +0300, Mike Rapoport wrote: > From: "Mike Rapoport (IBM)" > > Hi, > > The patches are also available in git: > https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/log/?h=execmem/v7 > > v7 changes: > * define MODULE_{VADDR,END} for riscv32 to fix

Re: [PATCH 2/3] selftest/powerpc: Add flags.mk to support pmu buildable

2024-04-29 Thread Michael Ellerman
Madhavan Srinivasan writes: > When running `make -C powerpc/pmu run_tests` from top level selftests > directory, currently this error is being reported > > make: Entering directory > '/home/maddy/linux/tools/testing/selftests/powerpc/pmu' > Makefile:40: warning: overriding recipe for target

Re: [PATCH 2/2] mm/selftests: Don't prefault in gup_longterm tests

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 03:26:22PM +0200, David Hildenbrand wrote: > > The test patch here doesn't need to rush. David, how about you prepare a > > better and verified patch and post it separately, making sure to cover all > > the things we used to cover plus the unshare? IIUC it used to be not >

Re: [PATCH] kprobe/ftrace: bail out if ftrace was killed

2024-04-29 Thread Google
Hi Stephen, On Fri, 26 Apr 2024 15:58:34 -0700 Stephen Brennan wrote: > If an error happens in ftrace, ftrace_kill() will prevent disarming > kprobes. Eventually, the ftrace_ops associated with the kprobes will be > freed, yet the kprobes will still be active, and when triggered, they > will

Re: [PATCH 2/2] mm/selftests: Don't prefault in gup_longterm tests

2024-04-29 Thread David Hildenbrand
On 29.04.24 15:10, Peter Xu wrote: On Mon, Apr 29, 2024 at 09:28:15AM +0200, David Hildenbrand wrote: On 28.04.24 21:01, Peter Xu wrote: Prefault, especially with RW, makes the GUP test too easy, and may not yet reach the core of the test. For example, R/O longterm pins will just hit,

Re: [PATCH 2/2] mm/selftests: Don't prefault in gup_longterm tests

2024-04-29 Thread Peter Xu
On Mon, Apr 29, 2024 at 09:28:15AM +0200, David Hildenbrand wrote: > On 28.04.24 21:01, Peter Xu wrote: > > Prefault, especially with RW, makes the GUP test too easy, and may not yet > > reach the core of the test. > > > > For example, R/O longterm pins will just hit, pte_write()==true for > >

[PATCH v7 16/16] bpf: remove CONFIG_BPF_JIT dependency on CONFIG_MODULES of

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" BPF just-in-time compiler depended on CONFIG_MODULES because it used module_alloc() to allocate memory for the generated code. Since code allocations are now implemented with execmem, drop dependency of CONFIG_BPF_JIT on CONFIG_MODULES and make it select

[PATCH v7 15/16] kprobes: remove dependency on CONFIG_MODULES

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" kprobes depended on CONFIG_MODULES because it has to allocate memory for code. Since code allocations are now implemented with execmem, kprobes can be enabled in non-modular kernels. Add #ifdef CONFIG_MODULE guards for the code dealing with kprobes inside modules,

[PATCH v7 14/16] powerpc: use CONFIG_EXECMEM instead of CONFIG_MODULES where appropriate

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" There are places where CONFIG_MODULES guards the code that depends on memory allocation being done with module_alloc(). Replace CONFIG_MODULES with CONFIG_EXECMEM in such places. Signed-off-by: Mike Rapoport (IBM) --- arch/powerpc/Kconfig | 2 +-

[PATCH v7 13/16] x86/ftrace: enable dynamic ftrace without CONFIG_MODULES

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Dynamic ftrace must allocate memory for code and this was impossible without CONFIG_MODULES. With execmem separated from the modules code, execmem_text_alloc() is available regardless of CONFIG_MODULES. Remove dependency of dynamic ftrace on CONFIG_MODULES and make

[PATCH v7 12/16] arch: make execmem setup available regardless of CONFIG_MODULES

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" execmem does not depend on modules, on the contrary modules use execmem. To make execmem available when CONFIG_MODULES=n, for instance for kprobes, split execmem_params initialization out from arch/*/kernel/module.c and compile it when CONFIG_EXECMEM=y

[PATCH v7 11/16] powerpc: extend execmem_params for kprobes allocations

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" powerpc overrides kprobes::alloc_insn_page() to remove writable permissions when STRICT_MODULE_RWX is on. Add definition of EXECMEM_KRPOBES to execmem_params to allow using the generic kprobes::alloc_insn_page() with the desired permissions. As powerpc uses

[PATCH v7 10/16] arm64: extend execmem_info for generated code allocations

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" The memory allocations for kprobes and BPF on arm64 can be placed anywhere in vmalloc address space and currently this is implemented with overrides of alloc_insn_page() and bpf_jit_alloc_exec() in arm64. Define EXECMEM_KPROBES and EXECMEM_BPF ranges in

[PATCH v7 09/16] riscv: extend execmem_params for generated code allocations

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" The memory allocations for kprobes and BPF on RISC-V are not placed in the modules area and these custom allocations are implemented with overrides of alloc_insn_page() and bpf_jit_alloc_exec(). Define MODULES_VADDR and MODULES_END as VMALLOC_START and VMALLOC_END

[PATCH v7 08/16] mm/execmem, arch: convert remaining overrides of module_alloc to execmem

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Extend execmem parameters to accommodate more complex overrides of module_alloc() by architectures. This includes specification of a fallback range required by arm, arm64 and powerpc, EXECMEM_MODULE_DATA type required by powerpc, support for allocation of KASAN

[PATCH v7 07/16] mm/execmem, arch: convert simple overrides of module_alloc to execmem

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Several architectures override module_alloc() only to define address range for code allocations different than VMALLOC address space. Provide a generic implementation in execmem that uses the parameters for address space ranges, required alignment and page

[PATCH v7 06/16] mm: introduce execmem_alloc() and execmem_free()

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" module_alloc() is used everywhere as a mean to allocate memory for code. Beside being semantically wrong, this unnecessarily ties all subsystems that need to allocate code, such as ftrace, kprobes and BPF to modules and puts the burden of code allocation to the

[PATCH v7 05/16] module: make module_memory_{alloc,free} more self-contained

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Move the logic related to the memory allocation and freeing into module_memory_alloc() and module_memory_free(). Signed-off-by: Mike Rapoport (IBM) --- kernel/module/main.c | 64 +++- 1 file changed, 39 insertions(+), 25

[PATCH v7 04/16] sparc: simplify module_alloc()

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Define MODULES_VADDR and MODULES_END as VMALLOC_START and VMALLOC_END for 32-bit and reduce module_alloc() to __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, ...) as with the new defines the allocations becomes identical for both 32 and 64 bits.

[PATCH v7 03/16] nios2: define virtual address space for modules

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" nios2 uses kmalloc() to implement module_alloc() because CALL26/PCREL26 cannot reach all of vmalloc address space. Define module space as 32MiB below the kernel base and switch nios2 to use vmalloc for module allocations. Suggested-by: Thomas Gleixner Acked-by:

[PATCH v7 02/16] mips: module: rename MODULE_START to MODULES_VADDR

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" and MODULE_END to MODULES_END to match other architectures that define custom address space for modules. Signed-off-by: Mike Rapoport (IBM) --- arch/mips/include/asm/pgtable-64.h | 4 ++-- arch/mips/kernel/module.c | 4 ++-- arch/mips/mm/fault.c

[PATCH v7 01/16] arm64: module: remove unneeded call to kasan_alloc_module_shadow()

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Since commit f6f37d9320a1 ("arm64: select KASAN_VMALLOC for SW/HW_TAGS modes") KASAN_VMALLOC is always enabled when KASAN is on. This means that allocations in module_alloc() will be tracked by KASAN protection for vmalloc() and that kasan_alloc_module_shadow() will

[PATCH v7 00/16] mm: jit/text allocator

2024-04-29 Thread Mike Rapoport
From: "Mike Rapoport (IBM)" Hi, The patches are also available in git: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git/log/?h=execmem/v7 v7 changes: * define MODULE_{VADDR,END} for riscv32 to fix the build and avoid #ifdefs in a function body * add Acks, thanks everybody v6:

[PATCH 4/4] ASoC: uniphier: Constify static snd_pcm_hardware

2024-04-29 Thread Krzysztof Kozlowski
Static 'struct snd_pcm_hardware' is not modified by the driver and its copy is passed to the core, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/uniphier/aio-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 3/4] ASoC: meson: Constify static snd_pcm_hardware

2024-04-29 Thread Krzysztof Kozlowski
Static 'struct snd_pcm_hardware' is not modified by the driver and its copy is passed to the core, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/meson/aiu-fifo-i2s.c | 2 +- sound/soc/meson/aiu-fifo-spdif.c | 2 +-

[PATCH 2/4] ASoC: fsl: Constify static snd_pcm_hardware

2024-04-29 Thread Krzysztof Kozlowski
Static 'struct snd_pcm_hardware' is not modified by the driver and its copy is passed to the core, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/fsl/imx-pcm-rpmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/4] ASoC: qcom: Constify static snd_pcm_hardware

2024-04-29 Thread Krzysztof Kozlowski
Static 'struct snd_pcm_hardware' is not modified by the driver and its copy is passed to the core, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski --- sound/soc/qcom/qdsp6/q6apm-dai.c | 4 ++-- sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +- 2 files changed, 3

[PATCH 0/4] ASoC: Constify static snd_pcm_hardware

2024-04-29 Thread Krzysztof Kozlowski
+- sound/soc/meson/axg-fifo.c | 2 +- sound/soc/qcom/qdsp6/q6apm-dai.c | 4 ++-- sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +- sound/soc/uniphier/aio-dma.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) --- base-commit: ebbaba914053d8bcadd7d64eb8d2555299509a27 change-id: 20240429-n-asoc

Re: [EXT] [PATCH v8 6/6] docs: trusted-encrypted: add DCP as new trust source

2024-04-29 Thread David Gstir
Hi Kshitiz, > On 09.04.2024, at 11:48, Kshitiz Varshney wrote: > > Hi Jarkko, > > >> -Original Message- >> From: Jarkko Sakkinen >> Sent: Wednesday, April 3, 2024 9:18 PM >> To: David Gstir ; Mimi Zohar ; >> James Bottomley ; Herbert Xu >> ; David S. Miller >> Cc: Shawn Guo ;

Re: [PATCH v3 11/11] sysctl: treewide: constify the ctl_table argument of handlers

2024-04-29 Thread Heiko Carstens
On Tue, Apr 23, 2024 at 09:54:46AM +0200, Thomas Weißschuh wrote: > Adapt the proc_hander function signature to make it clear that handlers > are not supposed to modify their ctl_table argument. > > This is a prerequisite to moving the static ctl_table structs into > rodata. > By migrating all

[PATCH 1/2] PCI/ERR: Cleanup misleading indentation inside if conditions

2024-04-29 Thread Ilpo Järvinen
A few if conditions align misleadingly with the following code block. The checks are really cascading NULL checks that fit into 80 chars so remove newlines in between and realign to the if condition indent. Signed-off-by: Ilpo Järvinen --- drivers/pci/pcie/err.c | 12 +++- 1 file

Re: [PATCH 2/2] mm/selftests: Don't prefault in gup_longterm tests

2024-04-29 Thread David Hildenbrand
On 28.04.24 21:01, Peter Xu wrote: Prefault, especially with RW, makes the GUP test too easy, and may not yet reach the core of the test. For example, R/O longterm pins will just hit, pte_write()==true for whatever cases, the unsharing logic won't be ever tested. This patch remove the

Re: [PATCH 1/2] mm/gup: Fix hugepd handling in hugetlb rework

2024-04-29 Thread David Hildenbrand
On 28.04.24 21:01, Peter Xu wrote: Commit a12083d721d7 added hugepd handling for gup-slow, reusing gup-fast functions. follow_hugepd() correctly took the vma pointer in, however didn't pass it over into the lower functions, which was overlooked. The issue is gup_fast_hugepte() uses the vma