Re: [PATCH] params: Add support for static keys

2025-05-13 Thread Christophe Leroy
Le 10/05/2025 à 23:01, Kent Overstreet a écrit : Static keys can now be a module parameter, e.g. module_param_named(foo, foo.key, static_key_t, 0644) bcachefs is now using this. Cc: Luis Chamberlain Cc: Petr Pavlu Cc: Sami Tolvanen Cc: Daniel Gomez Cc: linux-modu...@vger.kernel.org Sign

Re: [PATCH] module: Taint the kernel when write-protecting ro_after_init fails

2025-03-14 Thread Christophe Leroy
Le 12/03/2025 à 17:30, Kees Cook a écrit : On Wed, Mar 12, 2025 at 04:45:24PM +0100, Vlastimil Babka wrote: On 3/6/25 17:57, Luis Chamberlain wrote: + linux-mm since we're adding TAINT_BAD_PAGE On Thu, Mar 06, 2025 at 11:36:55AM +0100, Petr Pavlu wrote: In the unlikely case that setting ro

Re: [PATCH v2 3/3] module: Make .static_call_sites read-only after init

2025-03-11 Thread Christophe Leroy
Le 06/03/2025 à 14:13, Petr Pavlu a écrit : Section .static_call_sites holds data structures that need to be sorted and processed only at module load time. This initial processing happens in static_call_add_module(), which is invoked as a callback to the MODULE_STATE_COMING notification from p

Re: [v1 2/3] include: move lookup_or_create_module_kobject()/to_module* to module.h

2025-02-04 Thread Christophe Leroy
Le 04/02/2025 à 06:22, Shyam Saini a écrit : [Vous ne recevez pas souvent de courriers de shyamsa...@linux.microsoft.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] Move the following to module.h to allow common usages: - lookup_or_create_modul

Re: [PATCH 00/16] selftests: vDSO: parse_vdso: Make compatible with nolibc

2025-02-03 Thread Christophe Leroy
Le 03/02/2025 à 14:50, Thomas Weißschuh a écrit : On Mon, Feb 03, 2025 at 12:23:29PM +0100, Christophe Leroy wrote: Le 03/02/2025 à 10:05, Thomas Weißschuh a écrit : For testing the functionality of the vDSO, it is necessary to build userspace programs for multiple different architectures

Re: [PATCH 00/16] selftests: vDSO: parse_vdso: Make compatible with nolibc

2025-02-03 Thread Christophe Leroy
Le 03/02/2025 à 10:05, Thomas Weißschuh a écrit : For testing the functionality of the vDSO, it is necessary to build userspace programs for multiple different architectures. It is additional work to acquire matching userspace cross-compilers with full C libraries and then building root images

Re: [PATCH] selftests/vDSO: Fix undefined CLONE_NEWTIME by including

2025-01-29 Thread Christophe Leroy
Le 29/01/2025 à 19:17, Purva Yeshi a écrit : On 27/01/25 13:32, Christophe Leroy wrote: Le 26/01/2025 à 11:59, Purva Yeshi a écrit : [Vous ne recevez pas souvent de courriers de purvayeshi...@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification

Re: [PATCH v3 3/6] syscall.h: introduce syscall_set_nr()

2025-01-28 Thread Christophe Leroy
Le 28/01/2025 à 10:16, Dmitry V. Levin a écrit : Similar to syscall_set_arguments() that complements syscall_get_arguments(), introduce syscall_set_nr() that complements syscall_get_nr(). syscall_set_nr() is going to be needed along with syscall_set_arguments() on all HAVE_ARCH_TRACEHOOK arch

Re: [PATCH] selftests/vDSO: Fix undefined CLONE_NEWTIME by including

2025-01-27 Thread Christophe Leroy
Le 26/01/2025 à 11:59, Purva Yeshi a écrit : [Vous ne recevez pas souvent de courriers de purvayeshi...@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] Fix the build failure caused by the undefined `CLONE_NEWTIME`. Include the `linux/sched.h

Re: [RFC PATCH 2/3] module: Don't fail module loading when setting ro_after_init section RO failed

2025-01-03 Thread Christophe Leroy
Le 03/01/2025 à 16:40, Petr Pavlu a écrit : On 12/10/24 11:49, Daniel Gomez wrote:>>> Do you envision that the userspace would handle this problem differently and it is worth adding the complexity? What complexity do you mean? The complexity that I was referring to here is mainly the ear

Re: [PATCH v1 0/3] module: Don't fail module loading when setting ro_after_init section RO failed

2025-01-03 Thread Christophe Leroy
Le 03/01/2025 à 17:13, Petr Pavlu a écrit : On 12/5/24 20:46, Christophe Leroy wrote: This series reworks module loading to avoid leaving the module in a stale state when protecting ro_after_init section fails. Once module init has succeded it is too late to cancel loading. If setting

Re: [PATCH 0/3] module: Make .static_call_sites read-only after init

2025-01-03 Thread Christophe Leroy
Hi Petr, Le 23/12/2024 à 10:37, Petr Pavlu a écrit : Section .static_call_sites holds data structures that need to be sorted and processed only at module load time. The section is never modified afterwards. Make it therefore read-only after module initialization to avoid any (non-)accidental mod

Re: [PATCH v2 00/28] module: Use RCU instead of RCU-sched.

2025-01-02 Thread Christophe Leroy
Hi Sebastian, Le 20/12/2024 à 18:41, Sebastian Andrzej Siewior a écrit : Hi, This is an updated version of the inital post after PeterZ made me aware that there are users outside of the module directory. The goal is replace the mix auf rcu_read_lock(), rcu_read_lock_sched() and preempt_disable(

Re: [PATCH v4 2/2] livepatch: Convert timeouts to secs_to_jiffies()

2024-12-18 Thread Christophe Leroy
Le 18/12/2024 à 09:38, Petr Mladek a écrit : On Tue 2024-12-17 23:09:59, Easwar Hariharan wrote: Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced secs_to_jiffies(). As the value here is a multiple of 1000, use secs_to_jiffies() instead of msecs_to_jiffies to avoid the mult

Re: [PATCH v4 2/2] livepatch: Convert timeouts to secs_to_jiffies()

2024-12-17 Thread Christophe Leroy
ut with an immediate schedule_work() call. Signed-off-by: Easwar Hariharan Reviewed-by: Christophe Leroy --- samples/livepatch/livepatch-callbacks-busymod.c | 3 +-- samples/livepatch/livepatch-shadow-fix1.c | 3 +-- samples/livepatch/livepatch-shadow-mod.c| 15 +

[PATCH v1 0/3] module: Don't fail module loading when setting ro_after_init section RO failed

2024-12-05 Thread Christophe Leroy
feedback from RFC series Christophe Leroy (3): module: Split module_enable_rodata_ro() module: Don't fail module loading when setting ro_after_init section RO failed module: pre-test setting ro_after_init data read-only kernel/module/internal.h | 3 ++- kernel/module/main.c

[PATCH v1 3/3] module: pre-test setting ro_after_init data read-only

2024-12-05 Thread Christophe Leroy
case it happens anyway. For systems that sets panic-on-warn, such systems usely care about security and don't want vulnerable systems, so an implied panic is worth it in that case. Signed-off-by: Christophe Leroy --- v1: Expanded the commit message based on feedback from RFC series ---

[PATCH v1 2/3] module: Don't fail module loading when setting ro_after_init section RO failed

2024-12-05 Thread Christophe Leroy
: d1909c022173 ("module: Don't ignore errors from set_memory_XX()") Signed-off-by: Christophe Leroy --- v1: Fixed comment from Petr about __func__ --- kernel/module/main.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/module/main.c b/kernel/modu

[PATCH v1 1/3] module: Split module_enable_rodata_ro()

2024-12-05 Thread Christophe Leroy
. Split module_enable_rodata_ro() in two. Signed-off-by: Christophe Leroy Tested-by: Daniel Gomez --- kernel/module/internal.h | 3 ++- kernel/module/main.c | 4 ++-- kernel/module/strict_rwx.c | 13 + 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/kernel

Re: [RFC PATCH 1/3] module: Split module_enable_rodata_ro()

2024-11-27 Thread Christophe Leroy
Le 26/11/2024 à 20:58, Luis Chamberlain a écrit : On Sat, Nov 09, 2024 at 11:35:35AM +0100, Christophe Leroy wrote: module_enable_rodata_ro() is called twice, once before module init to set rodata sections readonly and once after module init to set rodata_after_init section readonly. The

Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-13 Thread Christophe Leroy
Le 12/11/2024 à 21:28, Luis Chamberlain a écrit : On Sat, Nov 09, 2024 at 11:35:37AM +0100, Christophe Leroy wrote: diff --git a/kernel/module/main.c b/kernel/module/main.c index 1bf4b0db291b..b603c9647e73 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -2582,7 +2582,7

Re: [RFC PATCH 2/3] module: Don't fail module loading when setting ro_after_init section RO failed

2024-11-12 Thread Christophe Leroy
Le 12/11/2024 à 10:43, Daniel Gomez a écrit : On Mon Nov 11, 2024 at 7:53 PM CET, Christophe Leroy wrote: Le 09/11/2024 à 23:17, Daniel Gomez a écrit : On Sat Nov 9, 2024 at 11:35 AM CET, Christophe Leroy wrote: Once module init has succeded it is too late to cancel loading. If setting

Re: [RFC PATCH 2/3] module: Don't fail module loading when setting ro_after_init section RO failed

2024-11-11 Thread Christophe Leroy
Le 09/11/2024 à 23:17, Daniel Gomez a écrit : On Sat Nov 9, 2024 at 11:35 AM CET, Christophe Leroy wrote: Once module init has succeded it is too late to cancel loading. If setting ro_after_init data section to read-only fails, all we can do is to inform the user through a warning. Reported

Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-11 Thread Christophe Leroy
Le 09/11/2024 à 22:03, Daniel Gomez a écrit : On Sat Nov 9, 2024 at 11:35 AM CET, Christophe Leroy wrote: To be on the safe side, try to set ro_after_init data section readonly at the same time as rodata. If it fails it will likely fail again later so let's cancel module loading whi

[RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-09 Thread Christophe Leroy
so that it still works after module init. Then it should in principle never fail so add a WARN_ON_ONCE() to get a big fat warning in case it happens anyway. Signed-off-by: Christophe Leroy --- kernel/module/main.c | 2 +- kernel/module/strict_rwx.c | 5 - 2 files changed, 5 insert

[RFC PATCH 2/3] module: Don't fail module loading when setting ro_after_init section RO failed

2024-11-09 Thread Christophe Leroy
: d1909c022173 ("module: Don't ignore errors from set_memory_XX()") Signed-off-by: Christophe Leroy --- kernel/module/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index 2de4ad7af335..1bf4b0db291b 1006

[RFC PATCH 1/3] module: Split module_enable_rodata_ro()

2024-11-09 Thread Christophe Leroy
. Split module_enable_rodata_ro() in two. Signed-off-by: Christophe Leroy --- kernel/module/internal.h | 3 ++- kernel/module/main.c | 4 ++-- kernel/module/strict_rwx.c | 13 + 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/kernel/module/internal.h b/kernel

Re: [PATCH RFC v3 4/4] module: refactor ro_after_init failure path

2024-11-09 Thread Christophe Leroy
Le 08/11/2024 à 17:12, Daniel Gomez via B4 Relay a écrit : [Vous ne recevez pas souvent de courriers de devnull+da.gomez.samsung@kernel.org. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] From: Daniel Gomez When ro_after_init fails, we need to

Re: [PATCH] selftests: vDSO: Do not rely on $ARCH for vdso_test_getrandom && vdso_test_chacha

2024-11-07 Thread Christophe Leroy
Hi Jason, Le 01/09/2024 à 15:22, Jason A. Donenfeld a écrit : Hi Christophe, Hmm, I'm not so sure I like this very much. I think it's important for these tests to fail when an arch tries to hook up the function to the vDSO, but it's still not exported for some reason. This also regresses the AR

Re: [PATCH v5 14/16] modules: Support extended MODVERSIONS info

2024-10-16 Thread Christophe Leroy
Le 17/10/2024 à 01:21, Luis Chamberlain a écrit : On Tue, Oct 15, 2024 at 04:22:22PM -0700, Matthew Maurer wrote: So, the basic things I can think of to test here are: 1. The kernel can still load the previous MODVERSIONS format 2. The kernel can load the new MODVERSIONS format 3. If we arti

Re: [PATCH v5 14/16] modules: Support extended MODVERSIONS info

2024-09-26 Thread Christophe Leroy
Le 26/09/2024 à 01:38, Matthew Maurer a écrit : Adds a new format for MODVERSIONS which stores each field in a separate ELF section. This initially adds support for variable length names, but could later be used to add additional fields to MODVERSIONS in a backwards compatible way if needed. A

[PATCH] selftests: vDSO: enable partial vdso_test_getrandom bench

2024-09-04 Thread Christophe Leroy
In order to use vdso_test_getrandom with analysis tools like 'perf' it can be useful to perform only one kind of test, for instead only vdso. Add an optional argument that allows telling which of the three API you want to benchmark. Signed-off-by: Christophe Leroy --- .../self

Re: [PATCH v4 14/15] kprobes: remove dependency on CONFIG_MODULES

2024-04-19 Thread Christophe Leroy
Le 19/04/2024 à 17:49, Mike Rapoport a écrit : > Hi Masami, > > On Thu, Apr 18, 2024 at 06:16:15AM +0900, Masami Hiramatsu wrote: >> Hi Mike, >> >> On Thu, 11 Apr 2024 19:00:50 +0300 >> Mike Rapoport wrote: >> >>> From: "Mike Rapoport (IBM)" >>> >>> kprobes depended on CONFIG_MODULES because i

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

2024-04-11 Thread Christophe Leroy
Le 11/04/2024 à 18:05, Mike Rapoport a écrit : > From: "Mike Rapoport (IBM)" > > vmalloc allocations with VM_ALLOW_HUGE_VMAP that do not explictly > specify node ID will use huge pages only if size_per_node is larger than > PMD_SIZE. > Still the actual allocated memory is not distributed betwee

Re: [PATCH v7 2/2] arch/riscv: Enable kprobes when CONFIG_MODULES=n

2024-03-28 Thread Christophe Leroy
Le 26/03/2024 à 14:46, Jarkko Sakkinen a écrit : > Tacing with kprobes while running a monolithic kernel is currently > impossible due the kernel module allocator dependency. > > Address the issue by implementing textmem API for RISC-V. > > Link: https://www.sochub.fi # for power on testing new

Re: [PATCH v7 1/2] kprobes: Implement trampoline memory allocator for tracing

2024-03-28 Thread Christophe Leroy
Le 26/03/2024 à 14:46, Jarkko Sakkinen a écrit : > Tracing with kprobes while running a monolithic kernel is currently > impossible because CONFIG_KPROBES depends on CONFIG_MODULES. > > Introduce alloc_execmem() and free_execmem() for allocating executable > memory. If an arch implements these f

Re: [RFC][PATCH 3/4] kprobes: Allow kprobes with CONFIG_MODULES=n

2024-03-07 Thread Christophe Leroy
Le 06/03/2024 à 21:05, Calvin Owens a écrit : > [Vous ne recevez pas souvent de courriers de jcalvinow...@gmail.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > If something like this is merged down the road, it can go in at leisure > once th

Re: [RFC][PATCH 2/4] bpf: Allow BPF_JIT with CONFIG_MODULES=n

2024-03-07 Thread Christophe Leroy
Le 06/03/2024 à 21:05, Calvin Owens a écrit : > [Vous ne recevez pas souvent de courriers de jcalvinow...@gmail.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > No BPF code has to change, except in struct_ops (for module refs). > > This conf

Re: [RFC][PATCH 1/4] module: mm: Make module_alloc() generally available

2024-03-07 Thread Christophe Leroy
Hi Calvin, Le 06/03/2024 à 21:05, Calvin Owens a écrit : > [Vous ne recevez pas souvent de courriers de jcalvinow...@gmail.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Both BPF_JIT and KPROBES depend on CONFIG_MODULES, but only require > m

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-31 Thread Christophe Leroy
Le 31/01/2024 à 16:17, Marek Szyprowski a écrit : > [Vous ne recevez pas souvent de courriers de m.szyprow...@samsung.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Hi Christophe, > > On 31.01.2024 12:58, Christophe

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-31 Thread Christophe Leroy
Hi, Le 30/01/2024 à 18:48, Marek Szyprowski a écrit : > [Vous ne recevez pas souvent de courriers de m.szyprow...@samsung.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Dear All, > > On 30.01.2024 12:03, Christophe Ler

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-30 Thread Christophe Leroy
Le 30/01/2024 à 21:27, Luis Chamberlain a écrit : > On Tue, Jan 30, 2024 at 06:48:11PM +0100, Marek Szyprowski wrote: >> Dear All, >> >> On 30.01.2024 12:03, Christophe Leroy wrote: >>> Le 30/01/2024 à 10:16, Chen-Yu Tsai a écrit : >>>> [Vous

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2024-01-30 Thread Christophe Leroy
n wrote: >> On Thu, Dec 21, 2023 at 10:02:46AM +0100, Christophe Leroy wrote: >>> Declaring rodata_enabled and mark_rodata_ro() at all time >>> helps removing related #ifdefery in C files. >>> >>> Signed-off-by: Christophe Leroy >> >> Very nice

Re: [PATCH] powerpc/papr_scm: Move duplicate definitions to common header files

2024-01-25 Thread Christophe Leroy
Le 18/04/2022 à 06:38, Shivaprasad G Bhat a écrit : > papr_scm and ndtest share common PDSM payload structs like > nd_papr_pdsm_health. Presently these structs are duplicated across > papr_pdsm.h and ndtest.h header files. Since 'ndtest' is essentially > arch independent and can run on platforms

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2023-12-22 Thread Christophe Leroy
Kees >> >> Christophe Leroy writes: >>> Declaring rodata_enabled and mark_rodata_ro() at all time >>> helps removing related #ifdefery in C files. >>> >>> Signed-off-by: Christophe Leroy >>> --- >>> include/linux/init.h |

[PATCH 3/3] powerpc: Simplify strict_kernel_rwx_enabled()

2023-12-21 Thread Christophe Leroy
Now that rodata_enabled is always declared, remove #ifdef and define a single version of strict_kernel_rwx_enabled(). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/mmu.h | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/powerpc/include/asm/mmu.h b

[PATCH 2/3] modules: Remove #ifdef CONFIG_STRICT_MODULE_RWX around rodata_enabled

2023-12-21 Thread Christophe Leroy
Now that rodata_enabled is declared at all time, the #ifdef CONFIG_STRICT_MODULE_RWX can be removed. Signed-off-by: Christophe Leroy --- kernel/module/strict_rwx.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/module/strict_rwx.c b/kernel/module/strict_rwx.c

[PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2023-12-21 Thread Christophe Leroy
Declaring rodata_enabled and mark_rodata_ro() at all time helps removing related #ifdefery in C files. Signed-off-by: Christophe Leroy --- include/linux/init.h | 4 init/main.c | 21 +++-- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/include

[PATCH 3/3] module: Don't ignore errors from set_memory_XX()

2023-12-20 Thread Christophe Leroy
. Signed-off-by: Christophe Leroy --- kernel/module/internal.h | 6 ++--- kernel/module/main.c | 18 ++ kernel/module/strict_rwx.c | 48 ++ 3 files changed, 50 insertions(+), 22 deletions(-) diff --git a/kernel/module/internal.h b/kernel

[PATCH 2/3] module: Change module_enable_{nx/x/ro}() to more explicit names

2023-12-20 Thread Christophe Leroy
It's a bit puzzling to see a call to module_enable_nx() followed by a call to module_enable_x(). This is because one applies on text while the other applies on data. Change name to make that more clear. Signed-off-by: Christophe Leroy --- kernel/module/internal.h | 6 +++--- kernel/m

[PATCH 1/3] module: Use set_memory_rox()

2023-12-20 Thread Christophe Leroy
ry_rox()") Use set_memory_rox() in modules when STRICT_MODULES_RWX is set. Signed-off-by: Christophe Leroy --- kernel/module/internal.h | 2 +- kernel/module/main.c | 2 +- kernel/module/strict_rwx.c | 12 +++- 3 files changed, 9 insertions(+), 7 deletions(-) diff -

Re: [PATCH 12/27] tty: hvc: convert to u8 and size_t

2023-12-06 Thread Christophe Leroy
Le 06/12/2023 à 08:36, Jiri Slaby (SUSE) a écrit : > Switch character types to u8 and sizes to size_t. To conform to > characters/sizes in the rest of the tty layer. > > Signed-off-by: Jiri Slaby (SUSE) > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christophe L

Re: [PATCH v3 09/13] powerpc: extend execmem_params for kprobes allocations

2023-09-22 Thread Christophe Leroy
Hi Mike, Le 18/09/2023 à 09:29, Mike Rapoport a écrit : > 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::all

Re: [PATCH v3 06/13] mm/execmem: introduce execmem_data_alloc()

2023-09-22 Thread Christophe Leroy
Le 22/09/2023 à 10:55, Song Liu a écrit : > On Fri, Sep 22, 2023 at 12:17 AM Christophe Leroy > wrote: >> >> >> >> Le 22/09/2023 à 00:52, Song Liu a écrit : >>> On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote: >>>> >>> [..

Re: [PATCH v3 06/13] mm/execmem: introduce execmem_data_alloc()

2023-09-22 Thread Christophe Leroy
Le 22/09/2023 à 00:52, Song Liu a écrit : > On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote: >> > [...] >> diff --git a/include/linux/execmem.h b/include/linux/execmem.h >> index 519bdfdca595..09d45ac786e9 100644 >> --- a/include/linux/execmem.h >> +++ b/include/linux/execmem.h >> @@ -29,6

Re: [PATCH v4 19/20] mips: Convert to GENERIC_CMDLINE

2021-04-20 Thread Christophe Leroy
Le 09/04/2021 à 03:23, Daniel Walker a écrit : On Thu, Apr 08, 2021 at 02:04:08PM -0500, Rob Herring wrote: On Tue, Apr 06, 2021 at 10:38:36AM -0700, Daniel Walker wrote: On Fri, Apr 02, 2021 at 03:18:21PM +, Christophe Leroy wrote: -config CMDLINE_BOOL - bool "Built-in k

[PATCH v2 1/2] powerpc/inst: ppc_inst_as_u64() becomes ppc_inst_as_ulong()

2021-04-20 Thread Christophe Leroy
In order to simplify use on PPC32, change ppc_inst_as_u64() into ppc_inst_as_ulong() that returns the 32 bits instruction on PPC32. Will be used when porting OPTPROBES to PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/inst.h | 13 +++-- arch/powerpc/kernel

[PATCH v2 2/2] powerpc: Enable OPTPROBES on PPC32

2021-04-20 Thread Christophe Leroy
and use stmw/lmw to save/restore registers. Signed-off-by: Christophe Leroy --- v2: Comments from Naveen. --- arch/powerpc/Kconfig | 2 +- arch/powerpc/kernel/optprobes.c | 24 -- arch/powerpc/kernel/optprobes_head.S | 65 +++- 3 files changed

Re: [PATCH v2 2/2] powerpc/legacy_serial: Use early_ioremap()

2021-04-20 Thread Christophe Leroy
Le 20/04/2021 à 15:32, Christophe Leroy a écrit : From: Christophe Leroy Oops, I forgot to reset the Author. Michael if you apply this patch please update the author and remove the old Signed-off-by Thanks [0.00] ioremap() called early from find_legacy_serial_ports+0x3cc

Re: [PATCH v1 2/2] powerpc: Enable OPTPROBES on PPC32

2021-04-20 Thread Christophe Leroy
Le 20/04/2021 à 08:51, Naveen N. Rao a écrit : Christophe Leroy wrote: For that, create a 32 bits version of patch_imm64_load_insns() and create a patch_imm_load_insns() which calls patch_imm32_load_insns() on PPC32 and patch_imm64_load_insns() on PPC64. Adapt optprobes_head.S for PPC32

[PATCH v2 2/2] powerpc/legacy_serial: Use early_ioremap()

2021-04-20 Thread Christophe Leroy
From: Christophe Leroy [0.00] ioremap() called early from find_legacy_serial_ports+0x3cc/0x474. Use early_ioremap() instead find_legacy_serial_ports() is called early from setup_arch(), before paging_init(). vmalloc is not available yet, ioremap shouldn't be used that early.

[PATCH v2 1/2] powerpc/64: Fix the definition of the fixmap area

2021-04-20 Thread Christophe Leroy
a fixed size AREA at the top of the I/O space for fixmap and ensure during build that the size is big enough. Fixes: 265c3491c4bc ("powerpc: Add support for GENERIC_EARLY_IOREMAP") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/pgtable.h | 4 +++- arch/powerpc/i

Re: [PATCH] powerpc/legacy_serial: Use early_ioremap()

2021-04-20 Thread Christophe Leroy
Hi Chris, Le 10/08/2020 à 04:01, Chris Packham a écrit : On 24/03/20 10:54 am, Chris Packham wrote: Hi Christophe, On Wed, 2020-02-05 at 12:03 +, Christophe Leroy wrote: [0.00] ioremap() called early from find_legacy_serial_ports+0x3cc/0x474. Use early_ioremap() instead I was

Re: PPC_FPU, ALTIVEC: enable_kernel_fp, put_vr, get_vr

2021-04-19 Thread Christophe Leroy
unction-declaration] 660 | get_vr(rn, &u.v); | ^~ In theory ALTIVEC is independent of PPC_FPU but in practice nobody is going to build such a machine, so make ALTIVEC require PPC_FPU by depending on PPC_FPU. Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Michael

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-19 Thread Christophe Leroy
Le 19/04/2021 à 16:00, Steven Price a écrit : On 19/04/2021 14:14, Christophe Leroy wrote: Le 16/04/2021 à 12:51, Steven Price a écrit : On 16/04/2021 11:38, Christophe Leroy wrote: Le 16/04/2021 à 11:28, Steven Price a écrit : On 15/04/2021 18:18, Christophe Leroy wrote: To be

[PATCH 3/3] powerpc/irq: Enhance readability of trap types

2021-04-19 Thread Christophe Leroy
This patch makes use of trap types in irq.c Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/interrupt.h | 1 + arch/powerpc/kernel/irq.c| 13 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/include/asm/interrupt.h b/arch

[PATCH 1/3] powerpc/8xx: Enhance readability of trap types

2021-04-19 Thread Christophe Leroy
This patch makes use of trap types in head_8xx.S Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/interrupt.h | 29 arch/powerpc/kernel/head_8xx.S | 49 ++-- 2 files changed, 47 insertions(+), 31 deletions(-) diff --git a/arch/powerpc

[PATCH 2/3] powerpc/32s: Enhance readability of trap types

2021-04-19 Thread Christophe Leroy
This patch makes use of trap types in head_book3s_32.S Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/interrupt.h | 6 arch/powerpc/kernel/head_book3s_32.S | 43 ++-- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/arch/powerpc

Re: [PATCH 2/2] powerpc: add ALTIVEC support to lib/ when PPC_FPU not set

2021-04-19 Thread Christophe Leroy
Le 19/04/2021 à 15:32, Segher Boessenkool a écrit : Hi! On Sun, Apr 18, 2021 at 01:17:26PM -0700, Randy Dunlap wrote: Add ldstfp.o to the Makefile for CONFIG_ALTIVEC and add externs for get_vr() and put_vr() in lib/sstep.c to fix the build errors. obj-$(CONFIG_PPC_FPU) += ldstfp.o +obj-

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-19 Thread Christophe Leroy
Le 16/04/2021 à 12:51, Steven Price a écrit : On 16/04/2021 11:38, Christophe Leroy wrote: Le 16/04/2021 à 11:28, Steven Price a écrit : On 15/04/2021 18:18, Christophe Leroy wrote: To be honest I don't fully understand why powerpc requires the page_size - it appears to be usin

[PATCH v2 4/4] powerpc/mm: Convert powerpc to GENERIC_PTDUMP

2021-04-19 Thread Christophe Leroy
This patch converts powerpc to the generic PTDUMP implementation. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 2 + arch/powerpc/Kconfig.debug| 30 -- arch/powerpc/mm/Makefile | 2 +- arch/powerpc/mm/mmu_decl.h| 2 +- arch/powerpc

[PATCH v2 3/4] powerpc/mm: Properly coalesce pages in ptdump

2021-04-19 Thread Christophe Leroy
ent dirty accessed ... 0xf95ac000-0xf95a 0x042b16K rw present dirty accessed 0xfef5c000-0xfeff 0x0143400016K rpresent accessed ---[ kasan shadow mem end ]--- Signed-off-by: Christoph

[PATCH v2 1/4] mm: pagewalk: Fix walk for hugepage tables

2021-04-19 Thread Christophe Leroy
Pagewalk ignores hugepd entries and walk down the tables as if it was traditionnal entries, leading to crazy result. Add walk_hugepd_range() and use it to walk hugepage tables. Signed-off-by: Christophe Leroy --- v2: - Add a guard for NULL ops->pte_entry - Take mm->page_table_lock when w

[PATCH v2 0/4] Convert powerpc to GENERIC_PTDUMP

2021-04-19 Thread Christophe Leroy
gic that checked for contiguous physical memory - Removed the articial level calculation in ptdump_pte_entry(), level 4 is ok for all. - Removed page_size argument to note_page() Christophe Leroy (4): mm: pagewalk: Fix walk for hugepage tables powerpc/mm: Leave a gap between early allocated IO ar

[PATCH v2 2/4] powerpc/mm: Leave a gap between early allocated IO areas

2021-04-19 Thread Christophe Leroy
Vmalloc system leaves a gap between allocated areas. It helps catching overflows. Do the same for IO areas which are allocated with early_ioremap_range() until slab_is_available(). Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ioremap_32.c | 4 ++-- arch/powerpc/mm/ioremap_64.c | 2 +- 2

Re: mmu.c:undefined reference to `patch__hash_page_A0'

2021-04-18 Thread Christophe Leroy
Le 18/04/2021 à 19:15, Randy Dunlap a écrit : On 4/18/21 3:43 AM, Christophe Leroy wrote: Le 18/04/2021 à 02:02, Randy Dunlap a écrit : HI-- I no longer see this build error. Fixed by https://github.com/torvalds/linux/commit/acdad8fb4a1574323db88f98a38b630691574e16 However: On 2/27

Re: PPC_FPU, ALTIVEC: enable_kernel_fp, put_vr, get_vr

2021-04-18 Thread Christophe Leroy
Le 17/04/2021 à 22:17, Randy Dunlap a écrit : Hi, kernel test robot reports: drivers/cpufreq/pmac32-cpufreq.c:262:2: error: implicit declaration of function 'enable_kernel_fp' [-Werror,-Wimplicit-function-declaration] enable_kernel_fp(); ^ when # CONFIG_PPC_FPU is

Re: mmu.c:undefined reference to `patch__hash_page_A0'

2021-04-18 Thread Christophe Leroy
Le 18/04/2021 à 02:02, Randy Dunlap a écrit : HI-- I no longer see this build error. Fixed by https://github.com/torvalds/linux/commit/acdad8fb4a1574323db88f98a38b630691574e16 However: On 2/27/21 2:24 AM, kernel test robot wrote: tree: https://git.kernel.org/pub/scm/linux/kernel/git/

Re: [PATCH bpf-next 1/2] bpf: Remove bpf_jit_enable=2 debugging mode

2021-04-17 Thread Christophe Leroy
Le 16/04/2021 à 01:49, Alexei Starovoitov a écrit : On Thu, Apr 15, 2021 at 8:41 AM Quentin Monnet wrote: 2021-04-15 16:37 UTC+0200 ~ Daniel Borkmann On 4/15/21 11:32 AM, Jianlin Lv wrote: For debugging JITs, dumping the JITed image to kernel log is discouraged, "bpftool prog dump jited"

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-16 Thread Christophe Leroy
Le 16/04/2021 à 17:04, Christophe Leroy a écrit : Le 16/04/2021 à 16:40, Christophe Leroy a écrit : Le 16/04/2021 à 15:00, Steven Price a écrit : On 16/04/2021 12:08, Christophe Leroy wrote: Le 16/04/2021 à 12:51, Steven Price a écrit : On 16/04/2021 11:38, Christophe Leroy wrote

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-16 Thread Christophe Leroy
Le 16/04/2021 à 16:40, Christophe Leroy a écrit : Le 16/04/2021 à 15:00, Steven Price a écrit : On 16/04/2021 12:08, Christophe Leroy wrote: Le 16/04/2021 à 12:51, Steven Price a écrit : On 16/04/2021 11:38, Christophe Leroy wrote: Le 16/04/2021 à 11:28, Steven Price a écrit : To be

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-16 Thread Christophe Leroy
Le 16/04/2021 à 15:00, Steven Price a écrit : On 16/04/2021 12:08, Christophe Leroy wrote: Le 16/04/2021 à 12:51, Steven Price a écrit : On 16/04/2021 11:38, Christophe Leroy wrote: Le 16/04/2021 à 11:28, Steven Price a écrit : On 15/04/2021 18:18, Christophe Leroy wrote: In order to

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-16 Thread Christophe Leroy
Le 16/04/2021 à 12:51, Steven Price a écrit : On 16/04/2021 11:38, Christophe Leroy wrote: Le 16/04/2021 à 11:28, Steven Price a écrit : On 15/04/2021 18:18, Christophe Leroy wrote: In order to support large pages on powerpc, notepage() needs to know the page size of the page. Add a

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-16 Thread Christophe Leroy
Le 16/04/2021 à 11:28, Steven Price a écrit : On 15/04/2021 18:18, Christophe Leroy wrote: In order to support large pages on powerpc, notepage() needs to know the page size of the page. Add a page_size argument to notepage(). Signed-off-by: Christophe Leroy ---   arch/arm64/mm/ptdump.c

Re: [PATCH] soc: fsl: qe: remove unused function

2021-04-16 Thread Christophe Leroy
Le 16/04/2021 à 08:57, Daniel Axtens a écrit : Hi Jiapeng, Fix the following clang warning: You are not fixing a warning, you are removing a function in order to fix a warning ... drivers/soc/fsl/qe/qe_ic.c:234:29: warning: unused function 'qe_ic_from_irq' [-Wunused-function]. Would

Re: [PATCH] symbol : Make the size of the compile-related array fixed

2021-04-15 Thread Christophe Leroy
immediately and delete it! Le 16/04/2021 à 08:08, Christophe Leroy a écrit : Hi, This mail is unreadable. Please send your patch as raw text mail, not as attached file. Thanks Christophe Le 16/04/2021 à 05:12, 韩大鹏(Han Dapeng) a écrit

Re: [PATCH] symbol : Make the size of the compile-related array fixed

2021-04-15 Thread Christophe Leroy
Hi, This mail is unreadable. Please send your patch as raw text mail, not as attached file. Thanks Christophe Le 16/04/2021 à 05:12, 韩大鹏(Han Dapeng) a écrit : *OPPO* * * 本电子邮件及其附件含有OPPO公司的保密信息

Re: [PATCH v1 1/5] mm: pagewalk: Fix walk for hugepage tables

2021-04-15 Thread Christophe Leroy
Le 16/04/2021 à 00:43, Daniel Axtens a écrit : Hi Christophe, Pagewalk ignores hugepd entries and walk down the tables as if it was traditionnal entries, leading to crazy result. Add walk_hugepd_range() and use it to walk hugepage tables. Signed-off-by: Christophe Leroy --- mm

Re: [PATCH v1 4/5] mm: ptdump: Support hugepd table entries

2021-04-15 Thread Christophe Leroy
Hi Daniel, Le 16/04/2021 à 01:29, Daniel Axtens a écrit : Hi Christophe, Which hugepd, page table entries can be at any level and can be of any size. Add support for them. Signed-off-by: Christophe Leroy --- mm/ptdump.c | 17 +++-- 1 file changed, 15 insertions(+), 2

Re: [PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-15 Thread Christophe Leroy
Le 16/04/2021 à 01:12, Daniel Axtens a écrit : Hi Christophe, static void note_page(struct ptdump_state *pt_st, unsigned long addr, int level, - u64 val) + u64 val, unsigned long page_size) Compilers can warn about unused parameters at -Wextra lev

[PATCH v1 3/5] mm: ptdump: Provide page size to notepage()

2021-04-15 Thread Christophe Leroy
In order to support large pages on powerpc, notepage() needs to know the page size of the page. Add a page_size argument to notepage(). Signed-off-by: Christophe Leroy --- arch/arm64/mm/ptdump.c | 2 +- arch/riscv/mm/ptdump.c | 2 +- arch/s390/mm/dump_pagetables.c | 3

[PATCH v1 2/5] mm: ptdump: Fix build failure

2021-04-15 Thread Christophe Leroy
make[2]: *** [mm/ptdump.o] Error 1 READ_ONCE() cannot be used for reading PTEs. Use ptep_get() instead. See commit 481e980a7c19 ("mm: Allow arches to provide ptep_get()") and commit c0e1c8c22beb ("powerpc/8xx: Provide ptep_get() with 16k pages") for details. Fixes: 30d621f6

[PATCH v1 4/5] mm: ptdump: Support hugepd table entries

2021-04-15 Thread Christophe Leroy
Which hugepd, page table entries can be at any level and can be of any size. Add support for them. Signed-off-by: Christophe Leroy --- mm/ptdump.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/mm/ptdump.c b/mm/ptdump.c index 61cd16afb1c8..6efdb8c15a7d

[PATCH v1 5/5] powerpc/mm: Convert powerpc to GENERIC_PTDUMP

2021-04-15 Thread Christophe Leroy
This patch converts powerpc to the generic PTDUMP implementation. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 2 + arch/powerpc/Kconfig.debug| 30 -- arch/powerpc/mm/Makefile | 2 +- arch/powerpc/mm/mmu_decl.h| 2 +- arch/powerpc

[PATCH v1 1/5] mm: pagewalk: Fix walk for hugepage tables

2021-04-15 Thread Christophe Leroy
Pagewalk ignores hugepd entries and walk down the tables as if it was traditionnal entries, leading to crazy result. Add walk_hugepd_range() and use it to walk hugepage tables. Signed-off-by: Christophe Leroy --- mm/pagewalk.c | 54 +-- 1 file

[PATCH v1 0/5] Convert powerpc to GENERIC_PTDUMP

2021-04-15 Thread Christophe Leroy
This series converts powerpc to generic PTDUMP. For that, we first need to add missing hugepd support to pagewalk and ptdump. Christophe Leroy (5): mm: pagewalk: Fix walk for hugepage tables mm: ptdump: Fix build failure mm: ptdump: Provide page size to notepage() mm: ptdump: Support

Re: [PATCH v13 14/14] powerpc/64s/radix: Enable huge vmalloc mappings

2021-04-15 Thread Christophe Leroy
Hi Nick, Le 17/03/2021 à 07:24, Nicholas Piggin a écrit : This reduces TLB misses by nearly 30x on a `git diff` workload on a 2-node POWER9 (59,800 -> 2,100) and reduces CPU cycles by 0.54%, due to vfs hashes being allocated with 2MB pages. Cc: linuxppc-...@lists.ozlabs.org Acked-by: Michael El

Re: linux-next: manual merge of the akpm-current tree with the powerpc tree

2021-04-15 Thread Christophe Leroy
Le 15/04/2021 à 12:08, Christophe Leroy a écrit : Le 15/04/2021 à 12:07, Christophe Leroy a écrit : Le 15/04/2021 à 11:58, Stephen Rothwell a écrit : Hi all, On Thu, 15 Apr 2021 19:44:17 +1000 Stephen Rothwell wrote: Today's linux-next merge of the akpm-current tree got a con

Re: linux-next: manual merge of the akpm-current tree with the powerpc tree

2021-04-15 Thread Christophe Leroy
Le 15/04/2021 à 12:07, Christophe Leroy a écrit : Le 15/04/2021 à 11:58, Stephen Rothwell a écrit : Hi all, On Thu, 15 Apr 2021 19:44:17 +1000 Stephen Rothwell wrote: Today's linux-next merge of the akpm-current tree got a conflict in:    arch/powerpc/kernel/module.c between c

Re: linux-next: manual merge of the akpm-current tree with the powerpc tree

2021-04-15 Thread Christophe Leroy
Le 15/04/2021 à 11:58, Stephen Rothwell a écrit : Hi all, On Thu, 15 Apr 2021 19:44:17 +1000 Stephen Rothwell wrote: Today's linux-next merge of the akpm-current tree got a conflict in: arch/powerpc/kernel/module.c between commit: 2ec13df16704 ("powerpc/modules: Load modules clos

  1   2   3   4   5   6   7   8   9   10   >