]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list
authorAmmar Faizi <ammarfaizi2@gnuweeb.org>
Fri, 23 Dec 2022 17:23:38 +0000 (00:23 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:31:58 +0000 (16:31 +0100)
commit48f4132462056bf45b86894848be91c4996a7b72
tree6dce0c35feac52c9427353a5db89eba8b0c32342
parentf006f596fe851c3b6aae60b79f89f89f0e515d2f
x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list

[ Upstream commit 5541992e512de8c9133110809f767bd1b54ee10d ]

The 'syscall' instruction clobbers '%rcx' and '%r11', but they are not
listed in the inline Assembly that performs the syscall instruction.

No real bug is found. It wasn't buggy by luck because '%rcx' and '%r11'
are caller-saved registers, and not used in the functions, and the
functions are never inlined.

Add them to the clobber list for code correctness.

Fixes: f1c2bb8b9964ed31de988910f8b1cfb586d30091 ("um: implement a x86_64 vDSO")
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/um/vdso/um_vdso.c