Fix Oops in Clang-compiled kernels (Nick Desaulniers)

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPjU5OPd5QIZ9jqqOGXyLc2htIW0FAl11AIYACgkQGXyLc2ht
 IW1uAQ/+LkwyLy5NfQG0FuWJBsciE8a4dNpN51d8l4EnCsYZVyJXvzleQ0fYGYW3
 xfecrc6bArjN1yZzYhQLJyxZbCFfSRVCu+fCx03uRR2kKXmMPNasjMf/tEm3RgGd
 YOeWpE1cQEJ5t7RuR+HJJoS7oEvUWLOb/rKGV2K6hvQZyv4kYW4uJStUKjUHcDwx
 uIISv7FOOoEY1ZPwtTjbhSRULyBZddDPusWV455j5sAiJD6L15kg6t9/FLaKD+hu
 yA1Z9dv53XFEb5n3s2A9IujpD46N4BykXBB82+GAFYbei+6Ca6mpJp0DaYY2gwqP
 K4XmL+YPwIW0xN7Nv/otM6sehHf40UepWaPhvNKlaicQGAbwTpYEwFp7bViaZ2Sv
 Tj0tDAjkuhAGvdtLc367zyCIEP3XHwyfv8SnoNYiNtb7fcv9hhUsxLOFkr+XKt5S
 jdO0xZH0hGF42yr+MsjIdRXoAfZEHFqETy8paorgxqU02NScpmi/+r8pcTo8pqV3
 w7ziJTB6hoWPw2RNA/VphxucwnbCnZD79P35sE8nhBS94OSi4o27wBZ+B1hCg08Z
 /6ZCT2VlDfgIszH+ueQLa4b53lzTI6EDYyMomLJEvM1jLkSmojzTIzWgMfiN3E4T
 gIu/8ogDHCmDM+nT94/7YYhWcEefuzzO1YYilKCZ4IZxU5DyrlQ=
 =+sX1
 -----END PGP SIGNATURE-----

Merge tag 'compiler-attributes-for-linus-v5.3-rc8' of git://github.com/ojeda/linux

Pull section attribute fix from Miguel Ojeda:
 "Fix Oops in Clang-compiled kernels (Nick Desaulniers)"

* tag 'compiler-attributes-for-linus-v5.3-rc8' of git://github.com/ojeda/linux:
  include/linux/compiler.h: fix Oops for Clang-compiled kernels
This commit is contained in:
Linus Torvalds 2019-09-08 09:34:55 -07:00
commit 983f700eab

View File

@ -24,7 +24,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
long ______r; \
static struct ftrace_likely_data \
__aligned(4) \
__section("_ftrace_annotated_branch") \
__section(_ftrace_annotated_branch) \
______f = { \
.data.func = __func__, \
.data.file = __FILE__, \
@ -60,7 +60,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
#define __trace_if_value(cond) ({ \
static struct ftrace_branch_data \
__aligned(4) \
__section("_ftrace_branch") \
__section(_ftrace_branch) \
__if_trace = { \
.func = __func__, \
.file = __FILE__, \
@ -118,7 +118,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
".popsection\n\t"
/* Annotate a C jump table to allow objtool to follow the code flow */
#define __annotate_jump_table __section(".rodata..c_jump_table")
#define __annotate_jump_table __section(.rodata..c_jump_table)
#else
#define annotate_reachable()
@ -298,7 +298,7 @@ unsigned long read_word_at_a_time(const void *addr)
* visible to the compiler.
*/
#define __ADDRESSABLE(sym) \
static void * __section(".discard.addressable") __used \
static void * __section(.discard.addressable) __used \
__PASTE(__addressable_##sym, __LINE__) = (void *)&sym;
/**