rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Rust KASAN Support
@ 2024-07-25 23:20 Matthew Maurer
  2024-07-25 23:20 ` [PATCH 1/2] kbuild: rust: Define probing macros for rustc Matthew Maurer
  2024-07-25 23:20 ` [PATCH 2/2] kbuild: rust: Enable KASAN support Matthew Maurer
  0 siblings, 2 replies; 6+ messages in thread
From: Matthew Maurer @ 2024-07-25 23:20 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho,
	Nathan Chancellor
  Cc: Matthew Maurer, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Nick Desaulniers,
	Bill Wendling, Justin Stitt, rust-for-linux, llvm

Right now, if we turn on KASAN, Rust code will cause violations because it's
not enabled properly.

This series:
1. Adds flag probe macros for Rust - now that we're setting a minimum rustc
   version instead of an exact one, these could be useful in general. We need
   them in this patch because we don't set a restriction on which LLVM rustc
   is using, which is what KASAN actually cares about.
2. Makes `rustc` enable the relevant KASAN sanitizer flags when C does.

Matthew Maurer (2):
  kbuild: rust: Define probing macros for rustc
  kbuild: rust: Enable KASAN support

 scripts/Kconfig.include   |  8 +++++++
 scripts/Makefile.compiler | 15 +++++++++++++
 scripts/Makefile.kasan    | 46 ++++++++++++++++++++++++++++++++++++++-
 scripts/Makefile.lib      |  3 +++
 4 files changed, 71 insertions(+), 1 deletion(-)

-- 
2.46.0.rc1.232.g9752f9e123-goog


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

end of thread, other threads:[~2024-07-26 12:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-25 23:20 [PATCH 0/2] Rust KASAN Support Matthew Maurer
2024-07-25 23:20 ` [PATCH 1/2] kbuild: rust: Define probing macros for rustc Matthew Maurer
2024-07-25 23:20 ` [PATCH 2/2] kbuild: rust: Enable KASAN support Matthew Maurer
2024-07-25 23:57   ` Andrey Konovalov
2024-07-26 10:23     ` Dmitry Vyukov
2024-07-26 12:36       ` Miguel Ojeda

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