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)
commit28ebc1164a45db27261ad8440dcbe9238beaf32a
tree42e4febddb4ec99238747fe6a1077d91ff1c13c8
parent44b713a242510cfb3aeed4fc96e8d680065152a9
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