[SRU] [L/Unstable] [PATCH 0/6] Fix UBSAN in Intel EDAC driver

Kai-Heng Feng kai.heng.feng at canonical.com
Wed Jul 26 05:59:11 UTC 2023

BugLink: https://bugs.launchpad.net/bugs/2028746

UBSAN complains shift-out-of-bounds:
[   13.875276] UBSAN: shift-out-of-bounds in drivers/edac/skx_common.c:369:16
[   13.875279] shift exponent -66 is negative

Skip the absent memory controllers so ~0 won't be used.

Boot system with patch applied, no more UBSAN error in dmesg.

[Where problems could occur]
The fix itself is trivial, however the dependency patches may bring
behavioural changes as new platform support is also added.

Qiuxu Zhuo (6):
  EDAC/skx_common: Enable EDAC support for the "near" memory
  EDAC/skx_common: Delete duplicated and unreachable code
  EDAC/i10nm: Add Intel Emerald Rapids server support
  EDAC/i10nm: Make more configurations CPU model specific
  EDAC/i10nm: Add Intel Granite Rapids server support
  EDAC/i10nm: Skip the absent memory controllers

 drivers/edac/i10nm_base.c | 409 ++++++++++++++++++++++++++++++++------
 drivers/edac/skx_common.c |  76 +++----
 drivers/edac/skx_common.h |  61 +++++-
 3 files changed, 438 insertions(+), 108 deletions(-)


More information about the kernel-team mailing list