diff options
| author | Matthew Maurer <[email protected]> | 2024-08-20 19:48:58 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2024-09-16 16:04:37 +0000 |
| commit | e3117404b41124c88a4d834fc3222669a880addc (patch) | |
| tree | 8be4fff78e5090b51adec601b8b4b267541f173c /scripts/generate_rust_target.rs | |
| parent | rust: kasan: Rust does not support KHWASAN (diff) | |
| download | kernel-e3117404b41124c88a4d834fc3222669a880addc.tar.gz kernel-e3117404b41124c88a4d834fc3222669a880addc.zip | |
kbuild: rust: Enable KASAN support
Rust supports KASAN via LLVM, but prior to this patch, the flags aren't
set properly.
Suggested-by: Miguel Ojeda <[email protected]>
Signed-off-by: Matthew Maurer <[email protected]>
Reviewed-by: Andrey Konovalov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Applied "SW_TAGS KASAN" nit. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'scripts/generate_rust_target.rs')
| -rw-r--r-- | scripts/generate_rust_target.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/generate_rust_target.rs b/scripts/generate_rust_target.rs index 087c1d13d33b..0d00ac3723b5 100644 --- a/scripts/generate_rust_target.rs +++ b/scripts/generate_rust_target.rs @@ -207,7 +207,7 @@ fn main() { } ts.push("features", features); ts.push("llvm-target", "x86_64-linux-gnu"); - ts.push("supported-sanitizers", ["kcfi"]); + ts.push("supported-sanitizers", ["kcfi", "kernel-address"]); ts.push("target-pointer-width", "64"); } else if cfg.has("X86_32") { // This only works on UML, as i386 otherwise needs regparm support in rustc |
