Daily update · Oct 17–18, 2026
x86: Fix segment-override handling in INSIN evaluation
A shadowed loop variable broke FS/GS override detection and could hang tasks during UMIP emulation of SGDT/SIDT/SMSW instructions.
In brief
This commit fixes an x86 instruction-evaluation bug where a local variable shared its name with a loop counter in the prefix-scanning macro. As a result, segment overrides for FS and GS were ignored, and a CS prefix on certain instructions could cause the loop to run indefinitely.
Bug fixes
Fix shadowed segment index in get_seg_reg_override_idx()
The prefix-scanning macro for_each_insn_prefix() declares its own loop counter named idx, which shadowed a same-named local used for the segment register result. Assignments in the loop body therefore wrote to the loop counter instead of the intended variable.
Why it matters: FS and GS segment overrides were ignored, and a CS override could make the loop non-terminating, potentially causing a task to spin during UMIP emulation of SGDT, SIDT, or SMSW.
Source commits1 entries +
x86/insn-eval: Fix shadowed segment index in get_seg_reg_override_idx()
Lukas Zobernig · Oct 17, 2026 · 2 files