]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86: drop bogus "cc" clobber from __try_cmpxchg_user_asm()
authorJan Beulich <jbeulich@suse.com>
Tue, 7 Jun 2022 15:00:53 +0000 (17:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:41:31 +0000 (18:41 +0200)
commit9cfd29428941dab4daf44ecac02ad13c6edc8375
tree7670f2fc9aba614ac1466346a2790b0f2e277754
parent71e8bfc7f838cabc60cba24e09ca84c4f8321ab2
x86: drop bogus "cc" clobber from __try_cmpxchg_user_asm()

[ Upstream commit 1df931d95f4dc1c11db1123e85d4e08156e46ef9 ]

As noted (and fixed) a couple of times in the past, "=@cc<cond>" outputs
and clobbering of "cc" don't work well together. The compiler appears to
mean to reject such, but doesn't - in its upstream form - quite manage
to yet for "cc". Furthermore two similar macros don't clobber "cc", and
clobbering "cc" is pointless in asm()-s for x86 anyway - the compiler
always assumes status flags to be clobbered there.

Fixes: 989b5db215a2 ("x86/uaccess: Implement macros for CMPXCHG on user addresses")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Message-Id: <485c0c0b-a3a7-0b7c-5264-7d00c01de032@suse.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/include/asm/uaccess.h