Skip to content

ubsan/overflow: Enable pattern exclusions

Kees Cook linux-hardening linux-kbuild lkml llvm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ubsan/overflow: Rework integer overflow sanitizer option to turn on everythinginclude/linux/compiler_types.h kernel/configs/hardening.config lib/Kconfig.ubsan +5 more+69 -244 replies
2/3ubsan/overflow: Enable pattern exclusionslib/Kconfig.ubsan scripts/Makefile.ubsan+2 -01 reply
3/3ubsan/overflow: Enable ignorelist parsing and add type filterlib/Kconfig.ubsan scripts/Makefile.ubsan scripts/integer-wrap-ignore.scl+6 -12 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchJustin Stitt
1/3
2/3R-b
3/3R-b

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/3] ubsan/overflow: Enable pattern exclusions

Hi,

This brings Linux's integer overflow mitigation integration up to the current set of features available in Clang for handling things sanely (i.e. pattern exclusions). While this isn't over yet, it puts all the infrastructure in place to continue keeping up to date with current Clang development. The next step is to add support for the coming canonical wrapping and non-wrapping types[1].

-Kees

[1] https://discourse.llvm.org/t/rfc-clang-canonical-wrapping-and-non-wrapping-types/84356

Kees Cook (3):
ubsan/overflow: Rework integer overflow sanitizer option to turn on
everything
ubsan/overflow: Enable pattern exclusions ubsan/overflow: Enable ignorelist parsing and add type filter

 include/linux/compiler_types.h  |  2 +-
 kernel/configs/hardening.config |  2 +-
 lib/Kconfig.ubsan               | 25 +++++++++++++------------
 lib/test_ubsan.c                | 18 ++++++++++++++----
 lib/ubsan.c                     | 28 ++++++++++++++++++++++++++--
 lib/ubsan.h                     |  8 ++++++++
 scripts/Makefile.lib            |  4 ++--
 scripts/Makefile.ubsan          | 10 ++++++++--
 scripts/integer-wrap-ignore.scl |  3 +++
 9 files changed, 76 insertions(+), 24 deletions(-)
 create mode 100644 scripts/integer-wrap-ignore.scl
Signature · 1 line
2.34.1