Open
Conversation
1191bc5 to
07c2a2a
Compare
This comment has been minimized.
This comment has been minimized.
07c2a2a to
9508e21
Compare
This comment has been minimized.
This comment has been minimized.
70 tasks
9508e21 to
c7a338e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Darksonn
commented
Mar 7, 2026
Comment on lines
+127
to
+135
| // KHWASAN: In LLVM versions prior to 21.1.0, the HWAddressSanitizer pass incorrectly | ||
| // ignores the pass-specific `CompileKernel` flag and only looks at the global command-line | ||
| // flag `-hwasan-kernel`. To work around this, pass `-hwasan-kernel` on the relevant LLVM | ||
| // versions. | ||
| // | ||
| // Fixed by: [HWASan][bugfix] Fix kernel check in ShadowMapping::init (#142226). | ||
| if sess.sanitizers().contains(SanitizerSet::KERNELHWADDRESS) && get_version() < (21, 1, 0) { | ||
| add("-hwasan-kernel", false); | ||
| } |
Member
Author
There was a problem hiding this comment.
@fmayer Is this reasonable a reasonable fix for rustc to work around the lack of llvm/llvm-project#142226? Or do you think I should pass this on all versions? Thanks!
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Collaborator
|
Some changes occurred in cfg and check-cfg configuration cc @Urgau Some changes occurred in tests/ui/sanitizer cc @rcvalle Some changes occurred in src/tools/compiletest cc @jieyouxu Some changes occurred in tests/codegen-llvm/sanitizer cc @rcvalle Some changes occurred in compiler/rustc_attr_parsing |
Collaborator
|
r? @chenyukang rustbot has assigned @chenyukang. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Linux kernel has a config option called
CONFIG_KASAN_SW_TAGSthat enables-fsanitize=kernel-hwaddress. This is not supported by Rust.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.cc @rcvalle @maurer @ojeda