Re: [PATCH] powerpc/vdso: allow r30 in vDSO code generation of getrandom

2024-09-25 Thread Christophe Leroy
Le 25/09/2024 à 20:38, Jason A. Donenfeld a écrit : On Wed, Sep 25, 2024 at 07:50:22PM +0200, Jason A. Donenfeld wrote: For gettimeofday, -ffixed-r30 was passed to work around a bug in Go code, where the vDSO trampoline forgot to save and restore this register across function calls. But Go re

Re: [FSL P50x0] [GIT KERNEL] [VDSO] compiling issue

2024-09-19 Thread Christophe Leroy
Le 20/09/2024 à 06:30, Michael Ellerman a écrit : Christian Zigotzky writes: Hi All, The compiling of the latest Git kernel doesn’t work anymore for our FSL P5020/P5040 boards [1] since the random-6.12-rc1 updates [2]. Error messages: arch/powerpc/kernel/vdso/vdso32.so.dbg: dynamic reloc

[PATCH] powerpc/vdso32: Fix use of crtsavres for PPC64

2024-09-19 Thread Christophe Leroy
https://lore.kernel.org/linuxppc-dev/047b7503-af0c-4bb0-b12a-2f6b1e461...@csgroup.eu/T/ Fixes: b163596a5b6f ("powerpc/vdso32: Add crtsavres") Signed-off-by: Christophe Leroy --- arch/powerpc/lib/crtsavres.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/

Re: [FSL P50x0] [GIT KERNEL] [VDSO] compiling issue

2024-09-19 Thread Christophe Leroy
4dc78df45f69a2011bb5%7C0%7C0%7C638623549830486185%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=SQi%2B9R4TM59QB8Msxq3KuKPvvJEBMVUdyOhoY6ndzVU%3D&reserved=0 + Christophe Leroy + Michael Ellerman Can you try with the followin

Re: [RFC v2 03/13] book3s64/hash: Remove kfence support temporarily

2024-09-18 Thread Christophe Leroy
Le 19/09/2024 à 04:56, Ritesh Harjani (IBM) a écrit : Kfence on book3s Hash on pseries is anyways broken. It fails to boot due to RMA size limitation. That is because, kfence with Hash uses debug_pagealloc infrastructure. debug_pagealloc allocates linear map for entire dram size instead of jus

Re: [RFC v2 02/13] powerpc: mm: Fix kfence page fault reporting

2024-09-18 Thread Christophe Leroy
Le 19/09/2024 à 04:56, Ritesh Harjani (IBM) a écrit : copy_from_kernel_nofault() can be called when doing read of /proc/kcore. /proc/kcore can have some unmapped kfence objects which when read via copy_from_kernel_nofault() can cause page faults. Since *_nofault() functions define their own fi

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-18 Thread Christophe Leroy
Hi, Le 14/09/2024 à 04:22, Luming Yu a écrit : On Fri, Sep 13, 2024 at 02:15:40PM +0200, Christophe Leroy wrote: Le 13/09/2024 à 14:02, Luming Yu a écrit : ... nothing happens after that. reproduced with ppc64_defconfig [0.818972][T1] Run /init as init process [5.851684

Re: [PATCH net-next v2] page_pool: fix build on powerpc with GCC 14

2024-09-14 Thread Christophe Leroy
Le 14/09/2024 à 04:02, Michael Ellerman a écrit : Mina Almasry writes: Building net-next with powerpc with GCC 14 compiler results in this build error: /home/sfr/next/tmp/ccuSzwiR.s: Assembler messages: /home/sfr/next/tmp/ccuSzwiR.s:2579: Error: operand out of domain (39 is not a multiple o

Re: [PATCH net-next v1] mm: fix build on powerpc with GCC 14

2024-09-13 Thread Christophe Leroy
Hi, Le 13/09/2024 à 21:22, Matthew Wilcox a écrit : On Fri, Sep 13, 2024 at 07:20:36PM +, Mina Almasry wrote: +++ b/include/linux/page-flags.h @@ -239,8 +239,8 @@ static inline unsigned long _compound_head(const struct page *page) { unsigned long head = READ_ONCE(page->compound_h

Re: [PATCH] crypto: Removing CRYPTO_AES_GCM_P10.

2024-09-13 Thread Christophe Leroy
Le 13/09/2024 à 14:30, Danny Tsen a écrit : [Vous ne recevez pas souvent de courriers de dt...@linux.ibm.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] Removing CRYPTO_AES_GCM_P10 in Kconfig first so that we can apply the subsequent patches to fi

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-13 Thread Christophe Leroy
Le 13/09/2024 à 14:02, Luming Yu a écrit : ... nothing happens after that. reproduced with ppc64_defconfig [0.818972][T1] Run /init as init process [5.851684][ T240] request_module: modprobe binfmt-4c46 cannot be processed, kmod busy with 50 threads for more than 5 seconds now

Re: [PATCH 1/2] powerpc/vpa_pmu: Add interface to expose vpa counters via perf

2024-09-13 Thread Christophe Leroy
Le 13/09/2024 à 10:35, kajoljain a écrit : On 9/13/24 12:00, Christophe Leroy wrote: Le 28/08/2024 à 12:21, Kajol Jain a écrit : The pseries Shared Processor Logical Partition(SPLPAR) machines can retrieve a log of dispatch and preempt events from the hypervisor using data from Disptach

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-13 Thread Christophe Leroy
Le 13/09/2024 à 09:38, Luming Yu a écrit : On Fri, Sep 13, 2024 at 08:54:12AM +0200, Christophe Leroy wrote: Le 13/09/2024 à 03:40, Luming Yu a écrit : On Thu, Sep 12, 2024 at 12:23:29PM +0200, Christophe Leroy wrote: Le 12/09/2024 à 10:24, Luming Yu a écrit : From: Yu Luming

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-12 Thread Christophe Leroy
Le 13/09/2024 à 03:40, Luming Yu a écrit : On Thu, Sep 12, 2024 at 12:23:29PM +0200, Christophe Leroy wrote: Le 12/09/2024 à 10:24, Luming Yu a écrit : From: Yu Luming convert powerpc entry code in syscall and fault to use syscall_work and irqentry_state as well as common calls from

Re: [PATCH 1/2] powerpc/vpa_pmu: Add interface to expose vpa counters via perf

2024-09-12 Thread Christophe Leroy
Le 28/08/2024 à 12:21, Kajol Jain a écrit : The pseries Shared Processor Logical Partition(SPLPAR) machines can retrieve a log of dispatch and preempt events from the hypervisor using data from Disptach Trace Log(DTL) buffer. With this information, user can retrieve when and why each dispatch

[RFC PATCH] powerpc/vdso: Should VDSO64 functions be flagged as functions like VDSO32 ?

2024-09-12 Thread Christophe Leroy
s flag them as functions and revert the selftest change. What's your opinion on that ? It predates git kernel history and both VDSO32 and VDSO64 were brough by arch/ppc64/ with that difference already. Signed-off-by: Christophe Leroy --- commit ba83b3239e65 is in random git tree at the moment

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-12 Thread Christophe Leroy
Le 12/09/2024 à 10:24, Luming Yu a écrit : From: Yu Luming convert powerpc entry code in syscall and fault to use syscall_work and irqentry_state as well as common calls from generic entry infrastructure. Signed-off-by: Luming Yu --- arch/powerpc/Kconfig | 1 + arch/po

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-12 Thread Christophe Leroy
Le 12/09/2024 à 10:24, Luming Yu a écrit : From: Yu Luming convert powerpc entry code in syscall and fault to use syscall_work and irqentry_state as well as common calls from generic entry infrastructure. Signed-off-by: Luming Yu --- arch/powerpc/Kconfig | 1 + arch/po

Re: [PATCH 1/2] powerpc/entry: convert to common and generic entry

2024-09-12 Thread Christophe Leroy
Le 12/09/2024 à 10:24, Luming Yu a écrit : From: Yu Luming convert powerpc entry code in syscall and fault to use syscall_work and irqentry_state as well as common calls from generic entry infrastructure. Could you add more description about the change ? When I look at x86, riscv or s390

Re: [PATCH RFC v3 1/2] mm: Add personality flag to limit address to 47 bits

2024-09-10 Thread Christophe Leroy
diff --git a/include/uapi/linux/personality.h b/include/uapi/linux/personality.h index 49796b7756af..cd3b8c154d9b 100644 --- a/include/uapi/linux/personality.h +++ b/include/uapi/linux/personality.h @@ -22,6 +22,7 @@ enum { WHOLE_SECONDS = 0x200, STICKY_TIMEOUTS =

Re: No rule to make target 'arch/powerpc/boot/dtbImage.ps3', needed by 'arch/powerpc/boot/zImage'.

2024-09-10 Thread Christophe Leroy
Le 09/09/2024 à 21:25, Naresh Kamboju a écrit : The Powerpc cell_defconfig and mpc83xx_defconfig builds failed on the Linux next-20240909 due to following build warnings / errors with gcc-13 and clang-19. First seen on next-20240909 Good: next-20240906 BAD: next-20240909 Reported-by:

Re: linux-next: build failure after merge of the powerpc tree

2024-09-09 Thread Christophe Leroy
Le 09/09/2024 à 18:23, Masahiro Yamada a écrit : On Mon, Sep 9, 2024 at 11:58 PM Stephen Rothwell wrote: Hi Christophe, On Mon, 9 Sep 2024 16:22:26 +0200 Christophe Leroy wrote: Le 09/09/2024 à 12:09, Stephen Rothwell a écrit : Hi all, After merging the powerpc tree, today's

Re: linux-next: build failure after merge of the powerpc tree

2024-09-09 Thread Christophe Leroy
Le 09/09/2024 à 12:09, Stephen Rothwell a écrit : Hi all, After merging the powerpc tree, today's linux-next build (powerpc ppc44x_defconfig) failed like this: make[3]: *** No rule to make target 'arch/powerpc/boot/treeImage.ebony', needed by 'arch/powerpc/boot/zImage'. Stop. make[2]: ***

[PATCH] powerpc: Add __must_check to set_memory_...()

2024-09-08 Thread Christophe Leroy
It is now possible to flag those functions with __must_check to make sure no new unchecked call it added. Link: https://github.com/KSPP/linux/issues/7 Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/set_memory.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-)

[PATCH] set_memory: Add __must_check to generic stubs

2024-09-08 Thread Christophe Leroy
Make sure all callers check the returned code. Link: https://github.com/KSPP/linux/issues/7 Signed-off-by: Christophe Leroy --- include/linux/set_memory.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/set_memory.h b/include/linux/set_memory.h index 95

Re: [PATCH 2/2] Fixup for 3279be36b671 ("powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32")

2024-09-08 Thread Christophe Leroy
Le 07/09/2024 à 16:35, Jason A. Donenfeld a écrit : On Fri, Sep 06, 2024 at 08:54:49PM +0200, Jason A. Donenfeld wrote: On Fri, Sep 06, 2024 at 05:14:43PM +0200, Christophe Leroy wrote: Le 06/09/2024 à 16:46, Jason A. Donenfeld a écrit : On Fri, Sep 06, 2024 at 04:26:32PM +0200

Re: [PATCH 2/2] Fixup for 3279be36b671 ("powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32")

2024-09-06 Thread Christophe Leroy
Le 06/09/2024 à 16:46, Jason A. Donenfeld a écrit : On Fri, Sep 06, 2024 at 04:26:32PM +0200, Christophe Leroy wrote: On the long run I wonder if we should try to find a more generic solution for getrandom instead of requiring each architecture to handle it. On gettimeofday the selection of

Re: [PATCH 2/2] Fixup for 3279be36b671 ("powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32")

2024-09-06 Thread Christophe Leroy
Le 06/09/2024 à 16:07, Jason A. Donenfeld a écrit : On Fri, Sep 06, 2024 at 10:33:44AM +0200, Christophe Leroy wrote: Use the new get_realdatapage macro instead of get_datapage Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/vdso/getrandom.S | 2 +- 1 file changed, 1 insertion

Re: [PATCH 1/2] powerpc/vdso: Fix VDSO data access when running in a non-root time namespace

2024-09-06 Thread Christophe Leroy
Le 06/09/2024 à 14:23, Michael Ellerman a écrit : Christophe Leroy writes: When running in a non-root time namespace, the global VDSO data page is replaced by a dedicated namespace data page and the global data page is mapped next to it. Detailed explanations can be found at commit

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

2024-09-06 Thread Christophe Leroy
Le 26/08/2024 à 08:55, Mike Rapoport a écrit : 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 PMD_SIZE'ed pages with ROX permissions as a cache for smaller allocations. Why

[PATCH 2/2] Fixup for 3279be36b671 ("powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32")

2024-09-06 Thread Christophe Leroy
Use the new get_realdatapage macro instead of get_datapage Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/vdso/getrandom.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/vdso/getrandom.S b/arch/powerpc/kernel/vdso/getrandom.S index a957cd2b2b03

[PATCH 1/2] powerpc/vdso: Fix VDSO data access when running in a non-root time namespace

2024-09-06 Thread Christophe Leroy
they handle it internally. Fixes: 74205b3fc2ef ("powerpc/vdso: Add support for time namespaces") Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/vdso_datapage.h | 15 +++ arch/powerpc/kernel/asm-offsets.c| 2 ++ arch/powerpc/kernel/vdso/cacheflush.S| 2 +-

Re: [PATCH v5 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32

2024-09-05 Thread Christophe Leroy
vdso/vgetrandom.c index 5f855d45fb7b..9705344d39d0 100644 --- a/arch/powerpc/kernel/vdso/vgetrandom.c +++ b/arch/powerpc/kernel/vdso/vgetrandom.c @@ -4,11 +4,19 @@ * * Copyright (C) 2024 Christophe Leroy , CS GROUP France */ +#include #include #include +#include + ssize_t __c_kernel_getr

Re: [PATCH v5 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32

2024-09-05 Thread Christophe Leroy
Le 05/09/2024 à 18:13, Jason A. Donenfeld a écrit : +/* + * The macro sets two stack frames, one for the caller and one for the callee + * because there are no requirement for the caller to set a stack frame when + * calling VDSO so it may have omitted to set one, especially on PPC64 + */ + +.

Re: [PATCH] soc: fsl: qe: ucc: Export ucc_mux_set_grant_tsa_bkpt

2024-09-05 Thread Christophe Leroy
t_tsa_bkpt. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202409051409.fszn8reo-...@intel.com/ Signed-off-by: Herve Codina Acked-by: Christophe Leroy Arnd, it is ok for you to take this patch directly ? Thanks Christophe --- drivers/soc/fsl/qe/ucc.c | 1 + 1 fi

Re: [PATCH v5 0/5] Wire up getrandom() vDSO implementation on powerpc

2024-09-04 Thread Christophe Leroy
Le 04/09/2024 à 16:16, Jason A. Donenfeld a écrit : Hi Christophe, Michael, On Mon, Sep 02, 2024 at 09:17:17PM +0200, Christophe Leroy wrote: This series wires up getrandom() vDSO implementation on powerpc. Tested on PPC32 on real hardware. Tested on PPC64 (both BE and LE) on QEMU

Profiling of vdso_test_random

2024-09-04 Thread Christophe Leroy
Hi, I'm done a 'perf record' on vdso_test_random reduced to vdso test only, and I get the following function usage profile. Do you see the same type of percentage on your platforms ? I would have expected most of the time to be spent in __arch_chacha20_blocks_nostack() but that's in fact not

[PATCH] soc: fsl: cpm1: qmc: Fix dependency on fsl_soc.h

2024-09-04 Thread Christophe Leroy
_QMC also depends, so it can go away, leaving only a simple dependency on FSL_SOC. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/lkml/20240904104859.020fe...@canb.auug.org.au/ Fixes: 8655b76b7004 ("soc: fsl: cpm1: qmc: Handle QUICC Engine (QE) soft-qmc firmware")

Re: [PATCH 2/2] mm: make copy_to_kernel_nofault() not fault on user addresses

2024-09-04 Thread Christophe Leroy
Hi, Le 02/09/2024 à 07:31, Omar Sandoval a écrit : [Vous ne recevez pas souvent de courriers de osan...@osandov.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] From: Omar Sandoval I found that on x86, copy_to_kernel_nofault() still faults on addre

Re: [PATCH RFC v2 2/4] mm: Add hint and mmap_flags to struct vm_unmapped_area_info

2024-09-03 Thread Christophe Leroy
Hi Charlie, Le 29/08/2024 à 09:15, Charlie Jenkins a écrit : The hint address and mmap_flags are necessary to determine if MAP_BELOW_HINT requirements are satisfied. Signed-off-by: Charlie Jenkins --- arch/alpha/kernel/osf_sys.c | 2 ++ arch/arc/mm/mmap.c | 3 +++ arch/a

Re: [PATCH] of/irq: handle irq_of_parse_and_map() errors

2024-09-03 Thread Christophe Leroy
Le 30/08/2024 à 16:21, Ma Ke a écrit : Zero and negative number is not a valid IRQ for in-kernel code and the irq_of_parse_and_map() function returns zero on error. So this check for valid IRQs should only accept values > 0. unsigned int irq_of_parse_and_map(struct device_node *node, int in

Re: [PATCH] soc: fsl: qbman: Remove redundant warnings

2024-09-03 Thread Christophe Leroy
Le 02/08/2024 à 04:16, Xiaolei Wang a écrit : [Vous ne recevez pas souvent de courriers de xiaolei.w...@windriver.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] RESERVEDMEM_OF_DECLARE usage has been removed. For non-popwerpc platforms, such as l

Re: [PATCH 1/1] soc/fsl/qbman: Use iommu_paging_domain_alloc()

2024-09-03 Thread Christophe Leroy
Le 12/08/2024 à 09:25, Lu Baolu a écrit : [Vous ne recevez pas souvent de courriers de baolu...@linux.intel.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] An iommu domain is allocated in portal_set_cpu() and is attached to pcfg->dev in the same

Re: [PATCH v2 00/36] soc: fsl: Add support for QUICC Engine TSA and QMC

2024-09-03 Thread Christophe Leroy
Le 08/08/2024 à 09:10, Herve Codina a écrit : Hi, This series add support for the QUICC Engine (QE) version of TSA and QMC components. CPM1 version is already supported and, as the QE version of those component are pretty similar to the CPM1 version, the series extend the already existing dr

[GIT PULL] SOC FSL for 6.12 (retry)

2024-09-02 Thread Christophe Leroy
main_alloc() ---- Christophe Leroy (1): Merge branch 'support-for-quicc-engine-tsa-and-qmc' Herve Codina (36): soc: fsl: cpm1: qmc: Update TRNSYNC only in transparent mode soc: fsl: cpm1: qmc: Enable TRNSYNC only when n

[PATCH v5 5/5] powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO64

2024-09-02 Thread Christophe Leroy
-by: Christophe Leroy --- v5: - VDSO32 for both PPC32 and PPC64 is in previous patch. This patch have the logic for VDSO64. v4: - Use __BIG_ENDIAN__ which is defined by GCC instead of CONFIG_CPU_BIG_ENDIAN which is unknown by selftests - Implement a cleaner/smaller output copy for little endian

[PATCH v5 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32

2024-09-02 Thread Christophe Leroy
gs support for VDSO64 anyway, this patch opts out all code in __arch_chacha20_blocks_nostack() so that vdso_test_chacha will not fail to compile and will not crash on PPC64/PPC64LE, allthough the selftest itself will fail. Signed-off-by: Christophe Leroy --- v5: - Add back vdso symlink that vani

[PATCH v5 3/5] powerpc/vdso: Refactor CFLAGS for CVDSO build

2024-09-02 Thread Christophe Leroy
In order to avoid two much duplication when we add new VDSO functionnalities in C like getrandom, refactor common CFLAGS. Signed-off-by: Christophe Leroy --- v3: Also refactor removed flags --- arch/powerpc/kernel/vdso/Makefile | 32 +-- 1 file changed, 13 insertions

[PATCH v5 2/5] powerpc/vdso32: Add crtsavres

2024-09-02 Thread Christophe Leroy
ve/restore functions when optimising the kernel for size. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/vdso/Makefile | 5 - arch/powerpc/kernel/vdso/gettimeofday.S | 13 - 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel/vdso/Makefi

[PATCH v5 1/5] mm: Define VM_DROPPABLE for powerpc/32

2024-09-02 Thread Christophe Leroy
_ARCH_1 is used for VM_SAO on powerpc and VM_SAO is only for powerpc/64. It is used in combination with PROT_SAO in some parts of code that are restricted to CONFIG_PPC64 through #ifdefs, it is therefore possible to define VM_SAO for CONFIG_PPC64 only. Signed-off-by: Christophe Leroy --- v4:

[PATCH v5 0/5] Wire up getrandom() vDSO implementation on powerpc

2024-09-02 Thread Christophe Leroy
PPC32, second for PPC64 - Moved selftest fixes out of this series Changes in v2: - Define VM_DROPPABLE for powerpc/32 - Fixes generic vDSO getrandom headers to enable CONFIG_COMPAT build. - Fixed size of generation counter - Fixed selftests to work on non x86 architectures Christophe Leroy (5): mm: D

Re: [PATCH v4 5/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC64

2024-09-02 Thread Christophe Leroy
Hi Jason, hi Michael, Le 02/09/2024 à 16:19, Jason A. Donenfeld a écrit : On Mon, Sep 02, 2024 at 04:16:48PM +0200, Christophe Leroy wrote: Can do that, but there will still be a problem with chacha selftests if I don't opt-out the entire function content when it is ppc64. It will

Re: [PATCH v4 5/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC64

2024-09-02 Thread Christophe Leroy
Le 02/09/2024 à 16:00, Jason A. Donenfeld a écrit : On Mon, Sep 02, 2024 at 03:12:47PM +0200, Christophe Leroy wrote: Le 02/09/2024 à 14:41, Jason A. Donenfeld a écrit : On Mon, Sep 02, 2024 at 02:04:42PM +0200, Christophe Leroy wrote: SYM_FUNC_START(__arch_chacha20_blocks_nostack

Re: [PATCH v4 5/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC64

2024-09-02 Thread Christophe Leroy
Le 02/09/2024 à 14:41, Jason A. Donenfeld a écrit : On Mon, Sep 02, 2024 at 02:04:42PM +0200, Christophe Leroy wrote: SYM_FUNC_START(__arch_chacha20_blocks_nostack) #ifdef __powerpc64__ - blr + std r5, -216(r1) + + std r14, -144(r1) + std r15, -136(r1

Re: [PATCH v4 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC32

2024-09-02 Thread Christophe Leroy
Le 02/09/2024 à 14:34, Jason A. Donenfeld a écrit : On Mon, Sep 02, 2024 at 02:04:41PM +0200, Christophe Leroy wrote: This first patch adds support for PPC32. As selftests cannot easily be generated only for PPC32, and because the following patch brings support for PPC64 anyway, this patch

[PATCH v4 5/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC64

2024-09-02 Thread Christophe Leroy
-off-by: Christophe Leroy --- v4: - Use __BIG_ENDIAN__ which is defined by GCC instead of CONFIG_CPU_BIG_ENDIAN which is unknown by selftests - Implement a cleaner/smaller output copy for little endian instead of keeping compat macro. v3: New (split out of previous patch) --- arch/powerpc/Kconfig

[PATCH v4 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC32

2024-09-02 Thread Christophe Leroy
n PPC64 so that vdso_test_getrandom returns KSFT_SKIP instead of KSFT_FAIL. Signed-off-by: Christophe Leroy --- v4: - Counter has native byte order - Fix selftest build on ppc64le until implemented. - On ppc64, for now implement __kernel_getrandom to return ENOSYS error - Use stwbrx directly,

[PATCH v4 3/5] powerpc/vdso: Refactor CFLAGS for CVDSO build

2024-09-02 Thread Christophe Leroy
In order to avoid two much duplication when we add new VDSO functionnalities in C like getrandom, refactor common CFLAGS. Signed-off-by: Christophe Leroy --- v3: Also refactor removed flags --- arch/powerpc/kernel/vdso/Makefile | 32 +-- 1 file changed, 13 insertions

[PATCH v4 1/5] mm: Define VM_DROPPABLE for powerpc/32

2024-09-02 Thread Christophe Leroy
_ARCH_1 is used for VM_SAO on powerpc and VM_SAO is only for powerpc/64. It is used in combination with PROT_SAO in some parts of code that are restricted to CONFIG_PPC64 through #ifdefs, it is therefore possible to define VM_SAO for CONFIG_PPC64 only. Signed-off-by: Christophe Leroy --- v4:

[PATCH v4 2/5] powerpc/vdso32: Add crtsavres

2024-09-02 Thread Christophe Leroy
ve/restore functions when optimising the kernel for size. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/vdso/Makefile | 5 - arch/powerpc/kernel/vdso/gettimeofday.S | 13 - 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel/vdso/Makefi

[PATCH v4 0/5] Wire up getrandom() vDSO implementation on powerpc

2024-09-02 Thread Christophe Leroy
Fixed selftests to work on non x86 architectures Christophe Leroy (5): mm: Define VM_DROPPABLE for powerpc/32 powerpc/vdso32: Add crtsavres powerpc/vdso: Refactor CFLAGS for CVDSO build powerpc/vdso: Wire up getrandom() vDSO implementation on PPC32 powerpc/vdso: Wire up getrandom()

Re: [PATCH 0/2] mm: make copy_to_kernel_nofault() not fault on user addresses

2024-09-01 Thread Christophe Leroy
Le 02/09/2024 à 07:31, Omar Sandoval a écrit : [Vous ne recevez pas souvent de courriers de osan...@osandov.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] From: Omar Sandoval Hi, I hit a case where copy_to_kernel_nofault() will fault (lol): if

[PATCH] selftests: vDSO: Also test counter in vdso_test_chacha

2024-09-01 Thread Christophe Leroy
;nonce' which is not unused anymore after the replacement of libsodium by open coded chacha implementation. Signed-off-by: Christophe Leroy --- .../testing/selftests/vDSO/vdso_test_chacha.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/too

[PATCH] selftests: vDSO: Build vDSO tests with O2 optimisation

2024-09-01 Thread Christophe Leroy
TAP version 13 1..1 ok 1 chacha: PASS real0m 32.09s user0m 31.86s sys 0m 0.22s Signed-off-by: Christophe Leroy --- tools/testing/selftests/vDSO/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing

Re: [PATCH v3 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC32

2024-08-30 Thread Christophe Leroy
Le 30/08/2024 à 18:17, Jason A. Donenfeld a écrit : On Fri, Aug 30, 2024 at 05:57:08PM +0200, Christophe Leroy wrote: @@ -14,6 +14,10 @@ ifeq ($(uname_M),x86_64) TEST_GEN_PROGS += vdso_test_getrandom TEST_GEN_PROGS += vdso_test_chacha endif +ifeq ($(ARCH),powerpc) +TEST_GEN_PROGS

Re: [PATCH v3 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC32

2024-08-30 Thread Christophe Leroy
Le 30/08/2024 à 18:42, Christophe Leroy a écrit : Le 30/08/2024 à 18:14, Jason A. Donenfeld a écrit : On Fri, Aug 30, 2024 at 05:57:08PM +0200, Christophe Leroy wrote: + *    r5: 8-byte counter input/output (saved on stack) + * + *    r14-r15: counter + */ +SYM_FUNC_START

Re: [PATCH v3 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC32

2024-08-30 Thread Christophe Leroy
Le 30/08/2024 à 18:14, Jason A. Donenfeld a écrit : On Fri, Aug 30, 2024 at 05:57:08PM +0200, Christophe Leroy wrote: + * r5: 8-byte counter input/output (saved on stack) + * + * r14-r15: counter + */ +SYM_FUNC_START(__arch_chacha20_blocks_nostack) + stwur1, -96(r1

[PATCH v3 5/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC64

2024-08-30 Thread Christophe Leroy
-off-by: Christophe Leroy --- v3: New (split out of previous patch) --- arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/mman.h | 2 +- arch/powerpc/kernel/vdso/Makefile| 10 +- arch/powerpc/kernel/vdso/getrandom.S | 8 ++ arch/powerpc

[PATCH v3 3/5] powerpc/vdso: Refactor CFLAGS for CVDSO build

2024-08-30 Thread Christophe Leroy
In order to avoid two much duplication when we add new VDSO functionnalities in C like getrandom, refactor common CFLAGS. Signed-off-by: Christophe Leroy --- v3: Also refactor removed flags --- arch/powerpc/kernel/vdso/Makefile | 32 +-- 1 file changed, 13 insertions

[PATCH v3 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC32

2024-08-30 Thread Christophe Leroy
vdso: 2500 times in 16.899318858 seconds libc: 2500 times in 131.050596522 seconds syscall: 2500 times in 129.794790389 seconds Signed-off-by: Christophe Leroy --- v3: - Preserve r13, implies saving r5 on stack - Split PPC64 implementation out. --- arch/power

[PATCH v3 2/5] powerpc/vdso32: Add crtsavres

2024-08-30 Thread Christophe Leroy
ve/restore functions when optimising the kernel for size. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/vdso/Makefile | 5 - arch/powerpc/kernel/vdso/gettimeofday.S | 13 - 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/kernel/vdso/Makefi

[PATCH v3 1/5] mm: Define VM_DROPPABLE for powerpc/32

2024-08-30 Thread Christophe Leroy
_ARCH_1 is used for VM_SAO on powerpc and VM_SAO is only for powerpc/64. Signed-off-by: Christophe Leroy --- v3: Fixed build failure reported by robots. --- fs/proc/task_mmu.c | 4 +++- include/linux/mm.h | 4 +++- include/trace/events/mmflags.h | 4 ++-- 3 files

[PATCH v3 0/5] Wire up getrandom() vDSO implementation on powerpc

2024-08-30 Thread Christophe Leroy
v2: - Define VM_DROPPABLE for powerpc/32 - Fixes generic vDSO getrandom headers to enable CONFIG_COMPAT build. - Fixed size of generation counter - Fixed selftests to work on non x86 architectures Christophe Leroy (5): mm: Define VM_DROPPABLE for powerpc/32 powerpc/vdso32: Add crtsavres

[PATCH 5/5] selftests: vdso: Use parse_vdso.h in vdso_test_abi

2024-08-30 Thread Christophe Leroy
Don't duplicate parse_vdso function prototypes, include the header instead. Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest") Signed-off-by: Christophe Leroy --- tools/testing/selftests/vDSO/vdso_test_abi.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) dif

[PATCH 4/5] selftests: vdso: Fix the way vDSO functions are called for powerpc

2024-08-30 Thread Christophe Leroy
a selftest for vDSO getcpu()") Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest") Fixes: b2f1c3db2887 ("kselftest: Extend vdso correctness test to clock_gettime64") Fixes: 4920a2590e91 ("selftests/vDSO: add tests for vgetrandom") Signed-off-by: Ch

[PATCH 3/5] selftests: vdso: Fix vDSO symbols lookup for powerpc64

2024-08-30 Thread Christophe Leroy
57868 NOTYPE GLOBAL DEFAULT8 __kernel_time 54: 04d084 NOTYPE GLOBAL DEFAULT8 __kernel_clock_g[...] 55: 05bc52 NOTYPE GLOBAL DEFAULT8 __kernel_get_sys[...] Fixes: 98eedc3a9dbf ("Document the vDSO and add a reference parser&quo

[PATCH 2/5] selftests: vdso: Fix vdso_config for powerpc

2024-08-30 Thread Christophe Leroy
__powerpc64__ needs to be checked first in vdso_config.h Fixes: 693f5ca08ca0 ("kselftest: Extend vDSO selftest") Signed-off-by: Christophe Leroy --- tools/testing/selftests/vDSO/vdso_config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/self

[PATCH 1/5] selftests: vdso: Fix vDSO name for powerpc

2024-08-30 Thread Christophe Leroy
powerpc, vDSO is neither called linux-vdso.so.1 nor linux-gate.so.1 but linux-vdso32.so.1 or linux-vdso64.so.1. Also search those two names before giving up. Fixes: c7e5789b24d3 ("kselftest: Move test_vdso to the vDSO test suite") Signed-off-by: Christophe Leroy --- tools/testing/self

Re: [PATCH v2 05/17] vdso: Avoid call to memset() by getrandom

2024-08-29 Thread Christophe Leroy
Le 29/08/2024 à 20:02, Segher Boessenkool a écrit : On Thu, Aug 29, 2024 at 07:36:38PM +0200, Christophe Leroy wrote: Le 28/08/2024 à 19:25, Segher Boessenkool a écrit : Not sure about static binaries, though: do those even use the VDSO? With "static binary" people usual

Re: [PATCH v2 05/17] vdso: Avoid call to memset() by getrandom

2024-08-29 Thread Christophe Leroy
Le 28/08/2024 à 19:25, Segher Boessenkool a écrit : Not sure about static binaries, though: do those even use the VDSO? With "static binary" people usually mean "a binary not using any DSOs", I think the VDSO is a DSO, also in this respect? As always, -static builds are *way* less problem

Re: [PATCH] random: vDSO: Redefine PAGE_SIZE and PAGE_MASK

2024-08-29 Thread Christophe Leroy
Hi Vincenzo, Le 29/08/2024 à 14:01, Vincenzo Frascino a écrit : Hi Christophe, On 27/08/2024 18:14, Christophe Leroy wrote: Le 27/08/2024 à 18:05, Vincenzo Frascino a écrit : Hi Christophe, On 27/08/2024 11:49, Christophe Leroy wrote: ... ... Could you please clarify where minmax is

Re: [PATCH net-next 5/6] net: ethernet: fs_enet: fcc: use macros for speed and duplex values

2024-08-28 Thread Christophe Leroy
Le 28/08/2024 à 11:51, Maxime Chevallier a écrit : The PHY speed and duplex should be manipulated using the SPEED_XXX and DUPLEX_XXX macros available. Use it in the fcc, fec and scc MAC for fs_enet. Signed-off-by: Maxime Chevallier Reviewed-by: Christophe Leroy --- drivers/net

Re: [PATCH net-next 4/6] net: ethernet: fs_enet: drop unused phy_info and mii_if_info

2024-08-28 Thread Christophe Leroy
;t been used since commit 5b4b8454344a ("[PATCH] FS_ENET: use PAL for mii management") Reviewed-by: Christophe Leroy Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/net/ethe

Re: [PATCH net-next 3/6] net: ethernet: fs_enet: drop the .adjust_link custom fs_ops

2024-08-28 Thread Christophe Leroy
Le 28/08/2024 à 11:50, Maxime Chevallier a écrit : There's no in-tree user for the fs_ops .adjust_link() function, so we can always use the generic one in fe_enet-main. Signed-off-by: Maxime Chevallier Reviewed-by: Christophe Leroy --- drivers/net/ethernet/freescale/fs_enet/fs

Re: [PATCH net-next 2/6] net: ethernet: fs_enet: cosmetic cleanups

2024-08-28 Thread Christophe Leroy
L pointers - Splitting cascaded assignments into individual assignments - Fixing some typos - Fixing whitespace issues This is a cosmetic change and doesn't introduce any change in behaviour. Signed-off-by: Maxime Chevallier Reviewed-by: Christophe Leroy --- .../ethernet/freescale/fs_enet

Re: [PATCH net-next 1/6] net: ethernet: fs_enet: convert to SPDX

2024-08-28 Thread Christophe Leroy
Chevallier Reviewed-by: Christophe Leroy --- drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 5 + drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 5 + drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 5 + drivers/net/ethernet/freescale/fs_enet/mac-scc.c

Re: [PATCH net-next 0/6] net: ethernet: fs_enet: Cleanup and phylink conversion

2024-08-28 Thread Christophe Leroy
For the series, Acked-by: Christophe Leroy # LINUX FOR POWERPC EMBEDDED PPC8XX AND PPC83XX .../net/ethernet/freescale/fs_enet/Kconfig| 2 +- .../ethernet/freescale/fs_enet/fs_enet-main.c | 421 -- .../net/ethernet/freescale/fs_enet/fs_enet.h | 24 +- .../net/ethernet/fr

Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2024-08-28 Thread Christophe Leroy
Le 28/08/2024 à 08:50, Luming Yu a écrit : On Wed, Aug 28, 2024 at 07:46:52AM +0200, Christophe Leroy wrote: Hi, Le 28/08/2024 à 05:17, 虞陆铭 a écrit : Hi, it appears the little feature might require a little bit more work to find its value of the patch. Using the following debug module

Re: [PATCH 07/16] powerpc: mm: Support MAP_BELOW_HINT

2024-08-27 Thread Christophe Leroy
Hi Charlie, Le 28/08/2024 à 07:49, Charlie Jenkins a écrit : Add support for MAP_BELOW_HINT to arch_get_mmap_base() and arch_get_mmap_end(). Signed-off-by: Charlie Jenkins --- arch/powerpc/include/asm/task_size_64.h | 36 +++-- 1 file changed, 30 insertions(+), 6

Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2024-08-27 Thread Christophe Leroy
= kthread_stop(tur->worker); if (ret) pr_err("can't stop test_user_return kthread for cpu %d", i); } } free_percpu(user_return_test); return; } module_init(init_test_user_return); module_

Re: [PATCH] random: vDSO: Redefine PAGE_SIZE and PAGE_MASK

2024-08-27 Thread Christophe Leroy
Le 27/08/2024 à 18:05, Vincenzo Frascino a écrit : Hi Christophe, On 27/08/2024 11:49, Christophe Leroy wrote: ... These are still two headers outside of the vdso/ namespace. For arm64 we had concluded that this is never safe, and any vdso header should only include other vdso headers

Re: [PATCH] powerpc: Use printk instead of WARN in change_memory_attr

2024-08-27 Thread Christophe Leroy
Le 27/08/2024 à 11:12, Ritesh Harjani (IBM) a écrit : [Vous ne recevez pas souvent de courriers de ritesh.l...@gmail.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] Use pr_warn_once instead of WARN_ON_ONCE as discussed here [1] for printing possib

Re: [PATCH] random: vDSO: Redefine PAGE_SIZE and PAGE_MASK

2024-08-27 Thread Christophe Leroy
. The commit is still pretty small. Something like below: From 0d9a3d68cd6222395a605abd0ac625c41d4cabfa Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Tue, 27 Aug 2024 09:31:47 +0200 Subject: [PATCH] random: vDSO: clean header inclusion in getrandom Depending on the architecture, building a 3

Re: [PATCH] random: vDSO: Redefine PAGE_SIZE and PAGE_MASK

2024-08-27 Thread Christophe Leroy
I think I'll combine these header fixups so that the whole operation is a bit more clear. The commit is still pretty small. Something like below: Looks good to me. Thanks Christophe From 0d9a3d68cd6222395a605abd0ac625c41d4cabfa Mon Sep 17 00:00:00 2001 From: Christophe Leroy Date: Tue, 2

Re: [PATCH 2/4] random: vDSO: Don't use PAGE_SIZE and PAGE_MASK

2024-08-27 Thread Christophe Leroy
Le 27/08/2024 à 09:49, Jason A. Donenfeld a écrit : On Tue, Aug 27, 2024 at 09:31:48AM +0200, Christophe Leroy wrote: - ssize_t ret = min_t(size_t, INT_MAX & PAGE_MASK /* = MAX_RW_COUNT */, len); + const unsigned long page_size = 1UL << CONFIG_PAGE_SHIFT; + cons

[PATCH] random: vDSO: Redefine PAGE_SIZE and PAGE_MASK

2024-08-27 Thread Christophe Leroy
E_SIZE and PAGE_MASK based on CONFIG_PAGE_SHIFT. Signed-off-by: Christophe Leroy --- v3: Use local consts instead of _PAGE_SIZE and _PAGE_MASK macros that are already defined by some architectures. v4: undefine and redefine PAGE_SIZE and PAGE_MASK --- lib/vdso/getrandom.c | 5 + 1 file c

[PATCH 4/4] random: vDSO: don't use 64 bits atomics on 32 bits architectures

2024-08-27 Thread Christophe Leroy
ectures the store will be performed in the upper 32 bits. It is not an issue on its own because the vDSO site doesn't mind the value, it only checks differences. Just make sure that the vDSO side checks the full 64 bits, for that the local current_generation has to be u64 as well. Signed-off-

[PATCH 3/4] random: vDSO: Clean header inclusion in getrandom

2024-08-27 Thread Christophe Leroy
to missing 'struct timespec64' in x86's asm/pvclock.h. Add a forward declaration of that struct in that file. Signed-off-by: Christophe Leroy --- v3: Split PAGE_SIZE/PAGE_MASK subject in another patch and explained the forward declaration of 'struct timespec64' in commit

[PATCH 2/4] random: vDSO: Don't use PAGE_SIZE and PAGE_MASK

2024-08-27 Thread Christophe Leroy
ocal consts that constains the calculated page size and page mask. Signed-off-by: Christophe Leroy --- v3: Use local consts instead of _PAGE_SIZE and _PAGE_MASK macros that are already defined by some architectures. --- lib/vdso/getrandom.c | 6 -- 1 file changed, 4 insertions(+), 2 delet

[PATCH 1/4] asm-generic/unaligned.h: Extract common header for vDSO

2024-08-27 Thread Christophe Leroy
vDSO"): Move __get_unaligned_t and __put_unaligned_t into a new unaligned.h living in the vdso/ include directory. Signed-off-by: Christophe Leroy --- include/asm-generic/unaligned.h | 11 +-- include/vdso/unaligned.h| 15 +++ 2 files changed, 16 inserti

  1   2   3   4   5   6   7   8   9   10   >