Skip to content

x86/alternatives: Prevent crash in NOP optimizer

Thomas Gleixner lkml regressions 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86/alternatives: Sync core before enabling interruptsarch/x86/kernel/alternative.c+1 -10 replies
2/2x86/alternatives: Disable interrupts and sync when optimizing NOPs in placearch/x86/kernel/alternative.c+11 -12 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPeter Zijlstra (Intel)
SeriesA-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [patch 0/2] x86/alternatives: Prevent crash in NOP optimizer

The following series addresses the regression report from Paul on behalf of the yocto project. It turns out that the recent changes to alternatives opened a race window where interrupts are enabled and NOPs are optimized in place. An interrupt hitting into the modification will observe inconsistent text and crash and burn.

A 32bit QEMU crashes w/o these fixes reliably within about 50 boot attempts. With the fix applied it survived close to 600 attempts by now.

Thanks to Paul for providing all the information!

Thanks,

tglx