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 12:57:26 +0000 (13:57 +0100)
commit8ba6b0fade97a30827cfc24a87adcd0884a0aeca
tree55709331d45f44e2755450943104f4521fd0e2a6
parented1d288ec85d3e167fa8c3c554218559ef2ffb00
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