Re: [PATCH v2 2/2] ftrace: Consolidate ftrace_regs accessor functions for archs using pt_regs

2024-10-09 Thread Steven Rostedt
Loongarch maintainers, please note the below comments! On Tue, 08 Oct 2024 19:05:29 -0400 Steven Rostedt wrote: > diff --git a/arch/arm64/include/asm/ftrace.h b/arch/arm64/include/asm/ftrace.h > index bbb69c7751b9..5ccff4de7f09 100644 > --- a/arch/arm64/include/asm/ftrace.h > +++ b/arch/arm

[PATCH] powerpc/vdso: Flag VDSO64 entry points as functions

2024-10-09 Thread Christophe Leroy
On powerpc64 as shown below by readelf, vDSO functions symbols have type NOTYPE. $ powerpc64-linux-gnu-readelf -a arch/powerpc/kernel/vdso/vdso64.so.dbg ELF Header: Magic: 7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data:

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

2024-10-09 Thread Song Liu
On Wed, Oct 9, 2024 at 11:10 AM Mike Rapoport wrote: [...] > diff --git a/include/linux/module.h b/include/linux/module.h > index 88ecc5e9f523..7039f609c6ef 100644 > --- a/include/linux/module.h > +++ b/include/linux/module.h > @@ -367,6 +367,8 @@ enum mod_mem_type { > > struct module_memory { >

[PATCH v2 1/2] powerpc: Fix stack protector Kconfig test for clang

2024-10-09 Thread Nathan Chancellor
Clang's in-progress per-task stack protector support [1] does not work with the current Kconfig checks because '-mstack-protector-guard-offset' is not provided, unlike all other architecture Kconfig checks. $ fd Kconfig -x rg -l mstack-protector-guard-offset ./arch/arm/Kconfig ./arch/riscv/K

[PATCH v2 0/2] powerpc: Prepare for clang's per-task stack protector support

2024-10-09 Thread Nathan Chancellor
This series prepares the powerpc Kconfig and Kbuild files for clang's per-task stack protector support. clang requires '-mstack-protector-guard-offset' to always be passed with the other '-mstack-protector-guard' flags, which does not always happen with the powerpc implementation, unlike arm, arm64

[PATCH v2 2/2] powerpc: Adjust adding stack protector flags to KBUILD_CLAGS for clang

2024-10-09 Thread Nathan Chancellor
After fixing the HAVE_STACKPROTECTER checks for clang's in-progress per-task stack protector support [1], the build fails during prepare0 because '-mstack-protector-guard-offset' has not been added to KBUILD_CFLAGS yet but the other '-mstack-protector-guard' flags have. clang: error: '-mstack-pr

Re: [PATCH 5/5] [RFC] mm: Remove MAP_UNINITIALIZED support

2024-10-09 Thread Lorenzo Stoakes
On Thu, Sep 26, 2024 at 01:54:09PM +, Arnd Bergmann wrote: > On Thu, Sep 26, 2024, at 08:46, David Hildenbrand wrote: > > On 25.09.24 23:06, Arnd Bergmann wrote: > > > > The first, uncontroversial step could indeed be to make > > MAP_UNINITIALIZED a nop, but still leave the definitions in mman.

Re: [PATCH 00/14] replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-10-09 Thread Julia Lawall
Hello, I have rerun the semantic patch that removes call_rcu calls in cases where the callback function just does some pointer arithmetic and calls kmem_cache_free. Let me know if this looks ok, and if so, I can make a more formal patch submission. This is against: commit 75b607fab38d149f232f01

Re: [PATCH 00/14] replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-10-09 Thread Paul E. McKenney
On Wed, Oct 09, 2024 at 07:08:58PM +0200, Julia Lawall wrote: > Hello, > > I have rerun the semantic patch that removes call_rcu calls in cases where > the callback function just does some pointer arithmetic and calls > kmem_cache_free. Let me know if this looks ok, and if so, I can make a > more

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

2024-10-09 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 v5 4/8] module: prepare to handle ROX allocations for text

2024-10-09 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 v5 1/8] mm: vmalloc: group declarations depending on CONFIG_MMU together

2024-10-09 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 v5 2/8] mm: vmalloc: don't account for number of nodes for HUGE_VMAP allocations

2024-10-09 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 v5 6/8] x86/module: perpare module loading for ROX allocations of text

2024-10-09 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 v5 7/8] execmem: add support for cache of large ROX pages

2024-10-09 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 v5 5/8] arch: introduce set_direct_map_valid_noflush()

2024-10-09 Thread Mike Rapoport
From: "Mike Rapoport (Microsoft)" Add an API that will allow updates of the direct/linear map for a set of physically contiguous pages. It will be used in the following patches. Signed-off-by: Mike Rapoport (Microsoft) --- arch/arm64/include/asm/set_memory.h | 1 + arch/arm64/mm/pageattr

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

2024-10-09 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

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

2024-10-09 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

Re: [PATCH v2 13/15] powerpc/rtas: Use fsleep() to minimize additional sleep duration

2024-10-09 Thread Frederic Weisbecker
Le Wed, Sep 11, 2024 at 07:13:39AM +0200, Anna-Maria Behnsen a écrit : > When commit 38f7b7067dae ("powerpc/rtas: rtas_busy_delay() improvements") > was introduced, documentation about proper usage of sleep realted functions related* > was outdated. > > The commit message references the usage of

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

2024-10-09 Thread Andrew Morton
On Wed, 9 Oct 2024 21:08:15 +0300 Mike Rapoport wrote: > Using large pages to map text areas reduces iTLB pressure and improves > performance. Are there any measurable performance improvements? What are the effects of this series upon overall memory consumption? The lack of acks is a bit surp

Re: [PATCH v5 12/17] powerpc64/ftrace: Move ftrace sequence out of line

2024-10-09 Thread Masahiro Yamada
On Mon, Sep 16, 2024 at 5:58 AM Hari Bathini wrote: > > From: Naveen N Rao > > Function profile sequence on powerpc includes two instructions at the > beginning of each function: > mflrr0 > bl ftrace_caller > > The call to ftrace_caller() gets nop'ed out during kernel boo

Re: [PATCH v5 13/17] powerpc64/ftrace: Support .text larger than 32MB with out-of-line stubs

2024-10-09 Thread Masahiro Yamada
On Mon, Sep 16, 2024 at 5:58 AM Hari Bathini wrote: > > From: Naveen N Rao > > We are restricted to a .text size of ~32MB when using out-of-line > function profile sequence. Allow this to be extended up to the previous > limit of ~64MB by reserving space in the middle of .text. > > A new config o

Re: [PATCH v5 00/17] powerpc: Core ftrace rework, support for ftrace direct and bpf trampolines

2024-10-09 Thread Masahiro Yamada
On Mon, Sep 16, 2024 at 5:57 AM Hari Bathini wrote: > > This is v5 of the series posted here: > https://lore.kernel.org/all/cover.1720942106.git.nav...@kernel.org/ > > This series reworks core ftrace support on powerpc to have the function > profiling sequence moved out of line. This enables us to

Re: [PATCH] asm-generic: provide generic page_to_phys and phys_to_page implementations

2024-10-09 Thread Christophe Leroy
Le 09/10/2024 à 13:43, Christoph Hellwig a écrit : page_to_phys is duplicated by all architectures, and from some strange reason placed in where it doesn't fit at all. phys_to_page is only provided by a few architectures despite having a lot of open coded users. Provide generic versions in

Re: [PATCH v5 11/17] kbuild: Add generic hook for architectures to use before the final vmlinux link

2024-10-09 Thread Masahiro Yamada
On Mon, Sep 16, 2024 at 5:58 AM Hari Bathini wrote: > > From: Naveen N Rao > > On powerpc, we would like to be able to make a pass on vmlinux.o and > generate a new object file to be linked into vmlinux. Add a generic pass > in Makefile.vmlinux that architectures can use for this purpose. > > Arc

Re: [PATCH v5 19/30] arm64: add POE signal support

2024-10-09 Thread Will Deacon
Hi Kevin, On Tue, Sep 24, 2024 at 01:27:58PM +0200, Kevin Brodsky wrote: > On 22/08/2024 17:11, Joey Gouly wrote: > > @@ -1178,6 +1237,9 @@ static void setup_return(struct pt_regs *regs, struct > > k_sigaction *ka, > > sme_smstop(); > > } > > > > + if (system_supports_poe()) >

Re: [PATCH] asm-generic: provide generic page_to_phys and phys_to_page implementations

2024-10-09 Thread Arnd Bergmann
On Wed, Oct 9, 2024, at 11:43, Christoph Hellwig wrote: > page_to_phys is duplicated by all architectures, and from some strange > reason placed in where it doesn't fit at all. > > phys_to_page is only provided by a few architectures despite having a lot > of open coded users. > > Provide generic

[PATCH 0/2] ASoC: imx-card: add cs42888 codec support

2024-10-09 Thread Shengjiu Wang
add cs42888 codec support Chancel Liu (2): ASoC: imx-card: Set mclk for codec ASoC: imx-card: Add CS42888 support sound/soc/fsl/imx-card.c | 59 +++- 1 file changed, 52 insertions(+), 7 deletions(-) -- 2.34.1

[PATCH 2/2] ASoC: imx-card: Add CS42888 support

2024-10-09 Thread Shengjiu Wang
From: Chancel Liu CS42888 codec provides 4 multi-bit ADC and 8 multi-bit DAC. Add support for this codec in imx-card ASoC machine driver. Signed-off-by: Chancel Liu Signed-off-by: Shengjiu Wang --- sound/soc/fsl/imx-card.c | 54 ++-- 1 file changed, 47 inse

[PATCH 1/2] ASoC: imx-card: Set mclk for codec

2024-10-09 Thread Shengjiu Wang
From: Chancel Liu In some cases, ASoC machine driver may modify the mclk frequency according to sample rate but the value in codec is still initial frequency which should be replaced. For example, we should update mclk before setup for cs42xx8 mclk relating registers. Signed-off-by: Chancel Liu

Re: [PATCH v2 2/2] ftrace: Consolidate ftrace_regs accessor functions for archs using pt_regs

2024-10-09 Thread Heiko Carstens
On Tue, Oct 08, 2024 at 07:05:29PM -0400, Steven Rostedt wrote: > From: Steven Rostedt > > Most architectures use pt_regs within ftrace_regs making a lot of the > accessor functions just calls to the pt_regs internally. Instead of > duplication this effort, use a HAVE_ARCH_FTRACE_REGS for archite

Re: [PATCH v2 1/2] ftrace: Make ftrace_regs abstract from direct use

2024-10-09 Thread Heiko Carstens
On Tue, Oct 08, 2024 at 07:05:28PM -0400, Steven Rostedt wrote: > From: Steven Rostedt > > ftrace_regs was created to hold registers that store information to save > function parameters, return value and stack. Since it is a subset of > pt_regs, it should only be used by its accessor functions. B

Re: [PATCH v2 0/2] ftrace: Make ftrace_regs abstract and consolidate code

2024-10-09 Thread Heiko Carstens
On Tue, Oct 08, 2024 at 07:05:27PM -0400, Steven Rostedt wrote: > > This is based on: > > https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git/ > ftrace/for-next > > ftrace_regs was created to hold registers that store information to save > function parameters, return val

Re: [PATCH v2 2/2] ftrace: Consolidate ftrace_regs accessor functions for archs using pt_regs

2024-10-09 Thread Steven Rostedt
On Wed, 9 Oct 2024 13:47:23 +0900 Masami Hiramatsu (Google) wrote: > > --- /dev/null > > +++ b/include/linux/ftrace_regs.h > > @@ -0,0 +1,36 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > +#ifndef _LINUX_FTRACE_TYPES_H > > +#define _LINUX_FTRACE_TYPES_H > Is

Re: [PATCH net-next] eth: remove the DLink/Sundance (ST201) driver

2024-10-09 Thread Simon Horman
On Tue, Oct 08, 2024 at 08:48:24AM -0700, Jakub Kicinski wrote: > Konstantin reports the maintainer's address bounces. > There is no other maintainer and the driver is quite old. > There is a good chance nobody is using this driver any more. > Let's try to remove it completely, we can revert it bac

[PATCH] asm-generic: provide generic page_to_phys and phys_to_page implementations

2024-10-09 Thread Christoph Hellwig
page_to_phys is duplicated by all architectures, and from some strange reason placed in where it doesn't fit at all. phys_to_page is only provided by a few architectures despite having a lot of open coded users. Provide generic versions in to make these helpers more easily usable. Signed-off-b

provide generic page_to_phys and phys_to_page implementations

2024-10-09 Thread Christoph Hellwig
page_to_phys is duplicated by all architectures, and from some strange reason placed in where it doesn't fit at all. phys_to_page is only provided by a few architectures despite having a lot of open coded users. Provide generic versions in to make these helpers more easily usable. Diffstat:

Re: [PATCH 1/5] asm-generic: cosmetic updates to uapi/asm/mman.h

2024-10-09 Thread Lorenzo Stoakes
On Wed, Sep 25, 2024 at 09:06:11PM +, Arnd Bergmann wrote: > From: Arnd Bergmann > > All but four architectures use asm-generic/mman-common.h, and the > differences between these are mostly accidental. Rearrange them > slightly to make it possible to 'vimdiff' them to see the actual > relevant

Re: [PATCH 2/5] asm-generic: move MAP_* flags from mman-common.h to mman.h

2024-10-09 Thread Lorenzo Stoakes
On Wed, Sep 25, 2024 at 09:06:12PM +, Arnd Bergmann wrote: > From: Arnd Bergmann > > powerpc and sparc include asm-generic/mman-common.h to get the MAP_* flags > 0x008000 through 0x400, but those flags are all different on alpha, > mips, parisc and xtensa. > > Add duplicate definitions for

Re: [viro-vfs:work.xattr2] [fs/xattr] 64d47e878a: xfstests.xfs.046.fail

2024-10-09 Thread Oliver Sang
hi, Al Viro, On Sun, Oct 06, 2024 at 03:59:04PM +0100, Al Viro wrote: > On Sun, Oct 06, 2024 at 10:20:57PM +0800, kernel test robot wrote: > > > xfs/046 - output mismatch (see > > /lkp/benchmarks/xfstests/results//xfs/046.out.bad) > > --- tests/xfs/046.out 2024-09-30 21:13:44.000

Re: [PATCH 4/5] asm-generic: use asm-generic/mman-common.h on parisc and alpha

2024-10-09 Thread Lorenzo Stoakes
On Wed, Sep 25, 2024 at 09:06:14PM +, Arnd Bergmann wrote: > From: Arnd Bergmann > > These two architectures each have their own set of MAP_* flags, like > powerpc, mips and others do. In addition, the msync() flags are also > different, here both define the same flags but in a different order

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

2024-10-09 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

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

2024-10-09 Thread Christoph Hellwig
On Wed, Oct 09, 2024 at 09:08:09PM +0300, Mike Rapoport wrote: > +/* for /proc/kcore */ > +extern long vread_iter(struct iov_iter *iter, const char *addr, size_t > count); > + > +/* > + * Internals. Don't use.. > + */ > +extern __init void vm_area_add_early(struct vm_struct *vm); > +extern __in

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

2024-10-09 Thread Christoph Hellwig
On Wed, Oct 09, 2024 at 09:08:11PM +0300, Mike Rapoport wrote: > 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 a

Re: [PATCH v5 5/8] arch: introduce set_direct_map_valid_noflush()

2024-10-09 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

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

2024-10-09 Thread Christoph Hellwig
> +extern void apply_alternatives(struct alt_instr *start, struct alt_instr > *end, > +struct module *mod); > +extern void apply_retpolines(s32 *start, s32 *end, struct module *mod); > +extern void apply_returns(s32 *start, s32 *end, struct module *mod); > +extern void

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

2024-10-09 Thread Christoph Hellwig
On Wed, Oct 09, 2024 at 09:08:15PM +0300, Mike Rapoport wrote: > /** > * struct execmem_info - architecture parameters for code allocations > + * @fill_trapping_insns: set memory to contain instructions that will trap > * @ranges: array of parameter sets defining architecture specific > * pa

Re: [PATCH v5 17/17] powerpc64/bpf: Add support for bpf trampolines

2024-10-09 Thread Michael Ellerman
Alexei Starovoitov writes: > On Tue, Oct 1, 2024 at 12:18 AM Hari Bathini wrote: >> On 30/09/24 6:25 pm, Alexei Starovoitov wrote: >> > On Sun, Sep 29, 2024 at 10:33 PM Hari Bathini >> > wrote: >> >> On 17/09/24 1:20 pm, Alexei Starovoitov wrote: >> >>> On Sun, Sep 15, 2024 at 10:58 PM Hari Bat

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

2024-10-09 Thread Mike Rapoport
On Wed, Oct 09, 2024 at 03:23:40PM -0700, Song Liu wrote: > On Wed, Oct 9, 2024 at 11:10 AM Mike Rapoport wrote: > [...] > > diff --git a/include/linux/module.h b/include/linux/module.h > > index 88ecc5e9f523..7039f609c6ef 100644 > > --- a/include/linux/module.h > > +++ b/include/linux/module.h >

Re: [RFC 1/2] cma: Fix CMA_MIN_ALIGNMENT_BYTES during early_init

2024-10-09 Thread IBM
David Hildenbrand writes: > On 08.10.24 15:27, Ritesh Harjani (IBM) wrote: >> During early init CMA_MIN_ALIGNMENT_BYTES can be PAGE_SIZE, >> since pageblock_order is still zero and it gets initialized >> later during paging_init() e.g. >> paging_init() -> free_area_init() -> set_pageblock_order()