Thread (18 messages) flat view 18 messages, 8 authors, 2021-02-10

Re: linux-next: Tree for Feb 8 (objtool: warnings: 5)

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-02-09 08:07:16
Also in: lkml
Subsystem: library code, the rest, ubsan · Maintainers: Andrew Morton, Linus Torvalds, Kees Cook

On Mon, Feb 08, 2021 at 03:21:53PM -0600, Josh Poimboeuf wrote:
quoted
fs/select.o: warning: objtool: do_sys_poll()+0x8e9: call to __ubsan_handle_sub_overflow() with UACCESS enabled
lib/iov_iter.o: warning: objtool: iovec_from_user.part.12()+0x2db: call to __ubsan_handle_add_overflow() with UACCESS enabled
Peter, we need the patch to prevent UBSAN with gcc7?
I send it a while ago, Andrey wasn't liking it or something :/ But yes,
UBSAN on <GCC8 is buggered. Randy ought to be aware of that though.
Maybe he wanted something like the below?

quoted
vmlinux.o: warning: objtool: do_machine_check()+0x7ee: call to queue_task_work() leaves .noinstr.text section
vmlinux.o: warning: objtool: lock_is_held_type()+0x107: call to warn_bogus_irq_restore() leaves .noinstr.text section
Peter?
The mce one is a rats nest, Boris has that on his todo list. I'll go
look at the lockdep one.


---
 lib/Kconfig.ubsan | 1 +
 1 file changed, 1 insertion(+)
diff --git a/lib/Kconfig.ubsan b/lib/Kconfig.ubsan
index 3a0b1c930733..6e4634b3b40e 100644
--- a/lib/Kconfig.ubsan
+++ b/lib/Kconfig.ubsan
@@ -116,6 +116,7 @@ config UBSAN_SIGNED_OVERFLOW
 	bool "Perform checking for signed arithmetic overflow"
 	default UBSAN
 	depends on $(cc-option,-fsanitize=signed-integer-overflow)
+	depends on !CC_IS_GCC || GCC_VERSION >= 80000
 	help
 	  This option enables -fsanitize=signed-integer-overflow which checks
 	  for overflow of any arithmetic operations with signed integers.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help