Skip to content

x86/ubsan: fix ubsan on clang + code fixes

Roger Pau Monne xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 17 repliesIn review
  2. v17 patches 25 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5x86/wait: prevent duplicated assembly labelsxen/common/wait.c+8 -21 reply
2/5x86/vga: fix mapping of the VGA text bufferxen/drivers/video/vga.c+2 -24 replies
3/5x86/xlat: fix UB pointer arithmetic in COMPAT_ARG_XLAT_VIRT_BASExen/arch/x86/include/asm/x86_64/uaccess.h+3 -37 replies
4/5x86/shadow: fix UB pointer arithmetic in sh_mfn_is_a_page_table()xen/arch/x86/mm/shadow/private.h+2 -14 replies
5/5kconfig/randconfig: enable UBSAN for randconfigxen/Kconfig xen/Kconfig.debug xen/tools/kconfig/allrandom.config+5 -21 reply

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchAndrew Cooper
1/5A-b
2/5
3/5A-b
4/5A-b
5/5R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/5] x86/ubsan: fix ubsan on clang + code fixes

Hello,

This started as a series to fix UBSAN when using clang, and the first patch do fix that.

Finally patches 2 to 4 fix bugs in the code highlighted by the clang UB pointer arithmetic detection.

Patch 5 was the original goal of the series: be able to enable UBSAN for randconfig.

Thanks, Roger.

Roger Pau Monne (5):
x86/wait: prevent duplicated assembly labels
x86/vga: fix mapping of the VGA text buffer
x86/xlat: fix UB pointer arithmetic in COMPAT_ARG_XLAT_VIRT_BASE x86/shadow: fix UB pointer arithmetic in sh_mfn_is_a_page_table() kconfig/randconfig: enable UBSAN for randconfig

 xen/Kconfig                               |  4 ++++
 xen/Kconfig.debug                         |  2 +-
 xen/arch/x86/include/asm/x86_64/uaccess.h |  6 +++---
 xen/arch/x86/mm/shadow/private.h          |  3 ++-
 xen/common/wait.c                         | 10 ++++++++--
 xen/drivers/video/vga.c                   |  4 ++--
 xen/tools/kconfig/allrandom.config        |  1 -
 7 files changed, 20 insertions(+), 10 deletions(-)
Signature · 1 line
2.48.1