Re: [PATCH v2 13/13] arch, mm: make releasing of memory to page allocator more explicit

2025-03-13 Thread Geert Uytterhoeven
On Thu, 13 Mar 2025 at 14:53, Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > The point where the memory is released from memblock to the buddy allocator > is hidden inside arch-specific mem_init()s and the call to > memblock_free_all() is needlessly duplicated in every artiste cure

Re: [PATCH] bus: fsl-mc: Remove deadcode

2025-03-13 Thread Dr. David Alan Gilbert
* Christophe Leroy (christophe.le...@csgroup.eu) wrote: > > > Le 15/11/2024 à 16:20, li...@treblig.org a écrit : > > [Vous ne recevez pas souvent de courriers de li...@treblig.org. Découvrez > > pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification > > ] > > > > From: "Dr

[PATCH v2 05/13] MIPS: make setup_zero_pages() use memblock

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Allocating the zero pages from memblock is simpler because the memory is already reserved. This will also help with pulling out memblock_free_all() to the generic code and reducing code duplication in arch::mem_init(). Signed-off-by: Mike Rapoport (Microsoft)

Re: [PATCH] bus: fsl-mc: Remove deadcode

2025-03-13 Thread Dr. David Alan Gilbert
Hi Greg, * Ioana Ciornei (ioana.cior...@nxp.com) wrote: > On Thu, Mar 13, 2025 at 02:37:56PM +0100, Christophe Leroy wrote: > > > > > > Le 13/03/2025 à 14:21, Dr. David Alan Gilbert a écrit : > > > [Vous ne recevez pas souvent de courriers de li...@treblig.org. Découvrez > > > pourquoi ceci est

[PATCH v2 09/13] arch, mm: set max_mapnr when allocating memory map for FLATMEM

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" max_mapnr is essentially the size of the memory map for systems that use FLATMEM. There is no reason to calculate it in each and every architecture when it's anyway calculated in alloc_node_mem_map(). Drop setting of max_mapnr from architecture code and set it o

Re: [PATCH v4 07/14] arm64: Add support for suppressing warning backtraces

2025-03-13 Thread Will Deacon
On Thu, Mar 13, 2025 at 11:43:22AM +, Alessandro Carminati wrote: > diff --git a/arch/arm64/include/asm/bug.h b/arch/arm64/include/asm/bug.h > index 28be048db3f6..044c5e24a17d 100644 > --- a/arch/arm64/include/asm/bug.h > +++ b/arch/arm64/include/asm/bug.h > @@ -11,8 +11,14 @@ > > #include

[PATCH v2 11/13] arch, mm: streamline HIGHMEM freeing

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" All architectures that support HIGHMEM have their code that frees high memory pages to the buddy allocator while __free_memory_core() is limited to freeing only low memory. There is no actual reason for that. The memory map is completely ready by the time memblo

Re: [PATCH v4 net-next 01/14] net: enetc: add initial netc-lib driver to support NTMP

2025-03-13 Thread Vladimir Oltean
On Tue, Mar 11, 2025 at 01:38:17PM +0800, Wei Fang wrote: > +int ntmp_rsst_query_or_update_entry(struct netc_cbdrs *cbdrs, u32 *table, > + int count, bool query) > +{ > + struct ntmp_dma_buf data = {.dev = cbdrs->dma_dev}; > + struct rsst_req_update *requ; >

[PATCH bpf-next 09/11] bpf: Return PTR_ERR from push_stack()

2025-03-13 Thread Luis Gerhorst
Main reason is, that it will later allow us to fall back to a nospec for certain errors in push_stack(). This changes the sanitization-case to returning -ENOMEM. However, this is more fitting as -EFAULT would indicate a verifier-internal bug. Signed-off-by: Luis Gerhorst Acked-by: Henriette Herz

[PATCH bpf-next 04/11] bpf, arm64, powerpc: Add bpf_jit_bypass_spec_v1/v4()

2025-03-13 Thread Luis Gerhorst
JITs can set bpf_jit_bypass_spec_v1/v4() if they want the verifier to skip analysis/patching for the respective vulnerability. For v4, this will reduce the number of barriers the verifier inserts. For v1, it allows more programs to be accepted. The primary motivation for this is to not regress unp

[PATCH bpf-next 06/11] bpf: Rename sanitize_stack_spill to nospec_result

2025-03-13 Thread Luis Gerhorst
This is made to clarify that this flag will cause a nospec to be added after this insn and can therefore be relied upon to reduce speculative path analysis. Signed-off-by: Luis Gerhorst Cc: Henriette Herzog Cc: Maximilian Ott Cc: Milan Stephan --- include/linux/bpf_verifier.h | 2 +- kernel/b

[PATCH v4 11/14] sh: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACK

[PATCH bpf-next 05/11] bpf, arm64, powerpc: Change nospec to include v1 barrier

2025-03-13 Thread Luis Gerhorst
This changes the semantics of BPF_NOSPEC (previously a v4-only barrier) to always emit a speculation barrier that works against both Spectre v1 AND v4. If mitigation is not needed on an architecture, the backend should set bpf_jit_bypass_spec_v4/v1(). As of now, this commit only has the user-visib

[PATCH v4 01/14] bug/kunit: Core support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Some unit tests intentionally trigger warning backtraces by passing bad parameters to API functions. Such unit tests typically check the return value from those calls, not the existence of the warning backtrace. Such intentionally generated warning backtraces are neither desi

[PATCH v4 00/14] Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
Some unit tests intentionally trigger warning backtraces by passing bad parameters to kernel API functions. Such unit tests typically check the return value from such calls, not the existence of the warning backtrace. Such intentionally generated warning backtraces are neither desirable nor useful

[PATCH v4 07/14] arm64: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACK

[PATCH v4 1/4] dt-bindings: mtd: raw-nand-chip: Relax node name pattern

2025-03-13 Thread J . Neuschäfer via B4 Relay
From: "J. Neuschäfer" In some scenarios, such as under the Freescale eLBC bus, there are raw NAND chips with a unit address that has a comma in it (cs,offset). For reasons of compatibility with historical device trees and readability of the unit addresses, this format is kept. Relax the $nodenam

[PATCH v4 4/4] dt-bindings: memory-controllers: Convert fsl,elbc to YAML

2025-03-13 Thread J . Neuschäfer via B4 Relay
From: "J. Neuschäfer" Convert the Freescale localbus controller bindings from text form to YAML. Compared to the .txt version, the YAML binding contains a new usage example with FCM NAND flash, and a full list of compatible strings based on current usage in arch/powerpc/boot/dts/. Note that the

[PATCH v4 3/4] dt-bindings: nand: Add fsl,elbc-fcm-nand

2025-03-13 Thread J . Neuschäfer via B4 Relay
From: "J. Neuschäfer" Formalize the binding already supported by the fsl_elbc_nand.c driver and used in several device trees in arch/powerpc/boot/dts/. raw-nand-chip.yaml is referenced in order to accommodate situations in which the ECC parameters settings are set in the device tree. One such ex

[PATCH v4 0/4] Freescale Enhanced Local Bus Controller (eLBC) binding YAML conversion

2025-03-13 Thread J . Neuschäfer via B4 Relay
This series converts the fsl,elbc binding to YAML and adds new bindings for related devices (particular kinds of chip on the eLBC). For readability, the existing unit address syntax of , (e.g. nand@1,0) is kept. This results in a few dtc validation warnings, when combined with other choices in thi

[PATCH v2 00/13] arch, mm: reduce code duplication in mem_init()

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Hi, Every architecture has implementation of mem_init() function and some even more than one. All these release free memory to the buddy allocator, most of them set high_memory to the end of directly addressable memory and many of them set max_mapnr for FLATMEM

Re: [PATCH] bus: fsl-mc: Remove deadcode

2025-03-13 Thread Christophe Leroy
Le 13/03/2025 à 14:21, Dr. David Alan Gilbert a écrit : [Vous ne recevez pas souvent de courriers de li...@treblig.org. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] * Christophe Leroy (christophe.le...@csgroup.eu) wrote: Le 15/11/2024 à 16:20, li

[PATCH v2 01/13] arm: mem_init: use memblock_phys_free() to free DMA memory on SA1111

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" This will help to pull out memblock_free_all() to generic code. Signed-off-by: Mike Rapoport (Microsoft) --- arch/arm/mm/init.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 5345d21889

[PATCH v2 02/13] csky: move setup_initrd() to setup.c

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Memory used by initrd should be reserved as soon as possible before there any memblock allocations that might overwrite that memory. This will also help with pulling out memblock_free_all() to the generic code and reducing code duplication in arch::mem_init().

[PATCH v2 04/13] MIPS: consolidate mem_init() for NUMA machines

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Both MIPS systems that support numa (loongsoon3 and sgi-ip27) have identical mem_init() for NUMA case. Move that into arch/mips/mm/init.c and drop duplicate per-machine definitions. Signed-off-by: Mike Rapoport (Microsoft) --- arch/mips/loongson64/numa.c

Re: [PATCH v4 net-next 00/14] Add more feautues for ENETC v4 - round 2

2025-03-13 Thread Vladimir Oltean
On Tue, Mar 11, 2025 at 01:38:16PM +0800, Wei Fang wrote: > This patch set adds the following features. > 1. Compared with ENETC v1, the formats of tables and command BD of ENETC > v4 have changed significantly, and the two are not compatible. Therefore, > in order to support the NETC Table Managem

[PATCH v2 03/13] hexagon: move initialization of init_mm.context init to paging_init()

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" This will help with pulling out memblock_free_all() to the generic code and reducing code duplication in arch::mem_init(). Signed-off-by: Mike Rapoport (Microsoft) --- arch/hexagon/mm/init.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-)

[PATCH v2 12/13] arch, mm: introduce arch_mm_preinit

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Currently, implementation of mem_init() in every architecture consists of one or more of the following: * initializations that must run before page allocator is active, for instance swiotlb_init() * a call to memblock_free_all() to release all the memory to th

[PATCH v2 10/13] arch, mm: set high_memory in free_area_init()

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" high_memory defines upper bound on the directly mapped memory. This bound is defined by the beginning of ZONE_HIGHMEM when a system has high memory and by the end of memory otherwise. All this is known to generic memory management initialization code that can se

[PATCH v2 08/13] xtensa: split out printing of virtual memory layout to a function

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" This will help with pulling out memblock_free_all() to the generic code and reducing code duplication in arch::mem_init(). Signed-off-by: Mike Rapoport (Microsoft) --- arch/xtensa/mm/init.c | 97 ++- 1 file changed, 50 i

Re: [PATCH] bus: fsl-mc: Remove deadcode

2025-03-13 Thread Ioana Ciornei
On Thu, Mar 13, 2025 at 02:37:56PM +0100, Christophe Leroy wrote: > > > Le 13/03/2025 à 14:21, Dr. David Alan Gilbert a écrit : > > [Vous ne recevez pas souvent de courriers de li...@treblig.org. Découvrez > > pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification > > ] > >

[PATCH v2 13/13] arch, mm: make releasing of memory to page allocator more explicit

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" The point where the memory is released from memblock to the buddy allocator is hidden inside arch-specific mem_init()s and the call to memblock_free_all() is needlessly duplicated in every artiste cure and after introduction of arch_mm_preinit() hook, mem_init()

Re: [PATCH v6 0/3] printf: convert self-test to KUnit

2025-03-13 Thread Petr Mladek
On Fri 2025-03-07 17:08:55, Tamir Duberstein wrote: > This is one of just 3 remaining "Test Module" kselftests (the others > being bitmap and scanf), the rest having been converted to KUnit. > > I tested this using: > > $ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 printf

Re: [PATCH v6 0/3] printf: convert self-test to KUnit

2025-03-13 Thread Petr Mladek
On Sat 2025-03-08 07:52:49, Tamir Duberstein wrote: > On Sat, Mar 8, 2025 at 7:51 AM Tamir Duberstein wrote: > > > > On Fri, Mar 7, 2025 at 11:49 PM Kees Cook wrote: > > > > > > On Fri, Mar 07, 2025 at 05:08:55PM -0500, Tamir Duberstein wrote: > > > > This is one of just 3 remaining "Test Module"

[PATCH v2 07/13] s390: make setup_zero_pages() use memblock

2025-03-13 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Allocating the zero pages from memblock is simpler because the memory is already reserved. This will also help with pulling out memblock_free_all() to the generic code and reducing code duplication in arch::mem_init(). Acked-by: Heiko Carstens Signed-off-by: M

[PATCH v4 02/14] kunit: bug: Count suppressed warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Count suppressed warning backtraces to enable code which suppresses warning backtraces to check if the expected backtrace(s) have been observed. Using atomics for the backtrace count resulted in build errors on some architectures due to include file recursion, so use a plain

[PATCH v4 12/14] sh: Move defines needed for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Declaring the defines needed for suppressing warning inside '#ifdef CONFIG_DEBUG_BUGVERBOSE' results in a kerneldoc warning. .../bug.h:29: warning: expecting prototype for _EMIT_BUG_ENTRY(). Prototype was for HAVE_BUG_FUNCTION() instead Move the defines above the ker

[PATCH v4 14/14] powerpc: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACK

[PATCH v4 04/14] kunit: Add documentation for warning backtrace suppression API

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Document API functions for suppressing warning backtraces. Tested-by: Linux Kernel Functional Testing Acked-by: Dan Carpenter Reviewed-by: Kees Cook Signed-off-by: Guenter Roeck Reviewed-by: David Gow Signed-off-by: Alessandro Carminati --- Documentation/dev-tools/kuni

[PATCH v4 08/14] loongarch: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACK

[PATCH v4 06/14] x86: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACK

[PATCH bpf-next 02/11] bpf: Return -EFAULT on misconfigurations

2025-03-13 Thread Luis Gerhorst
Mark these cases as non-recoverable to later prevent them from being cought when they occur during speculative path verification. Signed-off-by: Luis Gerhorst Acked-by: Henriette Herzog Cc: Maximilian Ott Cc: Milan Stephan --- kernel/bpf/verifier.c | 36 ++-- 1

Re: [PATCH v4 07/14] arm64: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
Hello Will, On Thu, Mar 13, 2025 at 1:25 PM Will Deacon wrote: > > On Thu, Mar 13, 2025 at 11:43:22AM +, Alessandro Carminati wrote: > > diff --git a/arch/arm64/include/asm/bug.h b/arch/arm64/include/asm/bug.h > > index 28be048db3f6..044c5e24a17d 100644 > > --- a/arch/arm64/include/asm/bug.h

[PATCH bpf-next 00/11] bpf: Mitigate Spectre v1 using barriers

2025-03-13 Thread Luis Gerhorst
This improves the expressiveness of unprivileged BPF by inserting speculation barriers instead of rejecting the programs. The approach was previously presented at LPC'24 [1] and RAID'24 [2]. To mitigate the Spectre v1 (PHT) vulnerability, the kernel rejects potentially-dangerous unprivileged BPF

[PATCH bpf-next 01/11] bpf: Move insn if/else into do_check_insn()

2025-03-13 Thread Luis Gerhorst
This is required to catch the errors later and fall back to a nospec if on a speculative path. Move code into do_check_insn(), replace * "continue" with "return INSN_IDX_MODIFIED" * "goto process_bpf_exit" with "return PROCESS_BPF_EXIT" * "do_print_state = " with "*do_print_state = " Signed-off-b

[PATCH bpf-next 08/11] bpf: Allow nospec-protected var-offset stack access

2025-03-13 Thread Luis Gerhorst
Insert a nospec before the access to prevent it from ever using an index that is subject to speculative scalar-confusion. Signed-off-by: Luis Gerhorst Acked-by: Henriette Herzog Cc: Maximilian Ott Cc: Milan Stephan --- kernel/bpf/verifier.c | 24 1 file changed, 12 in

[PATCH bpf-next 03/11] bpf: Return -EFAULT on internal errors

2025-03-13 Thread Luis Gerhorst
This prevents us from trying to recover from these on speculative paths in the future. Signed-off-by: Luis Gerhorst Acked-by: Henriette Herzog Cc: Maximilian Ott Cc: Milan Stephan --- kernel/bpf/verifier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/bpf/ve

[PATCH v4 09/14] parisc: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACK

[PATCH v4 10/14] s390: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACK

Re: [PATCH v2 00/13] arch, mm: reduce code duplication in mem_init()

2025-03-13 Thread Mark Brown
On Thu, Mar 13, 2025 at 03:49:50PM +0200, Mike Rapoport wrote: > v2 changes: > * don't use generic version for setting high_memory on architectures > that use that varialble earlier than free_area_init() > * use memblock_alloc_or_panig() to allocate zero pages on MIPS and s390 > * fix alignment

Re: [PATCH v4 00/14] Add support for suppressing warning backtraces

2025-03-13 Thread Maxime Ripard
Hi, On Thu, Mar 13, 2025 at 10:17:49AM -0700, Kees Cook wrote: > On Thu, Mar 13, 2025 at 11:43:15AM +, Alessandro Carminati wrote: > > Some unit tests intentionally trigger warning backtraces by passing bad > > parameters to kernel API functions. Such unit tests typically check the > > return

Re: [PATCH v4 00/14] Add support for suppressing warning backtraces

2025-03-13 Thread Guenter Roeck
On Thu, Mar 13, 2025 at 06:24:25PM +0100, Maxime Ripard wrote: > > > > Yeah, as with my prior review, I'm a fan of this. It makes a bunch of my > > very noisy tests much easier to deal with. > > And for the record, we're also affected by this in DRM and would very > much like to get it merged in

Re: [PATCH v4 net-next 02/14] net: enetc: add command BD ring support for i.MX95 ENETC

2025-03-13 Thread Vladimir Oltean
On Tue, Mar 11, 2025 at 01:38:18PM +0800, Wei Fang wrote: > The command BD ring is used to configure functionality where the > underlying resources may be shared between different entities or being > too large to configure using direct registers (such as lookup tables). > > Because the command BD

Re: [PATCH v4 00/14] Add support for suppressing warning backtraces

2025-03-13 Thread Kees Cook
On Thu, Mar 13, 2025 at 11:43:15AM +, Alessandro Carminati wrote: > Some unit tests intentionally trigger warning backtraces by passing bad > parameters to kernel API functions. Such unit tests typically check the > return value from such calls, not the existence of the warning backtrace. Than

Re: [PATCH v2 08/13] xtensa: split out printing of virtual memory layout to a function

2025-03-13 Thread Max Filippov
On Thu, Mar 13, 2025 at 4:52 PM Mike Rapoport wrote: > > From: "Mike Rapoport (Microsoft)" > > This will help with pulling out memblock_free_all() to the generic > code and reducing code duplication in arch::mem_init(). > > Signed-off-by: Mike Rapoport (Microsoft) > --- > arch/xtensa/mm/init.c

Re: [PATCH v6 0/3] printf: convert self-test to KUnit

2025-03-13 Thread Kees Cook
On Fri, 07 Mar 2025 17:08:55 -0500, Tamir Duberstein wrote: > This is one of just 3 remaining "Test Module" kselftests (the others > being bitmap and scanf), the rest having been converted to KUnit. > > I tested this using: > > $ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1

[PATCH v4 2/4] dt-bindings: memory-controllers: Add fsl,elbc-gpcm-uio

2025-03-13 Thread J . Neuschäfer via B4 Relay
From: "J. Neuschäfer" Formalize the binding already supported by the uio_fsl_elbc_gpcm.c driver. Reviewed-by: Frank Li Reviewed-by: Rob Herring (Arm) Signed-off-by: J. Neuschäfer --- V4: - no changes V3: - add review tags V2: - split out from fsl,elbc patch - add description - remove "devi

Re: [PATCH v13 04/11] mm/page_table_check: Reinstate address parameter in [__]page_table_check_pud_clear()

2025-03-13 Thread Andrew Morton
On Wed, 12 Feb 2025 03:13:57 +1100 Andrew Donnellan wrote: > This reverts commit 931c38e16499 ("mm/page_table_check: remove unused > parameter in [__]page_table_check_pud_clear"). > > Reinstate previously unused parameters for the purpose of supporting > powerpc platforms, as many do not encode

RE: [PATCH v4 net-next 00/14] Add more feautues for ENETC v4 - round 2

2025-03-13 Thread Wei Fang
> On Tue, Mar 11, 2025 at 01:38:16PM +0800, Wei Fang wrote: > > This patch set adds the following features. > > 1. Compared with ENETC v1, the formats of tables and command BD of ENETC > > v4 have changed significantly, and the two are not compatible. Therefore, > > in order to support the NETC Tab

Re: [PATCH v4 00/14] Add support for suppressing warning backtraces

2025-03-13 Thread Andrew Morton
On Thu, 13 Mar 2025 11:31:12 -0700 Guenter Roeck wrote: > On Thu, Mar 13, 2025 at 06:24:25PM +0100, Maxime Ripard wrote: > > > > > > Yeah, as with my prior review, I'm a fan of this. It makes a bunch of my > > > very noisy tests much easier to deal with. > > > > And for the record, we're also a

[PATCH bpf-next 10/11] bpf: Fall back to nospec for sanitization-failures

2025-03-13 Thread Luis Gerhorst
ALU sanitization was introduced to ensure that a subsequent ptr access can never go OOBs, even under speculation. This is required because we currently allow speculative scalar confusion. This is the case because Spectre v4 sanitization only adds a nospec after critical stores (e.g., scalar overwri

[PATCH v4 13/14] riscv: Add support for suppressing warning backtraces

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACK

[PATCH bpf-next 07/11] bpf: Fall back to nospec for Spectre v1

2025-03-13 Thread Luis Gerhorst
This implements the core of the series and causes the verifier to fall back to mitigating Spectre v1 using speculation barriers. The approach was presented at LPC'24 [1] and RAID'24 [2]. This has the unfortunate consequence that Spectre v1 mitigations now only support architectures which implement

Re: [PATCH v13 00/11] Support page table check on PowerPC

2025-03-13 Thread Andrew Morton
On Thu, 13 Mar 2025 13:54:39 +1100 Andrew Donnellan wrote: > On Wed, 2025-02-12 at 03:13 +1100, Andrew Donnellan wrote: > > Support page table check on all PowerPC platforms. This works by > > serialising assignments, reassignments and clears of page table > > entries at each level in order to en

Re: [PATCH] [POWERPC] ps3: fix error handling in ps3_system_bus_device_register()

2025-03-13 Thread Geert Uytterhoeven
Hi Ma, On Thu, 13 Mar 2025 at 09:03, Ma Ke wrote: > Once device_register() failed, we should call put_device() to > decrement reference count for cleanup. Or it could cause memory leak. > > As comment of device_register() says, 'NOTE: _Never_ directly free > @dev after calling this function, even

Re: [PATCH v12 2/4] arch_topology: Support SMT control for OF based system

2025-03-13 Thread Jonathan Cameron
On Tue, 11 Mar 2025 15:51:41 +0800 Yicong Yang wrote: > From: Yicong Yang > > On building the topology from the devicetree, we've already gotten the > SMT thread number of each core. Update the largest SMT thread number > and enable the SMT control by the end of topology parsing. > > The frame

Re: [PATCH 2/4] spufs: fix gang directory lifetimes

2025-03-13 Thread Christian Brauner
On Thu, Mar 13, 2025 at 04:29:01AM +, Al Viro wrote: > prior to "[POWERPC] spufs: Fix gang destroy leaks" we used to have > a problem with gang lifetimes - creation of a gang returns opened > gang directory, which normally gets removed when that gets closed, > but if somebody has created a cont

Re: [PATCH 3/4] spufs: fix a leak in spufs_create_context()

2025-03-13 Thread Christian Brauner
On Thu, Mar 13, 2025 at 04:29:32AM +, Al Viro wrote: > Leak fixes back in 2008 missed one case - if we are trying to set affinity > and spufs_mkdir() fails, we need to drop the reference to neighbor. > > Fixes: 58119068cb27 "[POWERPC] spufs: Fix memory leak on SPU affinity" > Signed-off-by: Al

Re: [PATCH] powerpc/powermac: Drop the unused debug macro

2025-03-13 Thread Denis Kirjanov
On Sat, Jan 25, 2025 at 12:47 PM Denis Kirjanov wrote: > > Drop the unused DBG macro > > Signed-off-by: Denis Kirjanov > --- Hello, ping? > arch/powerpc/platforms/powermac/feature.c | 8 > arch/powerpc/platforms/powermac/smp.c | 8 > arch/powerpc/platforms/powermac/time.c

[PATCH] [POWERPC] ps3: fix error handling in ps3_system_bus_device_register()

2025-03-13 Thread Ma Ke
Once device_register() failed, we should call put_device() to decrement reference count for cleanup. Or it could cause memory leak. As comment of device_register() says, 'NOTE: _Never_ directly free @dev after calling this function, even if it returned an error! Always use put_device() to give up

Re: [kvm-unit-tests PATCH v2] Makefile: Use CFLAGS in cc-option

2025-03-13 Thread Thomas Huth
On 07/03/2025 10.18, Andrew Jones wrote: When cross compiling with clang we need to specify the target in CFLAGS and cc-option will fail to recognize target-specific options without it. Add CFLAGS to the CC invocation in cc-option. The introduction of the realmode_bits variable is necessary to a

Re: [kvm-unit-tests PATCH v2] Makefile: Use CFLAGS in cc-option

2025-03-13 Thread Alexandru Elisei
Hi Drew, Thank you for debugging this. I tested the patch by compiling the MTE test from Vladimir with clang and it works now: Tested-by: Alexandru Elisei Thanks, Alex On Fri, Mar 07, 2025 at 10:18:29AM +0100, Andrew Jones wrote: > When cross compiling with clang we need to specify the target

Re: [PATCH 1/4] spufs: fix a leak on spufs_new_file() failure

2025-03-13 Thread Christian Brauner
On Thu, Mar 13, 2025 at 04:28:15AM +, Al Viro wrote: > It's called from spufs_fill_dir(), and caller of that will do > spufs_rmdir() in case of failure. That does remove everything > we'd managed to create, but... the problem dentry is still > negative. IOW, it needs to be explicitly dropped.

[PATCH 2/4] spufs: fix gang directory lifetimes

2025-03-13 Thread Al Viro
prior to "[POWERPC] spufs: Fix gang destroy leaks" we used to have a problem with gang lifetimes - creation of a gang returns opened gang directory, which normally gets removed when that gets closed, but if somebody has created a context belonging to that gang and kept it alive until the gang got c

Re: [PATCH v3] KVM: PPC: Enable CAP_SPAPR_TCE_VFIO on pSeries KVM guests

2025-03-13 Thread Madhavan Srinivasan
On Thu, 20 Feb 2025 12:30:02 +0530, Amit Machhiwal wrote: > Currently on book3s-hv, the capability KVM_CAP_SPAPR_TCE_VFIO is only > available for KVM Guests running on PowerNV and not for the KVM guests > running on pSeries hypervisors. This prevents a pSeries L2 guest from > leveraging the in-kern

Re: [PATCH] powerpc: Fix 'intra_function_call not a direct call' warning

2025-03-13 Thread Madhavan Srinivasan
On Wed, 05 Mar 2025 00:00:19 +0100, Christophe Leroy wrote: > The following build warning have been reported: > > arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xe84: > intra_function_call not a direct call > arch/powerpc/kernel/switch.o: warning: objtool: .text+0x4: > int

Re: [PATCH] crypto: powerpc: Mark ghashp8-ppc.o as an OBJECT_FILES_NON_STANDARD

2025-03-13 Thread Madhavan Srinivasan
On Wed, 05 Mar 2025 00:02:39 +0100, Christophe Leroy wrote: > The following build warning has been reported: > > arch/powerpc/crypto/ghashp8-ppc.o: warning: objtool: .text+0x22c: > unannotated intra-function call > > This happens due to commit bb7f054f4de2 ("objtool/powerpc: Add support > for

[PATCH 5/6] powerpc: powenv: oxcl: use lock guard for mutex

2025-03-13 Thread Shrikanth Hegde
use guard(mutex) for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u Signed-off-by: Shrikanth Hegde --- arch/powerpc/platforms/p

Re: [PATCH 5/6] powerpc: powenv: oxcl: use lock guard for mutex

2025-03-13 Thread Shrikanth Hegde
On 3/14/25 11:36, Andrew Donnellan wrote: On Fri, 2025-03-14 at 11:15 +0530, Shrikanth Hegde wrote: use guard(mutex) for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/

RE: [PATCH v4 net-next 01/14] net: enetc: add initial netc-lib driver to support NTMP

2025-03-13 Thread Wei Fang
> On Tue, Mar 11, 2025 at 01:38:17PM +0800, Wei Fang wrote: > > +int ntmp_rsst_query_or_update_entry(struct netc_cbdrs *cbdrs, u32 *table, > > + int count, bool query) > > +{ > > + struct ntmp_dma_buf data = {.dev = cbdrs->dma_dev}; > > + struct rsst_req_update *re

[PATCH 6/6] powerpc: sysdev: use lock guard for mutex

2025-03-13 Thread Shrikanth Hegde
use guard(mutex) for scope based resource management of mutex This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u Signed-off-by: Shrikanth Hegde --- arch/powerpc/sysdev/fsl_m

[PATCH 2/6] powerpc: rtas: use lock guard for mutex

2025-03-13 Thread Shrikanth Hegde
use guard(mutex) for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u Signed-off-by: Shrikanth Hegde --- arch/powerpc/kernel/rtas

[PATCH 4/6] powerpc: book3s: vas: use lock guard for mutex

2025-03-13 Thread Shrikanth Hegde
use guard(mutex) for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u There is also an example of using scoped_guard. Signed-off-

[PATCH 3/6] powerpc: fadump: use lock guard for mutex

2025-03-13 Thread Shrikanth Hegde
use guard(mutex) for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u Signed-off-by: Shrikanth Hegde --- arch/powerpc/kernel/fadu

[PATCH 0/6] powerpc: use lock guards for mutex Set 1

2025-03-13 Thread Shrikanth Hegde
This is an effort to make the code simpler by making use of lock guards which were introduced in [1], which works by using __cleanup attributes. [1]: https://lkml.kernel.org/r/20230612093537.614161713%40infradead.org This series aims mainly at simplifying code around mutex with goto statements.

RE: [PATCH v4 net-next 02/14] net: enetc: add command BD ring support for i.MX95 ENETC

2025-03-13 Thread Wei Fang
> On Tue, Mar 11, 2025 at 01:38:18PM +0800, Wei Fang wrote: > > The command BD ring is used to configure functionality where the > > underlying resources may be shared between different entities or being > > too large to configure using direct registers (such as lookup tables). > > > > Because the

[PATCH 1/6] powerpc: eeh: use lock guard for mutex

2025-03-13 Thread Shrikanth Hegde
use guard(mutex) for scope based resource management of mutex. This would make the code simpler and easier to maintain. More details on lock guards can be found at https://lore.kernel.org/all/20230612093537.614161...@infradead.org/T/#u Signed-off-by: Shrikanth Hegde --- arch/powerpc/kernel/eeh.

Re: [PATCH] powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7

2025-03-13 Thread Madhavan Srinivasan
On Mon, 13 Jan 2025 18:19:09 +0100, Andreas Schwab wrote: > Similar to the PowerMac3,1, the PowerBook6,7 is missing the #size-cells > property on the i2s node. > > Applied to powerpc/next. [1/1] powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7 https://git.kernel.org/powerpc/c/

[PATCH v4 03/14] kunit: Add test cases for backtrace warning suppression

2025-03-13 Thread Alessandro Carminati
From: Guenter Roeck Add unit tests to verify that warning backtrace suppression works. If backtrace suppression does _not_ work, the unit tests will likely trigger unsuppressed backtraces, which should actually help to get the affected architectures / platforms fixed. Tested-by: Linux Kernel Fu