On Thu, 2024-06-20 at 16:16 +0100, Andrew Cooper wrote: > On 20/06/2024 3:31 pm, Matthew Barnes wrote: > > There exists a bitshift in the IOAPIC code where a signed integer > > is > > shifted to the left by at most 31 bits. This is undefined > > behaviour, > > and can cause faults in xtf tests such as pv64-pv-iopl~hypercall. > > > > This patch fixes this by changing the integer from signed to > > unsigned. > > > > Signed-off-by: Matthew Barnes <[email protected]> > > The code change itself is fine, but I'm going to recommend some > adjustments to the commit message. > > Its "x86/ioapic"; apic implies the Local APIC which is apic.c and > distinct from the IO-APIC. The subject would be clearer as "Fix > signed > shift in end_level_ioapic_irq_new()". > > The XTF test has nothing to do with this, so shouldn't be mentioned > like > this. The UBSAN failure was in an interrupt handler, and it was > complete chance that it triggered while pv64-pv-iopl~hypercall was > the > test being ran. > > I'm happy to fix all of that up on commit. > > CC Oleksii for 4.19. This is low risk, and found during testing with > UBSAN active. Release-Acked-By: Oleksii Kurochko <[email protected]>
~ Oleksii
