linux/tools/objtool
Peter Zijlstra 69d4c0d321 entry, kasan, x86: Disallow overriding mem*() functions
KASAN cannot just hijack the mem*() functions, it needs to emit
__asan_mem*() variants if it wants instrumentation (other sanitizers
already do this).

  vmlinux.o: warning: objtool: sync_regs+0x24: call to memcpy() leaves .noinstr.text section
  vmlinux.o: warning: objtool: vc_switch_off_ist+0xbe: call to memcpy() leaves .noinstr.text section
  vmlinux.o: warning: objtool: fixup_bad_iret+0x36: call to memset() leaves .noinstr.text section
  vmlinux.o: warning: objtool: __sev_get_ghcb+0xa0: call to memcpy() leaves .noinstr.text section
  vmlinux.o: warning: objtool: __sev_put_ghcb+0x35: call to memcpy() leaves .noinstr.text section

Remove the weak aliases to ensure nobody hijacks these functions and
add them to the noinstr section.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20230112195542.028523143@infradead.org
2023-01-13 11:48:17 +01:00
..
arch powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
Documentation objtool: Update documentation 2022-04-22 12:32:05 +02:00
include/objtool powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
.gitignore objtool: Rework header include paths 2021-01-13 18:13:14 -06:00
Build objtool: Ditch subcommands 2022-04-22 12:32:01 +02:00
builtin-check.c powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
check.c entry, kasan, x86: Disallow overriding mem*() functions 2023-01-13 11:48:17 +01:00
elf.c powerpc updates for 6.2 2022-12-19 07:13:33 -06:00
Makefile Kbuild updates for v5.19 2022-05-26 12:09:50 -07:00
objtool.c objtool: Add .call_sites section 2022-10-17 16:41:07 +02:00
orc_dump.c objtool: Use target file endianness instead of a compiled constant 2022-11-18 19:00:15 +11:00
orc_gen.c objtool: Use target file endianness instead of a compiled constant 2022-11-18 19:00:15 +11:00
special.c objtool: Use target file endianness instead of a compiled constant 2022-11-18 19:00:15 +11:00
sync-check.sh Merge branch 'x86/cpu' into WIP.x86/core, to merge the NOP changes & resolve a semantic conflict 2021-04-02 12:36:30 +02:00
weak.c objtool: Ditch subcommands 2022-04-22 12:32:01 +02:00