]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/vdso: Fix output operand size of RDPID
authorUros Bizjak <ubizjak@gmail.com>
Mon, 16 Jun 2025 09:52:57 +0000 (11:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:25 +0000 (11:56 +0200)
commit757a9e78a1c5b824d0a2b7de14c3cd8d841dfbee
tree904cddf20f4a0490371f3f89d9464bd0799d8a09
parentfa2ec53a9c236e1df6f0399a2f92dfa2ad76b69f
x86/vdso: Fix output operand size of RDPID

[ Upstream commit ac9c408ed19d535289ca59200dd6a44a6a2d6036 ]

RDPID instruction outputs to a word-sized register (64-bit on x86_64 and
32-bit on x86_32). Use an unsigned long variable to store the correct size.

LSL outputs to 32-bit register, use %k operand prefix to always print the
32-bit name of the register.

Use RDPID insn mnemonic while at it as the minimum binutils version of
2.30 supports it.

  [ bp: Merge two patches touching the same function into a single one. ]

Fixes: ffebbaedc861 ("x86/vdso: Introduce helper functions for CPU and node number")
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250616095315.230620-1-ubizjak@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/include/asm/segment.h