You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of #153049 - Darksonn:kasan-sw-tags, r=fmease
Add `-Zsanitize=kernel-hwaddress`
The Linux kernel has a config option called `CONFIG_KASAN_SW_TAGS` that enables `-fsanitize=kernel-hwaddress`. This is not supported by Rust.
One slightly awkward detail is that `#[sanitize(address = "off")]` applies to both `-Zsanitize=address` and `-Zsanitize=kernel-address`. Probably it was done this way because both are the same LLVM pass. I replicated this logic here for hwaddress, but it might be undesirable.
Note that `#[sanitize(kernel_hwaddress = "off")]` could be supported as an annotation on statics, but since it's also missing for `#[sanitize(hwaddress = "off")]`, I did not add it.
MCP: rust-lang/compiler-team#975
Tracking issue: #154171
cc @rcvalle@maurer@ojeda
Copy file name to clipboardExpand all lines: compiler/rustc_session/src/options.rs
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,7 @@ mod target_modifier_consistency_check {
106
106
| SanitizerSet::SHADOWCALLSTACK
107
107
| SanitizerSet::KCFI
108
108
| SanitizerSet::KERNELADDRESS
109
+
| SanitizerSet::KERNELHWADDRESS
109
110
| SanitizerSet::SAFESTACK
110
111
| SanitizerSet::DATAFLOW;
111
112
@@ -817,7 +818,7 @@ mod desc {
817
818
pub(crate)const parse_patchable_function_entry:&str = "either two comma separated integers (total_nops,prefix_nops), with prefix_nops <= total_nops, or one integer (total_nops)";
0 commit comments