]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
x86/asm: Improve how GEN_*_SUFFIXED_RMWcc() specify clobbers
authorJan Beulich <JBeulich@suse.com>
Mon, 19 Feb 2018 14:49:12 +0000 (07:49 -0700)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 15 Mar 2018 21:29:06 +0000 (18:29 -0300)
commit4b67ad1eade3a1e4f57dc0dc04366c365a56a05f
treee59f488d0179700d70f591893e71b3981573186c
parentd28ea7408d6402b22f16d8cf88423e93616c4743
x86/asm: Improve how GEN_*_SUFFIXED_RMWcc() specify clobbers

BugLink: http://bugs.launchpad.net/bugs/1756100
commit 700b7c5409c3e9da279fbea78cf28a78fbc176cd upstream.

Commit:

  df3405245a ("x86/asm: Add suffix macro for GEN_*_RMWcc()")

... introduced "suffix" RMWcc operations, adding bogus clobber specifiers:
For one, on x86 there's no point explicitly clobbering "cc".

In fact, with GCC properly fixed, this results in an overlap being detected by
the compiler between outputs and clobbers.

Furthermore it seems bad practice to me to have clobber specification
and use of the clobbered register(s) disconnected - it should rather be
at the invocation place of that GEN_{UN,BIN}ARY_SUFFIXED_RMWcc() macros
that the clobber is specified which this particular invocation needs.

Drop the "cc" clobber altogether and move the "cx" one to refcount.h.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/5A8AF1F802000078001A91E1@prv-mh.provo.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/x86/include/asm/refcount.h
arch/x86/include/asm/rmwcc.h