Andrey Ryabinin 6aaa31aeb9 ubsan: remove overflow checks
Since GCC 8.0 -fsanitize=signed-integer-overflow doesn't work with
-fwrapv.  -fwrapv makes signed overflows defines and GCC essentially
disables ubsan checks.  On GCC < 8.0 -fwrapv doesn't have influence on
-fsanitize=signed-integer-overflow setting, so it kinda works but
generates false-positves and violates uaccess rules:

lib/iov_iter.o: warning: objtool: iovec_from_user()+0x22d: call to
__ubsan_handle_add_overflow() with UACCESS enabled

Disable signed overflow checks to avoid these problems.  Remove unsigned
overflow checks as well.  Unsigned overflow appeared as side effect of
commit cdf8a76fda4a ("ubsan: move cc-option tests into Kconfig"), but it
never worked (kernel doesn't boot).  And unsigned overflows are allowed by
C standard, so it just pointless.

Link: https://lkml.kernel.org/r/20210209232348.20510-1-ryabinin.a.a@gmail.com
Signed-off-by: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-02-26 09:41:05 -08:00
..
2020-08-09 14:10:26 -07:00
2020-10-30 17:34:45 +11:00
2020-05-24 20:48:11 +02:00
2020-10-16 11:11:19 -07:00
2018-08-16 12:14:42 -07:00
2021-02-08 12:24:26 +01:00
2021-01-21 14:06:00 -07:00
2020-10-20 14:39:37 -07:00
2021-02-21 11:02:48 -08:00
2021-02-26 09:41:02 -08:00
2021-02-26 09:41:05 -08:00
2018-10-16 13:45:44 +02:00
2021-02-15 15:31:52 -08:00
2021-02-03 19:10:42 +01:00
2020-10-20 14:39:37 -07:00
2020-12-07 17:12:49 -07:00
2020-06-15 18:22:43 -07:00
2019-07-11 15:17:41 -07:00
2020-12-15 22:46:16 -08:00
2018-10-15 16:31:29 -04:00
2020-12-15 22:46:16 -08:00
2021-02-22 11:04:36 -08:00
2021-02-26 09:41:05 -08:00
2020-10-20 14:39:37 -07:00
2021-02-26 09:41:05 -08:00
2020-10-20 14:39:37 -07:00