linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Add SANITIZE_xx.o & SANITIZE and apply them to x86
@ 2020-02-01  6:24 Changbin Du
  2020-02-01  6:24 ` [PATCH 1/2] sanitize: Add SANITIZE_xx.o and SANITIZE to disable all sanitizers for specific files Changbin Du
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Changbin Du @ 2020-02-01  6:24 UTC (permalink / raw)
  To: Andrey Ryabinin
  Cc: Alexander Potapenko, Jonathan Corbet, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, hpa, x86, Andy Lutomirski,
	Masahiro Yamada, linux-doc, linux-kernel, linux-kbuild,
	Changbin Du

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(-)

-- 
2.24.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-16  4:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-01  6:24 [PATCH 0/2] Add SANITIZE_xx.o & SANITIZE and apply them to x86 Changbin Du
2020-02-01  6:24 ` [PATCH 1/2] sanitize: Add SANITIZE_xx.o and SANITIZE to disable all sanitizers for specific files Changbin Du
2020-02-16  4:46   ` Masahiro Yamada
2020-02-01  6:24 ` [PATCH 2/2] x86: Disable both KASAN and UBSAN for some booting code Changbin Du
2020-02-12 12:28 ` [PATCH 0/2] Add SANITIZE_xx.o & SANITIZE and apply them to x86 Changbin Du

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).