Skip to content

Add SANITIZE_xx.o & SANITIZE and apply them to x86

Changbin Du linux-doc linux-kbuild lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sanitize: Add SANITIZE_xx.o and SANITIZE to disable all sanitizers for specific filesDocumentation/dev-tools/kasan.rst scripts/Makefile.lib+14 -21 reply
2/2x86: Disable both KASAN and UBSAN for some booting codearch/x86/boot/Makefile arch/x86/boot/compressed/Makefile arch/x86/entry/vdso/Makefile +5 more+13 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Add SANITIZE_xx.o & SANITIZE and apply them to x86

These two patches add SANITIZE_xx.o and SANITIZE to disable all sanitizers for specific files, and apply them to x86 booting code.

We need to disable UBSAN for some of ealy stage code:
o For code which could operate in one-one mapping mode. In this case, kernel would crash at accessing data parameter when invoking UBSAN handlers.
o Since UBSAN handlers are instrumented by KASAN, so invoking UBSAN handlers before KASAN is initiated also is not allowed.

Changbin Du (2):
sanitize: Add SANITIZE_xx.o and SANITIZE to disable all sanitizers for
specific files
x86: Disable both KASAN and UBSAN for some booting code

 Documentation/dev-tools/kasan.rst | 12 ++++++++++++
 arch/x86/boot/Makefile            |  2 +-
 arch/x86/boot/compressed/Makefile |  2 +-
 arch/x86/entry/vdso/Makefile      |  3 +--
 arch/x86/kernel/Makefile          | 10 +++++-----
 arch/x86/lib/Makefile             |  2 +-
 arch/x86/mm/Makefile              |  4 ++--
 arch/x86/realmode/Makefile        |  2 +-
 arch/x86/realmode/rm/Makefile     |  2 +-
 scripts/Makefile.lib              |  4 ++--
 10 files changed, 27 insertions(+), 16 deletions(-)
Signature · 1 line
2.24.0