android_kernel_motorola_sm6375/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Thomas Gleixner a56a19e44b x86/alternatives: Sync core before enabling interrupts
commit 3ea1704a92967834bf0e64ca1205db4680d04048 upstream.

text_poke_early() does:

   local_irq_save(flags);
   memcpy(addr, opcode, len);
   local_irq_restore(flags);
   sync_core();

That's not really correct because the synchronization should happen before
interrupts are re-enabled to ensure that a pending interrupt observes the
complete update of the opcodes.

It's not entirely clear whether the interrupt entry provides enough
serialization already, but moving the sync_core() invocation into interrupt
disabled region does no harm and is obviously correct.

Fixes: 6fffacb303 ("x86/alternatives, jumplabel: Use text_poke_early() before mm_init()")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/ZT6narvE%2BLxX%2B7Be@windriver.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-08 11:29:47 +01:00
..
alpha
arc
arm ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init 2024-01-08 11:29:43 +01:00
arm64 arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify 2023-12-20 15:41:24 +01:00
c6x
csky
h8300
hexagon
ia64
m68k m68k: Fix invalid .section syntax 2023-09-23 10:59:38 +02:00
microblaze
mips MIPS: KVM: Fix a build warning about variable set but not used 2023-12-08 08:44:24 +01:00
nds32
nios2
openrisc
parisc parisc/pgtable: Do not drop upper 5 address bits of physical address 2023-11-28 16:50:20 +00:00
powerpc powerpc/ftrace: Fix stack teardown in ftrace_no_trace 2023-12-20 15:41:26 +01:00
riscv
s390 s390/vx: fix save/restore of fpu kernel context 2024-01-08 11:29:43 +01:00
sh sh: bios: Revive earlyprintk support 2023-11-20 10:30:13 +01:00
sparc
um um: Fix hostaudio build errors 2023-09-23 10:59:53 +02:00
unicore32
x86 x86/alternatives: Sync core before enabling interrupts 2024-01-08 11:29:47 +01:00
xtensa xtensa: boot/lib: fix function prototypes 2023-10-10 21:46:39 +02:00
.gitignore
Kconfig