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

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

2024-04-12 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

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

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

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

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

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 >

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/module

[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

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. Use

[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

Re: PPC_FPU, ALTIVEC: enable_kernel_fp, put_vr, get_vr

2021-04-19 Thread Christophe Leroy
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 Ellerman Cc: linuxppc-...@lists.ozlabs.org Cc: Christophe Leroy Cc: Segher Boessenkool Cc: l

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

[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

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 using

[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

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:

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

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

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

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

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-16 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-16 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* * *

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

[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
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: 30d621f6723b ("mm: add generic ptdump") Cc: Steven Price Signed-off

[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

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 conflict

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 commit

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

[PATCH] mm: ptdump: Fix build failure

2021-04-15 Thread Christophe Leroy
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: 30d621f6723b ("mm: add generic ptdump") Cc: Steven Price Signed-off

[PATCH v3 3/3] powerpc/atomics: Remove atomic_inc()/atomic_dec() and friends

2021-04-14 Thread Christophe Leroy
to atomic_fetch_add_unless() which now handles immediate operands. Signed-off-by: Christophe Leroy --- v2: New --- arch/powerpc/include/asm/atomic.h | 95 --- 1 file changed, 95 deletions(-) diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h

[PATCH v3 2/3] powerpc/atomics: Use immediate operand when possible

2021-04-14 Thread Christophe Leroy
by approx another 8 kbytes. Signed-off-by: Christophe Leroy Acked-by: Segher Boessenkool --- v2: Use "addc/addic" --- arch/powerpc/include/asm/atomic.h | 56 +++ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/arch/powerpc/include/asm/atomic

[PATCH v3 1/3] powerpc/bitops: Use immediate operand when possible

2021-04-14 Thread Christophe Leroy
stwcx. r8,0,r10 c000d558: 7c e0 40 28 lwarx r7,0,r8 c000d55c: 54 e7 05 64 rlwinm r7,r7,0,21,18 c000d560: 7c e0 41 2d stwcx. r7,0,r8 On pmac32_defconfig, it reduces the text by approx 10 kbytes. Signed-off-by: Christophe Leroy --- v

[PATCH v3 3/4] powerpc: Rename probe_kernel_read_inst()

2021-04-14 Thread Christophe Leroy
When probe_kernel_read_inst() was created, it was to mimic probe_kernel_read() function. Since then, probe_kernel_read() has been renamed copy_from_kernel_nofault(). Rename probe_kernel_read_inst() into copy_inst_from_kernel_nofault(). Signed-off-by: Christophe Leroy --- v3

[PATCH v3 4/4] powerpc: Move copy_from_kernel_nofault_inst()

2021-04-14 Thread Christophe Leroy
to copy_from_kernel_nofault(). Move copy_from_kernel_nofault_inst() into mm/maccess.c Signed-off-by: Christophe Leroy --- v2: Remove inst.o from Makefile --- arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/inst.c | 26 -- arch/powerpc/mm/maccess.c | 21

[PATCH v3 2/4] powerpc: Make probe_kernel_read_inst() common to PPC32 and PPC64

2021-04-14 Thread Christophe Leroy
with the PPC64 part opted out via a IS_ENABLED(CONFIG_PPC64). The only need is to add a version of ppc_inst_prefix() for PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/inst.h | 2 ++ arch/powerpc/lib/inst.c | 17 + 2 files changed, 3 insertions(+), 16 deletions

[PATCH v3 1/4] powerpc: Remove probe_user_read_inst()

2021-04-14 Thread Christophe Leroy
. But on the other hand, it is not used for the time being. So remove it for now. If one day it is really needed, we can give it a new name more in line with today's naming, and implement it using get_user_inst() Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/inst.h | 3 --- arch/powerpc/lib/inst.c

Re: [PATCH v2 3/4] powerpc: Rename probe_kernel_read_inst()

2021-04-14 Thread Christophe Leroy
Le 14/04/2021 à 07:23, Aneesh Kumar K.V a écrit : Christophe Leroy writes: When probe_kernel_read_inst() was created, it was to mimic probe_kernel_read() function. Since then, probe_kernel_read() has been renamed copy_from_kernel_nofault(). Rename probe_kernel_read_inst

Re: [PATCH v1 1/2] powerpc/bitops: Use immediate operand when possible

2021-04-14 Thread Christophe Leroy
Le 14/04/2021 à 14:24, Segher Boessenkool a écrit : On Wed, Apr 14, 2021 at 12:01:21PM +1000, Nicholas Piggin wrote: Would be nice if we could let the compiler deal with it all... static inline unsigned long lr(unsigned long *mem) { unsigned long val; /* * This

Re: [PATCH] init: consolidate trap_init()

2021-04-14 Thread Christophe Leroy
Le 14/04/2021 à 10:58, Jisheng Zhang a écrit : Many architectures implement the trap_init() as NOP, since there is no such default for trap_init(), this empty stub is duplicated among these architectures. Provide a generic but weak NOP implementation to drop the empty stubs of trap_init() in

Re: [PATCH] mm: Define ARCH_HAS_FIRST_USER_ADDRESS

2021-04-14 Thread Christophe Leroy
Le 14/04/2021 à 07:59, Anshuman Khandual a écrit : On 4/14/21 10:52 AM, Christophe Leroy wrote: Le 14/04/2021 à 04:54, Anshuman Khandual a écrit : Currently most platforms define FIRST_USER_ADDRESS as 0UL duplicating the same code all over. Instead define a new option

Re: [PATCH] mm: Define ARCH_HAS_FIRST_USER_ADDRESS

2021-04-13 Thread Christophe Leroy
Le 14/04/2021 à 04:54, Anshuman Khandual a écrit : Currently most platforms define FIRST_USER_ADDRESS as 0UL duplicating the same code all over. Instead define a new option ARCH_HAS_FIRST_USER_ADDRESS for those platforms which would override generic default FIRST_USER_ADDRESS value 0UL. This

[PATCH v2 3/4] powerpc: Rename probe_kernel_read_inst()

2021-04-13 Thread Christophe Leroy
When probe_kernel_read_inst() was created, it was to mimic probe_kernel_read() function. Since then, probe_kernel_read() has been renamed copy_from_kernel_nofault(). Rename probe_kernel_read_inst() into copy_from_kernel_nofault_inst(). Signed-off-by: Christophe Leroy --- arch/powerpc/include

[PATCH v2 4/4] powerpc: Move copy_from_kernel_nofault_inst()

2021-04-13 Thread Christophe Leroy
to copy_from_kernel_nofault(). Move copy_from_kernel_nofault_inst() into mm/maccess.c Signed-off-by: Christophe Leroy --- v2: Remove inst.o from Makefile --- arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/inst.c | 26 -- arch/powerpc/mm/maccess.c | 21

[PATCH v2 2/4] powerpc: Make probe_kernel_read_inst() common to PPC32 and PPC64

2021-04-13 Thread Christophe Leroy
with the PPC64 part opted out via a IS_ENABLED(CONFIG_PPC64). The only need is to add a version of ppc_inst_prefix() for PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/inst.h | 2 ++ arch/powerpc/lib/inst.c | 17 + 2 files changed, 3 insertions(+), 16 deletions

[PATCH v2 1/4] powerpc: Remove probe_user_read_inst()

2021-04-13 Thread Christophe Leroy
. But on the other hand, it is not used for the time being. So remove it for now. If one day it is really needed, we can give it a new name more in line with today's naming, and implement it using get_user_inst() Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/inst.h | 3 --- arch/powerpc/lib/inst.c

[PATCH v2 2/2] powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto

2021-04-13 Thread Christophe Leroy
a branch in the likely path in addition to the trap. We've got some WARN_ON() in .softirqentry.text section so it needs to be added in the OTHER_TEXT_SECTIONS in modpost.c Signed-off-by: Christophe Leroy --- v2: Fix build failure when CONFIG_BUG is not selected. --- arch/powerpc/include/asm/b

[PATCH v2 1/2] powerpc/bug: Remove specific powerpc BUG_ON() and WARN_ON() on PPC32

2021-04-13 Thread Christophe Leroy
twnei r0,0 28: 69 6b 80 00 xorir11,r11,32768 2c: 55 6b 8f fe rlwinm r11,r11,17,31,31 30: 0f 0b 00 00 twnei r11,0 34: 7d 8c 42 e6 mftbr12 Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/bug.h | 9 ++-

[PATCH v2 3/3] powerpc/atomics: Remove atomic_inc()/atomic_dec() and friends

2021-04-13 Thread Christophe Leroy
to atomic_fetch_add_unless() which now handles immediate operands. Signed-off-by: Christophe Leroy --- v2: New --- arch/powerpc/include/asm/atomic.h | 95 --- 1 file changed, 95 deletions(-) diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h

[PATCH v2 1/3] powerpc/bitops: Use immediate operand when possible

2021-04-13 Thread Christophe Leroy
000d55c: 54 e7 05 64 rlwinm r7,r7,0,21,18 c000d560: 7c e0 41 2d stwcx. r7,0,r8 On pmac32_defconfig, it reduces the text by approx 10 kbytes. Signed-off-by: Christophe Leroy --- v2: - Use "n" instead of "i" as constraint for the rlwinm mask - Improv

[PATCH v2 2/3] powerpc/atomics: Use immediate operand when possible

2021-04-13 Thread Christophe Leroy
by approx another 8 kbytes. Signed-off-by: Christophe Leroy Acked-by: Segher Boessenkool --- v2: Use "addc/addic" --- arch/powerpc/include/asm/atomic.h | 56 +++ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/arch/powerpc/include/asm/atomic

Re: [PATCH v1 2/2] powerpc/atomics: Use immediate operand when possible

2021-04-13 Thread Christophe Leroy
Le 13/04/2021 à 00:08, Segher Boessenkool a écrit : Hi! On Thu, Apr 08, 2021 at 03:33:45PM +, Christophe Leroy wrote: +#define ATOMIC_OP(op, asm_op, dot, sign) \ static __inline__ void atomic_##op(int a, atomic_t *v

Re: [PATCH v1 1/2] powerpc/bitops: Use immediate operand when possible

2021-04-13 Thread Christophe Leroy
Le 12/04/2021 à 23:54, Segher Boessenkool a écrit : Hi! On Thu, Apr 08, 2021 at 03:33:44PM +, Christophe Leroy wrote: For clear bits, on 32 bits 'rlwinm' can be used instead or 'andc' for when all bits to be cleared are consecutive. Also on 64-bits, as long as both the top and bottom

[PATCH 2/2] powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto

2021-04-12 Thread Christophe Leroy
a branch in the likely path in addition to the trap. We've got some WARN_ON() in .softirqentry.text section so it needs to be added in the OTHER_TEXT_SECTIONS in modpost.c Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/kup.h | 2 +- arch/powerpc/incl

[PATCH 1/2] powerpc/bug: Remove specific powerpc BUG_ON() and WARN_ON() on PPC32

2021-04-12 Thread Christophe Leroy
twnei r0,0 28: 69 6b 80 00 xorir11,r11,32768 2c: 55 6b 8f fe rlwinm r11,r11,17,31,31 30: 0f 0b 00 00 twnei r11,0 34: 7d 8c 42 e6 mftbr12 Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/bug.h | 9 ++-

[PATCH 3/3] powerpc/ebpf32: Use standard function call for functions within 32M distance

2021-04-12 Thread Christophe Leroy
of memory to allocate for the EBPF code, so assume the 4 instructions sequence is required, so that enough memory is allocated. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ppc-opcode.h | 1 + arch/powerpc/net/bpf_jit.h| 3 +++ arch/powerpc/net/bpf_jit_comp32.c

[PATCH 2/3] powerpc/ebpf32: Rework 64 bits shifts to avoid tests and branches

2021-04-12 Thread Christophe Leroy
Re-implement BPF_ALU64 | BPF_{LSH/RSH/ARSH} | BPF_X with branchless implementation copied from misc_32.S. Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit_comp32.c | 39 +++ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/arch/powerpc/net

[PATCH 1/3] powerpc/ebpf32: Fix comment on BPF_ALU{64} | BPF_LSH | BPF_K

2021-04-12 Thread Christophe Leroy
Replace <<== by <<= Signed-off-by: Christophe Leroy --- arch/powerpc/net/bpf_jit_comp32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/net/bpf_jit_comp32.c b/arch/powerpc/net/bpf_jit_comp32.c index 003843273b43..ca6fe1583460 100644 --- a/arch

[PATCH v1 4/4] powerpc: Move copy_from_kernel_nofault_inst()

2021-04-12 Thread Christophe Leroy
to copy_from_kernel_nofault(). Move copy_from_kernel_nofault_inst() into mm/maccess.c Signed-off-by: Christophe Leroy --- arch/powerpc/lib/inst.c | 26 -- arch/powerpc/mm/maccess.c | 21 + 2 files changed, 21 insertions(+), 26 deletions(-) delete mode

[PATCH v1 3/4] powerpc: Rename probe_kernel_read_inst()

2021-04-12 Thread Christophe Leroy
When probe_kernel_read_inst() was created, it was to mimic probe_kernel_read() function. Since then, probe_kernel_read() has been renamed copy_from_kernel_nofault(). Rename probe_kernel_read_inst() into copy_from_kernel_nofault_inst(). Signed-off-by: Christophe Leroy --- arch/powerpc/include

[PATCH v1 2/4] powerpc: Make probe_kernel_read_inst() common to PPC32 and PPC64

2021-04-12 Thread Christophe Leroy
with the PPC64 part opted out via a IS_ENABLED(CONFIG_PPC64). The only need is to add a version of ppc_inst_prefix() for PPC32. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/inst.h | 2 ++ arch/powerpc/lib/inst.c | 17 + 2 files changed, 3 insertions(+), 16 deletions

  1   2   3   4   5   6   7   8   9   10   >