Re: [PATCH v5 3/4] arm64: topology: Support SMT control on ACPI based system

2024-09-02 Thread Pierre Gondois
Hello Yicong On 8/30/24 11:35, Yicong Yang wrote: On 2024/8/29 20:46, Pierre Gondois wrote: Hello Yicong, On 8/29/24 09:40, Yicong Yang wrote: Hi Pierre, On 2024/8/27 23:40, Pierre Gondois wrote: Hello Yicong, IIUC we are looking for the maximum number of threads a CPU can have in the platf

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

2024-09-02 Thread Luming Yu
Wed, Aug 28, 2024 at 09:27:23AM +0200, Christophe Leroy wrote: > > > 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 feat

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

2024-09-02 Thread David Hildenbrand
On 02.09.24 08:31, Omar Sandoval wrote: On Mon, Sep 02, 2024 at 08:19:33AM +0200, Christophe Leroy wrote: 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/LearnAboutSenderId

[PATCH] cpufreq: Fix the cacography in powernv-cpufreq.c

2024-09-02 Thread Liu Jing
The word 'swtich' is wrong, so fix it. Signed-off-by: Liu Jing --- drivers/cpufreq/powernv-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index fddbd1ea1635..64fa92623a51 100644 --- a/drivers/cp

Re: [GIT PULL] SOC FSL for 6.12

2024-09-02 Thread Arnd Bergmann
On Wed, Aug 28, 2024, at 13:44, Christophe Leroy wrote: > Hi Arnd, > > Please pull the following Freescale Soc Drivers changes for 6.12: > - A series from Hervé Codina that bring support for the newer version of > QMC (QUICC Multi-channel Controller) and TSA (Time Slots Assigner) found > on MPC 8

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

2024-09-02 Thread Christophe Leroy
This series wires up getrandom() vDSO implementation on powerpc. Tested on PPC32 on real hardware. Tested on PPC64 (both BE and LE) on QEMU: Performance on powerpc 885: ~# ./vdso_test_getrandom bench-single vdso: 2500 times in 62.938002291 seconds libc: 2500

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

2024-09-02 Thread Christophe Leroy
Commit 08c18b63d965 ("powerpc/vdso32: Add missing _restgpr_31_x to fix build failure") added _restgpr_31_x to the vdso for gettimeofday, but the work on getrandom shows that we will need more of those functions. Remove _restgpr_31_x and link in crtsavres.o so that we get all save/restore functions

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

2024-09-02 Thread Christophe Leroy
Commit 9651fcedf7b9 ("mm: add MAP_DROPPABLE for designating always lazily freeable mappings") only adds VM_DROPPABLE for 64 bits architectures. In order to also use the getrandom vDSO implementation on powerpc/32, use VM_ARCH_1 for VM_DROPPABLE on powerpc/32. This is possible because VM_ARCH_1 is

[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 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC32

2024-09-02 Thread Christophe Leroy
To be consistent with other VDSO functions, the function is called __kernel_getrandom() __arch_chacha20_blocks_nostack() fonction is implemented basically with 32 bits operations. It performs 4 QUARTERROUND operations in parallele. There are enough registers to avoid using the stack: On input:

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

2024-09-02 Thread Christophe Leroy
Extend getrandom() vDSO implementation to powerpc64. Tested on QEMU on both ppc64_defconfig and ppc64le_defconfig. The results are not precise as it is QEMU on an x86 laptop, but no need to be precise to see the benefit. ~ # ./vdso_test_getrandom bench-single vdso: 2500 times in 4.971

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

2024-09-02 Thread Jason A. Donenfeld
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 opts out all code in > __arch_chacha20_blocks_nostack(

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

2024-09-02 Thread Jason A. Donenfeld
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) > + std r16, -128(r1) > + std r17, -12

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 op

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 5/5] powerpc/vdso: Wire up getrandom() vDSO implementation on PPC64

2024-09-02 Thread Jason A. Donenfeld
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) > >> #ifdef __powerpc64__ > >> - blr > >> + s

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 Jason A. Donenfeld
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 > build properly but if someone runs it on a ppc64 it will likely crash > because on

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 build properl

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

2024-09-02 Thread Jason A. Donenfeld
On Mon, Sep 02, 2024 at 04:27:12PM +0200, Christophe Leroy wrote: > 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 > >>

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

2024-09-02 Thread Omar Sandoval
On Mon, Sep 02, 2024 at 10:56:27AM +0200, David Hildenbrand wrote: > On 02.09.24 08:31, Omar Sandoval wrote: > > On Mon, Sep 02, 2024 at 08:19:33AM +0200, Christophe Leroy wrote: > > > > > > > > > Le 02/09/2024 à 07:31, Omar Sandoval a écrit : > > > > [Vous ne recevez pas souvent de courriers de

[PATCH -next] soc/fsl/qbman: make use of the helper function kthread_run_on_cpu()

2024-09-02 Thread Hongbo Li
Replace kthread_create/kthread_bind/wake_up_process() with kthread_run_on_cpu() to simplify the code. Signed-off-by: Hongbo Li --- drivers/soc/fsl/qbman/qman_test_stash.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/qbman/qman_test_stash.c b/drivers/

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-09-02 Thread Sven Schnelle
./ftracetest ./test.d/dynevent/add_remove_uprobe.tc The 'mm: Add optional close() to struct vm_special_mapping' patch just makes it visible. I enabled KASAN, and that shows me: [ 44.505448] ==

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

2024-09-02 Thread David Hildenbrand
On 02.09.24 17:26, Omar Sandoval wrote: On Mon, Sep 02, 2024 at 10:56:27AM +0200, David Hildenbrand wrote: On 02.09.24 08:31, Omar Sandoval wrote: On Mon, Sep 02, 2024 at 08:19:33AM +0200, Christophe Leroy wrote: Le 02/09/2024 à 07:31, Omar Sandoval a écrit : [Vous ne recevez pas souvent de

Re: [PATCH v5 7/7] PCI: Create helper to print TLP Header and Prefix Log

2024-09-02 Thread Ilpo Järvinen
On Fri, 30 Aug 2024, Bjorn Helgaas wrote: > On Tue, May 14, 2024 at 02:31:09PM +0300, Ilpo Järvinen wrote: > > Add pcie_print_tlp_log() helper to print TLP Header and Prefix Log. > > Print End-End Prefixes only if they are non-zero. > > > > Consolidate the few places which currently print TLP usi

Re: [PATCH v5 7/7] PCI: Create helper to print TLP Header and Prefix Log

2024-09-02 Thread Bjorn Helgaas
On Mon, Sep 02, 2024 at 08:20:41PM +0300, Ilpo Järvinen wrote: > On Fri, 30 Aug 2024, Bjorn Helgaas wrote: > > > On Tue, May 14, 2024 at 02:31:09PM +0300, Ilpo Järvinen wrote: > > > Add pcie_print_tlp_log() helper to print TLP Header and Prefix Log. > > > Print End-End Prefixes only if they are no

Re: [PATCH v5 06/30] arm64: context switch POR_EL0 register

2024-09-02 Thread Catalin Marinas
On Tue, Aug 27, 2024 at 12:38:04PM +0100, Will Deacon wrote: > On Fri, Aug 23, 2024 at 07:40:52PM +0100, Catalin Marinas wrote: > > On Fri, Aug 23, 2024 at 06:08:36PM +0100, Will Deacon wrote: > > > On Fri, Aug 23, 2024 at 05:41:06PM +0100, Catalin Marinas wrote: > > > > On Fri, Aug 23, 2024 at 03:

[PATCH 0/3] mm: Care about shadow stack guard gap when getting an unmapped area

2024-09-02 Thread Mark Brown
As covered in the commit log for c44357c2e76b ("x86/mm: care about shadow stack guard gap during placement") our current mmap() implementation does not take care to ensure that a new mapping isn't placed with existing mappings inside it's own guard gaps. This is particularly important for shadow st

[PATCH 1/3] mm: Make arch_get_unmapped_area() take vm_flags by default

2024-09-02 Thread Mark Brown
When we introduced arch_get_unmapped_area_vmflags() in 961148704acd ("mm: introduce arch_get_unmapped_area_vmflags()") we did so as part of properly supporting guard pages for shadow stacks on x86_64, which uses a custom arch_get_unmapped_area(). Equivalent features are also present on both arm64 a

[PATCH 2/3] mm: Pass vm_flags to generic_get_unmapped_area()

2024-09-02 Thread Mark Brown
In preparation for using vm_flags to ensure guard pages for shadow stacks supply them as an argument to generic_get_unmapped_area(). The only user outside of the core code is the PowerPC book3s64 implementation which is trivially wrapping the generic implementation in the radix_enabled() case. Sig

[PATCH 3/3] mm: Care about shadow stack guard gap when getting an unmapped area

2024-09-02 Thread Mark Brown
As covered in the commit log for c44357c2e76b ("x86/mm: care about shadow stack guard gap during placement") our current mmap() implementation does not take care to ensure that a new mapping isn't placed with existing mappings inside it's own guard gaps. This is particularly important for shadow st

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

2024-09-02 Thread Christophe Leroy
This series wires up getrandom() vDSO implementation on powerpc. Tested on PPC32 on real hardware. Tested on PPC64 (both BE and LE) on QEMU: Performance on powerpc 885: ~# ./vdso_test_getrandom bench-single vdso: 2500 times in 62.938002291 seconds libc: 2500

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

2024-09-02 Thread Christophe Leroy
Commit 9651fcedf7b9 ("mm: add MAP_DROPPABLE for designating always lazily freeable mappings") only adds VM_DROPPABLE for 64 bits architectures. In order to also use the getrandom vDSO implementation on powerpc/32, use VM_ARCH_1 for VM_DROPPABLE on powerpc/32. This is possible because VM_ARCH_1 is

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

2024-09-02 Thread Christophe Leroy
Commit 08c18b63d965 ("powerpc/vdso32: Add missing _restgpr_31_x to fix build failure") added _restgpr_31_x to the vdso for gettimeofday, but the work on getrandom shows that we will need more of those functions. Remove _restgpr_31_x and link in crtsavres.o so that we get all save/restore functions

[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 4/5] powerpc/vdso: Wire up getrandom() vDSO implementation on VDSO32

2024-09-02 Thread Christophe Leroy
To be consistent with other VDSO functions, the function is called __kernel_getrandom() __arch_chacha20_blocks_nostack() fonction is implemented basically with 32 bits operations. It performs 4 QUARTERROUND operations in parallele. There are enough registers to avoid using the stack: On input:

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

2024-09-02 Thread Christophe Leroy
Extend getrandom() vDSO implementation to VDSO64 Tested on QEMU on both ppc64_defconfig and ppc64le_defconfig. The results are not precise as it is QEMU on an x86 laptop, but no need to be precise to see the benefit. ~ # ./vdso_test_getrandom bench-single vdso: 2500 times in 4.97162 s

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-09-02 Thread Andrew Morton
On Mon, 02 Sep 2024 21:06:48 +0200 Sven Schnelle wrote: > So uprobe_clear_state() in the beginning free's the memory area > containing the vm_special_mapping data, but exit_mmap() uses this > address later via vma->vm_private_data (which was set in > _install_special_mapping(). > > The followin

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-09-02 Thread Linus Torvalds
On Mon, 2 Sept 2024 at 13:49, Andrew Morton wrote: > > uprobe_clear_state() is a pretty simple low-level thing. Side-effects > seem unlikely? I think uprobe_clear_state() should be removed from fork.c entirely, made 'static', and then we'd have area->xol_mapping.close = uprobe_clear_sta

Re: [PATCH net-next v2 7/7] net: ethernet: fs_enet: phylink conversion

2024-09-02 Thread Jakub Kicinski
On Thu, 29 Aug 2024 18:15:30 +0200 Maxime Chevallier wrote: > @@ -582,15 +591,12 @@ static void fs_timeout_work(struct work_struct *work) > > dev->stats.tx_errors++; > > - spin_lock_irqsave(&fep->lock, flags); > - > - if (dev->flags & IFF_UP) { > - phy_stop(dev->phydev

[PATCH] tty: hvc: convert comma to semicolon

2024-09-02 Thread Chen Ni
Replace a comma between expression statements by a semicolon. Signed-off-by: Chen Ni --- drivers/tty/hvc/hvsi_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvsi_lib.c b/drivers/tty/hvc/hvsi_lib.c index 22e1bc4d8a66..b35c44caf3d7 100644 --- a/drivers/tt

Re: [PATCH v2 1/4] mm: Add optional close() to struct vm_special_mapping

2024-09-02 Thread Sven Schnelle
Linus Torvalds writes: > On Mon, 2 Sept 2024 at 13:49, Andrew Morton wrote: >> >> uprobe_clear_state() is a pretty simple low-level thing. Side-effects >> seem unlikely? > > I think uprobe_clear_state() should be removed from fork.c entirely, > made 'static', and then we'd have > > area

[GIT PULL] SOC FSL for 6.12 (retry)

2024-09-02 Thread Christophe Leroy
Hi Arnd, Please pull the following Freescale Soc Drivers changes for 6.12 There are no conflicts with latest linux-next tree. Thanks Christophe The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git r

Re: [PATCH v4 RESEND] powerpc: Replace kretprobe code with rethook on powerpc

2024-09-02 Thread Michael Ellerman
Abhishek Dubey writes: > This is an adaptation of commit f3a112c0c40d ("x86,rethook,kprobes: > Replace kretprobe with rethook on x86") to powerpc. > > Rethook follows the existing kretprobe implementation, but separates > it from kprobes so that it can be used by fprobe (ftrace-based > function en

Re: [PATCH] tty: hvc: convert comma to semicolon

2024-09-02 Thread Michael Ellerman
Chen Ni writes: > Replace a comma between expression statements by a semicolon. > > Signed-off-by: Chen Ni > --- > drivers/tty/hvc/hvsi_lib.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Michael Ellerman (powerpc) cheers > diff --git a/drivers/tty/hvc/hvsi_lib.c b/driver