mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
1ff95eb2be
RISCV_ALTERNATIVE_EARLY will issue sbi_ecall() very early in the boot
process, before the first memory mapping is setup so we can't have any
instrumentation happening here.
In addition, when the kernel is relocatable, we must also not issue any
relocation this early since they would have been patched virtually only.
So, instead of disabling instrumentation for the whole kernel/sbi.c file
and compiling it with -fno-pie, simply move __sbi_ecall() and
__sbi_base_ecall() into their own file where this is fixed.
Reported-by: Conor Dooley <conor.dooley@microchip.com>
Closes: https://lore.kernel.org/linux-riscv/20240813-pony-truck-3e7a83e9759e@spud/
Reported-by: syzbot+cfbcb82adf6d7279fd35@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-riscv/00000000000065062c061fcec37b@google.com/
Fixes:
|
||
---|---|---|
.. | ||
boot | ||
configs | ||
crypto | ||
errata | ||
include | ||
kernel | ||
kvm | ||
lib | ||
mm | ||
net | ||
purgatory | ||
tools | ||
Kbuild | ||
Kconfig | ||
Kconfig.debug | ||
Kconfig.errata | ||
Kconfig.socs | ||
Kconfig.vendor | ||
Makefile | ||
Makefile.postlink |