]> git.baikalelectronics.ru Git - kernel.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>
Fri, 29 Jul 2022 15:14:20 +0000 (17:14 +0200)
commitebc8caeaaf585a7f2305f69784d15224c3621d5b
tree3f99fc7e627a393ea5d32e2c798ebdf2c4a22b55
parentde03c6640555be595095f043486310f669670fa4
x86: drop bogus "cc" clobber from __try_cmpxchg_user_asm()

commit 3acd1e2908eccf3142f274c1ddc05a85de2d5293 upstream.

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: 3c75cc27a67d ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/uaccess.h