lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260102122014.10318A55-hca@linux.ibm.com>
Date: Fri, 2 Jan 2026 13:20:14 +0100
From: Heiko Carstens <hca@...ux.ibm.com>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: Huacai Chen <chenhuacai@...nel.org>, WANG Xuerui <kernel@...0n.name>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev <agordeev@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>, Andy Lutomirski <luto@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
        Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Shuah Khan <shuah@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org,
        linux-s390@...r.kernel.org, linux-api@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v3] vdso: Remove struct getcpu_cache

On Tue, Dec 30, 2025 at 08:08:44AM +0100, Thomas Weißschuh wrote:
> The cache parameter of getcpu() is useless nowadays for various reasons.
> * It is never passed by userspace for either the vDSO or syscalls.
> * It is never used by the kernel.
> * It could not be made to work on the current vDSO architecture.
> * The structure definition is not part of the UAPI headers.
> * vdso_getcpu() is superseded by restartable sequences in any case.
> 
> Remove the struct and its header.
> 
> As a side-effect we get rid of an unwanted inclusion of the linux/
> header namespace from vDSO code.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> ---
> Changes in v3:
> - Rebase on v6.19-rc1
>   - Fix conflict with UML vdso_getcpu() removal
> - Flesh out commit message
> - Link to v2: https://lore.kernel.org/r/20251013-getcpu_cache-v2-1-880fbfa3b7cc@linutronix.de
> 
> Changes in v2:
> - Rebase on v6.18-rc1
> - Link to v1: https://lore.kernel.org/r/20250826-getcpu_cache-v1-1-8748318f6141@linutronix.de
> ---
> We could also completely remove the parameter, but I am not sure if
> that is a good idea for syscalls and vDSO entrypoints.
> ---
>  arch/loongarch/vdso/vgetcpu.c                   |  5 ++---
>  arch/s390/kernel/vdso/getcpu.c                  |  3 +--
>  arch/s390/kernel/vdso/vdso.h                    |  4 +---
>  arch/x86/entry/vdso/vgetcpu.c                   |  5 ++---
>  arch/x86/include/asm/vdso/processor.h           |  4 +---
>  include/linux/getcpu.h                          | 19 -------------------
>  include/linux/syscalls.h                        |  3 +--
>  kernel/sys.c                                    |  4 +---
>  tools/testing/selftests/vDSO/vdso_test_getcpu.c |  4 +---
>  9 files changed, 10 insertions(+), 41 deletions(-)

Acked-by: Heiko Carstens <hca@...ux.ibm.com> # s390

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ