]> git.baikalelectronics.ru Git - kernel.git/commit
include/linux/compiler.h: fix Oops for Clang-compiled kernels
authorNick Desaulniers <ndesaulniers@google.com>
Wed, 28 Aug 2019 22:55:23 +0000 (15:55 -0700)
committerMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Sun, 8 Sep 2019 12:53:58 +0000 (14:53 +0200)
commit9eb2a2dce8e57c4c88c777dbe44d2fef681d9316
tree097599d8d0e1fa813a0f6f590cf6be56b4cb32df
parent8a9d99520c17c557e8eba8e3fb857089f0033021
include/linux/compiler.h: fix Oops for Clang-compiled kernels

GCC unescapes escaped string section names while Clang does not. Because
__section uses the `#` stringification operator for the section name, it
doesn't need to be escaped.

This fixes an Oops observed in distro's that use systemd and not
net.core.bpf_jit_enable=1, when their kernels are compiled with Clang.

Link: https://github.com/ClangBuiltLinux/linux/issues/619
Link: https://bugs.llvm.org/show_bug.cgi?id=42950
Link: https://marc.info/?l=linux-netdev&m=156412960619946&w=2
Link: https://lore.kernel.org/lkml/20190904181740.GA19688@gmail.com/
Acked-by: Will Deacon <will@kernel.org>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
[Cherry-picked from the __section cleanup series for 5.3]
[Adjusted commit message]
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
include/linux/compiler.h