]> git.baikalelectronics.ru Git - kernel.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 12:55:22 +0000 (13:55 +0100)
commit69917983c36c67072ab07189a15fadce4c5714d6
tree42e4febddb4ec99238747fe6a1077d91ff1c13c8
parentafb933eb8414c9771cd8cb3351806362cacfa071
x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list

[ Upstream commit 8f9a3b102d1f58be863621e6813b9f8c46a5bf47 ]

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: 07717e169e6225855229638f3890b3970fda80d5 ("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