-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using extern "x86-interrupt" + #[naked] + kernel address sanitizer crashes compiler #129224
Comments
This is an LLVM assertion
|
It was noted in #127853 (comment) that this comes from sanitizer annotations being added to naked functions. Seems like we might not want to do that? Cc @rust-lang/project-exploit-mitigations |
Almost certainly, but |
Reported at llvm/llvm-project#104718 |
To clarify, the fix that landed is just to make this an IR verification failure rather than a backend crash. The underlying issue with the kasan + naked combination still needs to be fixed. |
Naked functions can only contain inline asm, so any instrumentation inserted by sanitizers is illegal. Don't request it. Fixes rust-lang#129224.
Do not request sanitizers for naked functions Naked functions can only contain inline asm, so any instrumentation inserted by sanitizers is illegal. Don't request it. Fixes rust-lang#129224.
Naked functions can only contain inline asm, so any instrumentation inserted by sanitizers is illegal. Don't request it. Fixes rust-lang#129224.
Do not request sanitizers for naked functions Naked functions can only contain inline asm, so any instrumentation inserted by sanitizers is illegal. Don't request it. Fixes rust-lang#129224.
Do not request sanitizers for naked functions Naked functions can only contain inline asm, so any instrumentation inserted by sanitizers is illegal. Don't request it. Fixes rust-lang#129224. try-job: test-various
Do not request sanitizers for naked functions Naked functions can only contain inline asm, so any instrumentation inserted by sanitizers is illegal. Don't request it. Fixes rust-lang#129224.
Rollup merge of rust-lang#129891 - nikic:naked-no-san, r=jackh726 Do not request sanitizers for naked functions Naked functions can only contain inline asm, so any instrumentation inserted by sanitizers is illegal. Don't request it. Fixes rust-lang#129224.
@nikic Should we file an issue upstream to handle this in sanitizers as well, or is there one already opened? |
I tried this code:
And compiled it with
--target x86_64-unknown-none -Zsanitizer=kernel-address
.I expected to see this happen: The compiler should generate a function
page_fault_handler
which only contains theud2
instruction.Instead, this happened: The compiler crashes with
SIGILL
.Meta
rustc --version --verbose
:As requested in #127853 (comment).
The text was updated successfully, but these errors were encountered: