linux-stable/include/asm-generic
Josh Poimboeuf 73f44fe19d static_call: Allow module use without exposing static_call_key
When exporting static_call_key; with EXPORT_STATIC_CALL*(), the module
can use static_call_update() to change the function called.  This is
not desirable in general.

Not exporting static_call_key however also disallows usage of
static_call(), since objtool needs the key to construct the
static_call_site.

Solve this by allowing objtool to create the static_call_site using
the trampoline address when it builds a module and cannot find the
static_call_key symbol. The module loader will then try and map the
trampole back to a key before it constructs the normal sites list.

Doing this requires a trampoline -> key associsation, so add another
magic section that keeps those.

Originally-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lkml.kernel.org/r/20210127231837.ifddpn7rhwdaepiu@treble
2021-02-17 14:12:42 +01:00
..
bitops arm64: make atomic helpers __always_inline 2021-01-13 15:09:06 +00:00
vdso
asm-offsets.h
asm-prototypes.h
atomic-instrumented.h locking/atomics: Regenerate the atomics-check SHA1's 2020-11-07 13:20:41 +01:00
atomic-long.h
atomic.h
atomic64.h
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
barrier.h compiler.h: fix barrier_data() on clang 2020-11-14 11:26:03 -08:00
bitops.h
bitsperlong.h
bug.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
bugs.h
cache.h
cacheflush.h
checksum.h
cmpxchg-local.h
cmpxchg.h
compat.h
current.h
delay.h
device.h
div64.h
dma-mapping.h
dma.h
early_ioremap.h
emergency-restart.h
error-injection.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
exec.h
export.h
extable.h
fb.h
fixmap.h
flat.h
ftrace.h
futex.h
getorder.h asm-generic: force inlining of get_order() to work around gcc10 poor decision 2020-12-15 22:46:15 -08:00
gpio.h
hardirq.h irqstat: Move declaration into asm-generic/hardirq.h 2020-11-23 10:31:06 +01:00
hugetlb.h
hw_irq.h
hyperv-tlfs.h
ide_iops.h
int-ll64.h
io.h Add and use a generic version of devmem_is_allowed() 2020-12-11 12:30:26 -08:00
ioctl.h
iomap.h
irq.h
irq_regs.h
irq_work.h
irqflags.h
Kbuild local64.h: make <asm/local64.h> mandatory 2020-12-29 15:36:49 -08:00
kdebug.h
kmap_size.h mm/highmem: Provide and use CONFIG_DEBUG_KMAP_LOCAL 2020-11-24 14:42:08 +01:00
kprobes.h treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
kvm_para.h
kvm_types.h
linkage.h
local.h
local64.h
mcs_spinlock.h
memory_model.h
mm-arch-hooks.h
mm_hooks.h
mmiowb.h
mmiowb_types.h
mmu.h
mmu_context.h asm-generic: add generic MMU versions of mmu context functions 2020-10-26 16:45:03 +01:00
module.h
module.lds.h
mshyperv.h
msi.h Generic interrupt and irqchips subsystem: 2020-12-15 15:03:31 -08:00
nommu_context.h asm-generic: add generic MMU versions of mmu context functions 2020-10-26 16:45:03 +01:00
page.h
param.h
parport.h
pci.h
pci_iomap.h
percpu.h asm-generic: percpu: avoid Wshadow warning 2020-10-26 23:54:48 +00:00
pgalloc.h
pgtable-nop4d.h
pgtable-nopmd.h
pgtable-nopud.h
pgtable_uffd.h
preempt.h
qrwlock.h qspinlock: use signed temporaries for cmpxchg 2020-10-26 20:19:48 +01:00
qrwlock_types.h
qspinlock.h qspinlock: use signed temporaries for cmpxchg 2020-10-26 20:19:48 +01:00
qspinlock_types.h
resource.h
rwonce.h
seccomp.h
sections.h
serial.h
set_memory.h
shmparam.h
signal.h
simd.h
spinlock.h
statfs.h
string.h
switch_to.h
syscall.h audit: Migrate to use SYSCALL_WORK flag 2020-11-16 21:53:16 +01:00
syscalls.h
termios-base.h
termios.h
timex.h
tlb.h
tlbflush.h
topology.h
trace_clock.h
uaccess.h asm-generic: mark __{get,put}_user_fn as __always_inline 2020-10-27 16:13:09 +01:00
unaligned.h
user.h
vermagic.h
vga.h
vmlinux.lds.h static_call: Allow module use without exposing static_call_key 2021-02-17 14:12:42 +01:00
vtime.h
word-at-a-time.h
xor.h