-
Notifications
You must be signed in to change notification settings - Fork 15
CONFIG_UBSAN_DIV_ZERO causes objtool: foo() falls through to the next function bar() #1657
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
Comments
These appear to only be visible with With
|
There are a lot more warnings of this nature after llvm/llvm-project@10c531c. At the parent commit:
At that change:
I suspect this is the same problem but I'll see which specific configurations trigger this and open a new issue if necessary. |
Yeah let's bisect the configs. Unless there's a bug in the LLVM patch, I have a sinking feeling that this is again sanitizer related. |
This appears to be entirely related to With before the change:
after that change:
The
|
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]>
submitted a patch to disable this config for now: https://lore.kernel.org/llvm/[email protected]/ |
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Linus picked up https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e5d523f1ae8f2cef01f8e071aeee432654166708. Let's keep this open so that we can work towards getting the config option re-enabled. |
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]> Signed-off-by: Tashfin Shakeer Rhythm <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: I98dd1aee705b3c1ebca270ce641b328ef150bdf4 Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: I98dd1aee705b3c1ebca270ce641b328ef150bdf4 Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: I98dd1aee705b3c1ebca270ce641b328ef150bdf4 Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ia4bd02e2340f830b5027a3871a94f06d6c0dcfa2 Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]> Signed-off-by: Amrito | アンブロシア <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]> Signed-off-by: Amrito | アンブロシア <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]> Signed-off-by: Amrito | アンブロシア <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]> Signed-off-by: Amrito | アンブロシア <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]> Signed-off-by: Amrito | アンブロシア <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Change-Id: I9e9a142b2e332a210a757a30e732e09f0febddbc Signed-off-by: Alexander Winkowski <[email protected]>
Building with UBSAN_DIV_ZERO with clang produces numerous fallthrough warnings from objtool. In the case of uncheck division, UBSAN_DIV_ZERO may introduce new control flow to check for division by zero. Because the result of the division is undefined, LLVM may optimize the control flow such that after the call to __ubsan_handle_divrem_overflow doesn't matter. If panic_on_warn was set, __ubsan_handle_divrem_overflow would panic. The problem is is that panic_on_warn is run time configurable. If it's disabled, then we cannot guarantee that we will be able to recover safely. Disable this config for clang until we can come up with a solution in LLVM. Link: ClangBuiltLinux/linux#1657 Link: llvm/llvm-project#56289 Link: https://lore.kernel.org/lkml/CAHk-=wj1qhf7y3VNACEexyp5EbkNpdcu_542k-xZpzmYLOjiCg@mail.gmail.com/ Reported-by: Sudip Mukherjee <[email protected]> Suggested-by: Linus Torvalds <[email protected]> Signed-off-by: Nick Desaulniers <[email protected]> Change-Id: Ib148a383852bd6a0e9e2c8bafcd10961c37991dc Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Alexander Winkowski <[email protected]> (cherry picked from commit 65b37d8468a4afffbef4ba91c5ae53d3d90e7911) Signed-off-by: TogoFire <[email protected]>
From this thread:
Reported-by: Sudip Mukherjee <[email protected]>
It seems like a bunch of these have something to do with
__ubsan_handle_divrem_overflow
. It's not clear to me yet that clang expects that fn to benoreturn
(I haven't found anything in the IR or clang sources that assumes so), as hypothesized here.The text was updated successfully, but these errors were encountered: