x86/uaccess: Always inline user_access_begin()
authorPeter Zijlstra <peterz@infradead.org>
Wed, 3 Apr 2019 07:39:47 +0000 (09:39 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 3 Apr 2019 07:39:47 +0000 (09:39 +0200)
If GCC out-of-lines it, the STAC and CLAC are in different fuctions
and objtool gets upset.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/uaccess.h

index 1954dd5552a2e2fbeaf21937ad4c6d98c6ba0aff..ae5783b5fab017f3d75493f5a0fef9091ccd948f 100644 (file)
@@ -705,7 +705,7 @@ extern struct movsl_mask {
  * checking before using them, but you have to surround them with the
  * user_access_begin/end() pair.
  */
-static __must_check inline bool user_access_begin(const void __user *ptr, size_t len)
+static __must_check __always_inline bool user_access_begin(const void __user *ptr, size_t len)
 {
        if (unlikely(!access_ok(ptr,len)))
                return 0;