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.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -24,7 +24,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, · 23 unmodified lines | ||
| 24 | 24 | long ______r; \ |
| 25 | 25 | static struct ftrace_likely_data \ |
| 26 | 26 | __aligned(4) \ |
| 27 | − __section("_ftrace_annotated_branch") \ | |
| 27 | + __section(_ftrace_annotated_branch) \ | |
| 28 | 28 | ______f = { \ |
| 29 | 29 | .data.func = __func__, \ |
| 30 | 30 | .data.file = __FILE__, \ |
| @@ -60,7 +60,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, · 29 unmodified lines | ||
| 60 | 60 | #define __trace_if_value(cond) ({ \ |
| 61 | 61 | static struct ftrace_branch_data \ |
| 62 | 62 | __aligned(4) \ |
| 63 | − __section("_ftrace_branch") \ | |
| 63 | + __section(_ftrace_branch) \ | |
| 64 | 64 | __if_trace = { \ |
| 65 | 65 | .func = __func__, \ |
| 66 | 66 | .file = __FILE__, \ |
| @@ -118,7 +118,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, · 51 unmodified lines | ||
| 118 | 118 | ".popsection\n\t" |
| 119 | 119 | |
| 120 | 120 | /* Annotate a C jump table to allow objtool to follow the code flow */ |
| 121 | −#define __annotate_jump_table __section(".rodata..c_jump_table") | |
| 121 | +#define __annotate_jump_table __section(.rodata..c_jump_table) | |
| 122 | 122 | |
| 123 | 123 | #else |
| 124 | 124 | #define annotate_reachable() |
| @@ -298,7 +298,7 @@ unsigned long read_word_at_a_time(const void *addr) · 173 unmodified lines | ||
| 298 | 298 | * visible to the compiler. |
| 299 | 299 | */ |
| 300 | 300 | #define __ADDRESSABLE(sym) \ |
| 301 | − static void * __section(".discard.addressable") __used \ | |
| 301 | + static void * __section(.discard.addressable) __used \ | |
| 302 | 302 | __PASTE(__addressable_##sym, __LINE__) = (void *)&sym; |
| 303 | 303 | |
| 304 | 304 | /** |