summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/mediatek/mt8186.dtsi
diff options
context:
space:
mode:
authorJulian Pidancet <julian.pidancet@oracle.com>2022-10-27 23:49:06 +0300
committerBorislav Petkov <bp@suse.de>2022-11-22 17:16:16 +0300
commitbe84d8ed3f04e9154a3a55e29a27dcd416f05b31 (patch)
tree65bfae27de7ec65adffd903b43f6c68b71393e47 /arch/arm64/boot/dts/mediatek/mt8186.dtsi
parenteb7081409f94a9a8608593d0fb63a1aa3d6f95d8 (diff)
downloadlinux-be84d8ed3f04e9154a3a55e29a27dcd416f05b31.tar.xz
x86/alternative: Consistently patch SMP locks in vmlinux and modules
alternatives_smp_module_add() restricts patching of SMP lock prefixes to the text address range passed as an argument. For vmlinux, patching all the instructions located between the _text and _etext symbols is allowed. That includes the .text section but also other sections such as .text.hot and .text.unlikely. As per the comment inside the 'struct smp_alt_module' definition, the original purpose of this restriction is to avoid patching the init code because in the case when one boots with a single CPU, the LOCK prefixes to the locking primitives are removed. Later on, when other CPUs are onlined, those LOCK prefixes get added back in but by that time the .init code is very likely removed so patching that would be a bad idea. For modules, the current code only allows patching instructions located inside the .text segment, excluding other sections such as .text.hot or .text.unlikely, which may need patching. Make patching of the kernel core and modules more consistent by allowing all text sections of modules except .init.text to be patched in module_finalize(). For that, use mod->core_layout.base/mod->core_layout.text_size as the address range allowed to be patched, which include all the code sections except the init code. [ bp: Massage and expand commit message. ] Signed-off-by: Julian Pidancet <julian.pidancet@oracle.com> Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20221027204906.511277-1-julian.pidancet@oracle.com
Diffstat (limited to 'arch/arm64/boot/dts/mediatek/mt8186.dtsi')
0 files changed, 0 insertions, 0 deletions