OSDN Git Service

x86/uaccess, signal: Fix AC=1 bloat
authorPeter Zijlstra <peterz@infradead.org>
Wed, 3 Apr 2019 07:39:48 +0000 (09:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:46:27 +0000 (06:46 -0700)
commit4614b0bb8f65fec6d88dbcb2a3d5c1291d7b4c86
tree8247292d4cd728a423dd6ceb64efc5304c7c894d
parent1a3188d737ceb922166d8fe78a5fc4f89907e31b
x86/uaccess, signal: Fix AC=1 bloat

[ Upstream commit 88e4718275c1bddca6f61f300688b4553dc8584b ]

Occasionally GCC is less agressive with inlining and the following is
observed:

  arch/x86/kernel/signal.o: warning: objtool: restore_sigcontext()+0x3cc: call to force_valid_ss.isra.5() with UACCESS enabled
  arch/x86/kernel/signal.o: warning: objtool: do_signal()+0x384: call to frame_uc_flags.isra.0() with UACCESS enabled

Cure this by moving this code out of the AC=1 region, since it really
isn't needed for the user access.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Andy Lutomirski <luto@kernel.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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kernel/signal.c