linux-stable/arch/x86
Linus Torvalds 291073a566 kvm: fix objtool relocation warning
The recent change to make objtool aware of more symbol relocation types
(commit 24ff652573: "objtool: Teach get_alt_entry() about more
relocation types") also added another check, and resulted in this
objtool warning when building kvm on x86:

    arch/x86/kvm/emulate.o: warning: objtool: __ex_table+0x4: don't know how to handle reloc symbol type: kvm_fastop_exception

The reason seems to be that kvm_fastop_exception() is marked as a global
symbol, which causes the relocation to ke kept around for objtool.  And
at the same time, the kvm_fastop_exception definition (which is done as
an inline asm statement) doesn't actually set the type of the global,
which then makes objtool unhappy.

The minimal fix is to just not mark kvm_fastop_exception as being a
global symbol.  It's only used in that one compilation unit anyway, so
it was always pointless.  That's how all the other local exception table
labels are done.

I'm not entirely happy about the kinds of games that the kvm code plays
with doing its own exception handling, and the fact that it confused
objtool is most definitely a symptom of the code being a bit too subtle
and ad-hoc.  But at least this trivial one-liner makes objtool no longer
upset about what is going on.

Fixes: 24ff652573 ("objtool: Teach get_alt_entry() about more relocation types")
Link: https://lore.kernel.org/lkml/CAHk-=wiZwq-0LknKhXN4M+T8jbxn_2i9mcKpO+OaBSSq_Eh7tg@mail.gmail.com/
Cc: Borislav Petkov <bp@suse.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Wanpeng Li <wanpengli@tencent.com>
Cc: Jim Mattson <jmattson@google.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-10-03 13:34:19 -07:00
..
boot Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
configs configs: remove the obsolete CONFIG_INPUT_POLLDEV 2021-09-08 11:50:28 -07:00
crypto crypto: x86/sm4 - Fix frame pointer stack corruption 2021-09-24 15:58:50 +08:00
entry compat: remove some compat entry points 2021-09-08 15:32:35 -07:00
events perf/x86/intel: Update event constraints for ICX 2021-10-01 13:57:54 +02:00
hyperv hyperv-fixes for 5.15-rc2 2021-09-15 17:18:56 -07:00
ia32 binfmt: remove in-tree usage of MAP_DENYWRITE 2021-09-03 18:42:01 +02:00
include Small x86 fixes. 2021-10-01 11:08:07 -07:00
kernel Small x86 fixes. 2021-10-01 11:08:07 -07:00
kvm kvm: fix objtool relocation warning 2021-10-03 13:34:19 -07:00
lib x86/insn, tools/x86: Fix undefined behavior due to potential unaligned accesses 2021-09-24 12:37:38 +02:00
math-emu x86/math-emu: Rename frstor() 2021-06-23 18:16:33 +02:00
mm x86/fault: Fix wrong signal when vsyscall fails with pkey 2021-09-20 22:28:47 +02:00
net bpf, x86: Fix bpf mapping of atomic fetch implementation 2021-09-28 12:10:29 +02:00
pci pci-v5.15-changes 2021-09-07 19:13:42 -07:00
platform EFI changes: two driver API cleanups, and a log message tweak. 2021-06-28 11:34:16 -07:00
power x86/power: Fix kernel-doc warnings in cpu.c 2021-08-12 10:15:40 +02:00
purgatory kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
ras
realmode memblock: make memblock_find_in_range method private 2021-09-03 09:58:17 -07:00
tools - Remove cc-option checks which are old and already supported by the 2021-08-30 13:27:16 -07:00
um um: fix stub location calculation 2021-08-26 22:28:03 +02:00
video
xen xen/x86: fix PV trap handling on secondary processors 2021-09-21 09:40:30 +02:00
.gitignore
Kbuild
Kconfig xen: branch for v5.15-rc3 2021-09-25 15:37:31 -07:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug tracing: Refactor TRACE_IRQFLAGS_SUPPORT in Kconfig 2021-08-16 11:37:21 -04:00
Makefile Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
Makefile.um um: allow not setting extra rpaths in the linux binary 2021-06-17 21:54:15 +02:00
Makefile_32.cpu x86/build: Do not add -falign flags unconditionally for clang 2021-09-19 10:35:53 +09:00