diff options
author | Andrey Ryabinin <aryabinin@virtuozzo.com> | 2018-02-06 15:40:42 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-02-16 20:23:09 +0100 |
commit | 2617e62c2f120fe02a14e01232db4127f8e414a2 (patch) | |
tree | d2059950c56dd2a34d09d3fb30bc48d9248941e7 /tools/objtool | |
parent | 5a5df7771064defa931d44ed28fec673fe66752f (diff) | |
download | linux-stable-2617e62c2f120fe02a14e01232db4127f8e414a2.tar.gz linux-stable-2617e62c2f120fe02a14e01232db4127f8e414a2.tar.bz2 linux-stable-2617e62c2f120fe02a14e01232db4127f8e414a2.zip |
lib/ubsan: add type mismatch handler for new GCC/Clang
commit 42440c1f9911b4b7b8ba3dc4e90c1197bc561211 upstream.
UBSAN=y fails to build with new GCC/clang:
arch/x86/kernel/head64.o: In function `sanitize_boot_params':
arch/x86/include/asm/bootparam_utils.h:37: undefined reference to `__ubsan_handle_type_mismatch_v1'
because Clang and GCC 8 slightly changed ABI for 'type mismatch' errors.
Compiler now uses new __ubsan_handle_type_mismatch_v1() function with
slightly modified 'struct type_mismatch_data'.
Let's add new 'struct type_mismatch_data_common' which is independent from
compiler's layout of 'struct type_mismatch_data'. And make
__ubsan_handle_type_mismatch[_v1]() functions transform compiler-dependent
type mismatch data to our internal representation. This way, we can
support both old and new compilers with minimal amount of change.
Link: http://lkml.kernel.org/r/20180119152853.16806-1-aryabinin@virtuozzo.com
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reported-by: Sodagudi Prasad <psodagud@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/objtool')
0 files changed, 0 insertions, 0 deletions