srcu: avoid escaped section names
Subsystems (52)
PATCH 1/1 srcu: avoid escaped section names
The stringification operator, #, in the preprocessor escapes strings. For example, # "foo" becomes "\"foo\"". GCC and Clang differ in how they treat section names that contain \".
The portable solution is to not use a string literal with the preprocessor stringification operator.
--- arch/arm/Kconfig | 1 + arch/arm/mm/Kconfig | 11 +++++++++++ include/linux/srcutree.h | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-)
arch/arm/Kconfig +1 -0
@@ -358,6 +358,7 @@ config ARCH_EBSA110 config ARCH_EP93XX bool "EP93xx-based" + depends on !LD_IS_LLD select ARCH_SPARSEMEM_ENABLE select ARM_AMBA imply ARM_PATCH_PHYS_VIRT
arch/arm/mm/Kconfig +11 -0
@@ -9,6 +9,7 @@ comment "Processor Type" config CPU_ARM7TDMI bool depends on !MMU + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_LV4T select CPU_CACHE_V4
@@ -23,6 +24,7 @@ config CPU_ARM7TDMI # ARM720T config CPU_ARM720T bool + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_LV4T select CPU_CACHE_V4
@@ -43,6 +45,7 @@ config CPU_ARM720T config CPU_ARM740T bool depends on !MMU + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_LV4T select CPU_CACHE_V4
@@ -61,6 +64,7 @@ config CPU_ARM740T config CPU_ARM9TDMI bool depends on !MMU + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_NOMMU select CPU_CACHE_V4
@@ -75,6 +79,7 @@ config CPU_ARM9TDMI # ARM920T config CPU_ARM920T bool + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_EV4T select CPU_CACHE_V4WT
@@ -94,6 +99,7 @@ config CPU_ARM920T # ARM922T config CPU_ARM922T bool + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_EV4T select CPU_CACHE_V4WT
@@ -114,6 +120,7 @@ config CPU_ARM922T # ARM925T config CPU_ARM925T bool + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_EV4T select CPU_CACHE_V4WT
@@ -153,6 +160,7 @@ config CPU_ARM926T # FA526 config CPU_FA526 bool + depends on !LD_IS_LLD select CPU_32v4 select CPU_ABRT_EV4 select CPU_CACHE_FA
@@ -172,6 +180,7 @@ config CPU_FA526 config CPU_ARM940T bool depends on !MMU + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_NOMMU select CPU_CACHE_VIVT
@@ -278,6 +287,7 @@ config CPU_ARM1026 # SA110 config CPU_SA110 bool + depends on !LD_IS_LLD select CPU_32v3 if ARCH_RPC select CPU_32v4 if !ARCH_RPC select CPU_ABRT_EV4
@@ -299,6 +309,7 @@ config CPU_SA110 # SA1100 config CPU_SA1100 bool + depends on !LD_IS_LLD select CPU_32v4 select CPU_ABRT_EV4 select CPU_CACHE_V4WB
include/linux/srcutree.h +1 -1
@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \
Signature · 1 line
2.28.0.709.gb0816b6eb0-goog
gah, must have had a -a in my git commit --amend...sorry, will send a v2...
Quoted 137 lines · Nick Desaulniers
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>--- arch/arm/Kconfig | 1 + arch/arm/mm/Kconfig | 11 +++++++++++ include/linux/srcutree.h | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-)arch/arm/Kconfig +1
-0@@ -358,6 +358,7 @@ config ARCH_EBSA110 config ARCH_EP93XX bool "EP93xx-based" + depends on !LD_IS_LLD select ARCH_SPARSEMEM_ENABLE select ARM_AMBA imply ARM_PATCH_PHYS_VIRTarch/arm/mm/Kconfig +11
-0@@ -9,6 +9,7 @@ comment "Processor Type" config CPU_ARM7TDMI bool depends on !MMU + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_LV4T select CPU_CACHE_V4@@ -23,6 +24,7 @@ config CPU_ARM7TDMI # ARM720T config CPU_ARM720T bool + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_LV4T select CPU_CACHE_V4@@ -43,6 +45,7 @@ config CPU_ARM720T config CPU_ARM740T bool depends on !MMU + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_LV4T select CPU_CACHE_V4@@ -61,6 +64,7 @@ config CPU_ARM740T config CPU_ARM9TDMI bool depends on !MMU + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_NOMMU select CPU_CACHE_V4@@ -75,6 +79,7 @@ config CPU_ARM9TDMI # ARM920T config CPU_ARM920T bool + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_EV4T select CPU_CACHE_V4WT@@ -94,6 +99,7 @@ config CPU_ARM920T # ARM922T config CPU_ARM922T bool + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_EV4T select CPU_CACHE_V4WT@@ -114,6 +120,7 @@ config CPU_ARM922T # ARM925T config CPU_ARM925T bool + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_EV4T select CPU_CACHE_V4WT@@ -153,6 +160,7 @@ config CPU_ARM926T # FA526 config CPU_FA526 bool + depends on !LD_IS_LLD select CPU_32v4 select CPU_ABRT_EV4 select CPU_CACHE_FA@@ -172,6 +180,7 @@ config CPU_FA526 config CPU_ARM940T bool depends on !MMU + depends on !LD_IS_LLD select CPU_32v4T select CPU_ABRT_NOMMU select CPU_CACHE_VIVT@@ -278,6 +287,7 @@ config CPU_ARM1026 # SA110 config CPU_SA110 bool + depends on !LD_IS_LLD select CPU_32v3 if ARCH_RPC select CPU_32v4 if !ARCH_RPC select CPU_ABRT_EV4@@ -299,6 +309,7 @@ config CPU_SA110 # SA1100 config CPU_SA1100 bool + depends on !LD_IS_LLD select CPU_32v4 select CPU_ABRT_EV4 select CPU_CACHE_V4WBinclude/linux/srcutree.h +1
-2@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \ --2.28.0.709.gb0816b6eb0-goog
Signature · 2 lines
Thanks, ~Nick Desaulniers
PATCH v2 1/1 srcu: avoid escaped section names
The stringification operator, #, in the preprocessor escapes strings. For example, # "foo" becomes "\"foo\"". GCC and Clang differ in how they treat section names that contain \".
The portable solution is to not use a string literal with the preprocessor stringification operator.
---
Changes V1->V2:
* drop unrelated Kconfig changes accidentally committed in v1.
include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/srcutree.h +1 -1
@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \
Signature · 1 line
2.28.0.709.gb0816b6eb0-goog
Quoted 10 lines · Nick Desaulniers
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>
Ah, ignore my earlier question about also fixing this instance. Here it is! ;)
-Kees
Quoted 23 lines
---
ChangesV1->V2:
* drop unrelatedKconfigchanges accidentally committed in v1.include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/srcutree.h +1
-1@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \Signature · 1 line
2.28.0.709.gb0816b6eb0-goog
Signature · 1 line
Kees Cook
Quoted 10 lines · Nick Desaulniers' via Clang Built Linux
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>
Quoted 23 lines
---
ChangesV1->V2:
* drop unrelatedKconfigchanges accidentally committed in v1.include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/srcutree.h +1
-1@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \Signature · 1 line
2.28.0.709.gb0816b6eb0-goog
Quoted 11 lines · Nick Desaulniers' via Clang Built Linux
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>
Puh, remember one year ago an overnight bisecting to catch the root cause for "escaped section names".
The two patches I see - this here and "export.h: fix section name for CONFIG_TRIM_UNUSED_KSYMS for Clang" were new cases?
Do we have a check-script to catch/avoid such cases (Joe Perches?)?
- Sedat -
Quoted 27 lines
---
ChangesV1->V2:
* drop unrelatedKconfigchanges accidentally committed in v1.include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/srcutree.h +1
-2@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \ --2.28.0.709.gb0816b6eb0-goog
--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20200929192549.501516-1-ndesaulniers%40google.com.
Quoted 13 lines · Sedat Dilek
Quoted 10 lines · Nick Desaulniers' via Clang Built Linux
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>
Quoted 7 lines
Puh, remember one year ago an overnight bisecting to catch the root cause for "escaped section names".
The two patches I see - this here and "
export.h: fix section name forCONFIG_TRIM_UNUSED_KSYMSfor Clang" were new cases?Do we have a check-script to catch/avoid such cases (Joe Perches?)?
Try the script that removes #S from #define __section(S)
RFC PATCH 1/1 treewide: Convert macro and uses of __section(foo) to __section("foo")
Use a more generic form for __section that requires quotes to avoid complications with clang and gcc differences.
Remove the quote operator # from compiler_attributes.h __section macro.
Convert all unquoted __section(foo) uses to quoted __section("foo"). Also convert __attribute__((section("foo"))) uses to __section("foo") even if the __attribute__ has multiple list entry forms.
---
This is the current output from the script against next-20200930 attached in this link:
https://lore.kernel.org/lkml/[email protected]/
It might be useful to run the script immediately before the next -rc1.
arch/arc/include/asm/linkage.h | 8 +++---- arch/arc/include/asm/mach_desc.h | 2 +- arch/arc/plat-hsdk/platform.c | 2 +- arch/arm/include/asm/cache.h | 2 +- arch/arm/include/asm/cpuidle.h | 2 +- arch/arm/include/asm/idmap.h | 2 +- arch/arm/include/asm/mach/arch.h | 4 ++-- arch/arm/include/asm/setup.h | 2 +- arch/arm/include/asm/smp.h | 2 +- arch/arm/include/asm/tcm.h | 8 +++---- arch/arm/kernel/cpuidle.c | 2 +- arch/arm/kernel/devtree.c | 2 +- arch/arm64/include/asm/cache.h | 2 +- arch/arm64/kernel/efi.c | 2 +- arch/arm64/kernel/smp_spin_table.c | 2 +- arch/arm64/mm/mmu.c | 2 +- arch/csky/include/asm/tcm.h | 8 +++---- arch/ia64/include/asm/cache.h | 2 +- arch/microblaze/kernel/setup.c | 2 +- arch/mips/include/asm/cache.h | 2 +- arch/mips/include/asm/machine.h | 2 +- arch/mips/kernel/setup.c | 2 +- arch/mips/mm/init.c | 2 +- arch/parisc/include/asm/cache.h | 2 +- arch/parisc/include/asm/ldcw.h | 2 +- arch/parisc/kernel/ftrace.c | 2 +- arch/parisc/mm/init.c | 6 ++--- arch/powerpc/boot/main.c | 2 +- arch/powerpc/boot/ps3.c | 2 +- arch/powerpc/include/asm/cache.h | 2 +- arch/powerpc/include/asm/machdep.h | 2 +- arch/powerpc/kernel/btext.c | 2 +- arch/powerpc/kernel/prom_init.c | 2 +- arch/powerpc/kvm/book3s_64_vio_hv.c | 2 +- arch/riscv/include/asm/soc.h | 4 ++-- arch/riscv/kernel/cpu_ops.c | 4 ++-- arch/riscv/kernel/setup.c | 2 +- arch/s390/boot/startup.c | 2 +- arch/s390/include/asm/cache.h | 2 +- arch/s390/include/asm/sections.h | 4 ++-- arch/s390/mm/init.c | 2 +- arch/sh/boards/of-generic.c | 2 +- arch/sh/include/asm/cache.h | 2 +- arch/sh/include/asm/machvec.h | 2 +- arch/sh/include/asm/smp.h | 2 +- arch/sparc/include/asm/cache.h | 2 +- arch/sparc/kernel/btext.c | 2 +- arch/um/include/shared/init.h | 22 ++++++++--------- arch/um/kernel/skas/clone.c | 2 +- arch/um/kernel/um_arch.c | 2 +- arch/x86/boot/compressed/pgtable_64.c | 2 +- arch/x86/boot/tty.c | 8 +++---- arch/x86/boot/video.h | 2 +- arch/x86/include/asm/apic.h | 4 ++-- arch/x86/include/asm/cache.h | 2 +- arch/x86/include/asm/intel-mid.h | 2 +- arch/x86/include/asm/irqflags.h | 2 +- arch/x86/include/asm/mem_encrypt.h | 2 +- arch/x86/include/asm/setup.h | 2 +- arch/x86/kernel/cpu/cpu.h | 2 +- arch/x86/kernel/head64.c | 2 +- arch/x86/mm/mem_encrypt.c | 6 ++--- arch/x86/mm/mem_encrypt_identity.c | 2 +- arch/x86/platform/pvh/enlighten.c | 4 ++-- arch/x86/purgatory/purgatory.c | 4 ++-- arch/x86/um/stub_segv.c | 2 +- arch/x86/xen/enlighten.c | 2 +- arch/x86/xen/enlighten_pvh.c | 2 +- arch/xtensa/kernel/setup.c | 2 +- drivers/clk/clk.c | 2 +- drivers/clocksource/timer-probe.c | 2 +- drivers/irqchip/irqchip.c | 2 +- drivers/of/of_reserved_mem.c | 2 +- drivers/thermal/thermal_core.h | 2 +- fs/xfs/xfs_message.h | 2 +- include/asm-generic/bug.h | 6 ++--- include/asm-generic/error-injection.h | 2 +- include/asm-generic/kprobes.h | 4 ++-- include/linux/acpi.h | 4 ++-- include/linux/cache.h | 2 +- include/linux/compiler.h | 8 +++---- include/linux/compiler_attributes.h | 2 +- include/linux/cpu.h | 2 +- include/linux/dynamic_debug.h | 2 +- include/linux/export.h | 2 +- include/linux/firmware.h | 2 +- include/linux/init.h | 34 +++++++++++++-------------- include/linux/init_task.h | 4 ++-- include/linux/interrupt.h | 4 ++-- include/linux/kernel.h | 6 ++--- include/linux/linkage.h | 4 ++-- include/linux/lsm_hooks.h | 4 ++-- include/linux/module.h | 2 +- include/linux/moduleparam.h | 4 ++-- include/linux/mtd/xip.h | 2 +- include/linux/objtool.h | 2 +- include/linux/of.h | 2 +- include/linux/percpu-defs.h | 2 +- include/linux/printk.h | 4 ++-- include/linux/rcupdate.h | 2 +- include/linux/sched/debug.h | 2 +- include/linux/serial_core.h | 2 +- include/linux/spinlock.h | 2 +- include/linux/syscalls.h | 6 ++--- include/linux/trace_events.h | 2 +- include/linux/tracepoint.h | 8 +++---- include/trace/bpf_probe.h | 2 +- include/trace/trace_events.h | 10 ++++---- kernel/kallsyms.c | 4 ++-- kernel/sched/deadline.c | 2 +- kernel/sched/fair.c | 2 +- kernel/sched/idle.c | 2 +- kernel/sched/rt.c | 2 +- kernel/sched/stop_task.c | 2 +- kernel/trace/trace.h | 2 +- kernel/trace/trace_export.c | 2 +- scripts/mod/modpost.c | 4 ++-- tools/include/linux/objtool.h | 2 +- 118 files changed, 193 insertions(+), 193 deletions(-)
arch/arc/include/asm/linkage.h +4 -4
@@ -64,15 +64,15 @@#else /* !__ASSEMBLY__ */ #ifdef CONFIG_ARC_HAS_ICCM -#define __arcfp_code __section(.text.arcfp) +#define __arcfp_code __section(".text.arcfp")#else -#define __arcfp_code __section(.text) +#define __arcfp_code __section(".text")#endif #ifdef CONFIG_ARC_HAS_DCCM -#define __arcfp_data __section(.data.arcfp) +#define __arcfp_data __section(".data.arcfp")#else -#define __arcfp_data __section(.data) +#define __arcfp_data __section(".data")#endif #endif /* __ASSEMBLY__ */
arch/arc/include/asm/mach_desc.h +1 -1
@@ -53,7 +53,7 @@ extern const struct machine_desc __arch_info_begin[], __arch_info_end[];*/ #define MACHINE_START (_type, _name) \ static const struct machine_desc __mach_desc_##_type \ -__used __section(.arch.info.init) = { \ +__used __section(".arch.info.init") = { \ .name = _name,#define MACHINE_END \
arch/arc/plat-hsdk/platform.c +1 -1
@@ -13,7 +13,7 @@#include <asm/io.h> #include <asm/mach_desc.h> -int arc_hsdk_axi_dmac_coherent __section(.data) = 0; +int arc_hsdk_axi_dmac_coherent __section(".data") = 0;#define ARC_CCM_UNUSED_ADDR 0x60000000
arch/arm/include/asm/cache.h +1 -1
@@ -24,6 +24,6 @@#define ARCH_SLAB_MINALIGN 8#endif -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(".data..read_mostly")#endif
arch/arm/include/asm/cpuidle.h +1 -1
@@ -42,7 +42,7 @@ struct of_cpuidle_method {#define CPUIDLE_METHOD_OF_DECLARE (name, _method, _ops) \ static const struct of_cpuidle_method __cpuidle_method_of_table_##name \ - __used __section(__cpuidle_method_of_table) \ + __used __section("__cpuidle_method_of_table") \ = { .method = _method, .ops = _ops }extern int arm_cpuidle_suspend (int index);
arch/arm/include/asm/idmap.h +1 -1
@@ -6,7 +6,7 @@#include <linux/pgtable.h> /* Tag a function as requiring to be executed via an identity mapping. */ -#define __idmap __section(.idmap.text) noinline notrace +#define __idmap __section(".idmap.text") noinline notraceextern pgd_t *idmap_pgd;
arch/arm/include/asm/mach/arch.h +2 -2
@@ -81,7 +81,7 @@ extern const struct machine_desc __arch_info_begin[], __arch_info_end[];#define MACHINE_START (_type,_name) \ static const struct machine_desc __mach_desc_##_type \ __used \ - __attribute__((__section__(".arch.info.init"))) = { \ + __section(".arch.info.init") = { \ .nr = MACH_TYPE_##_type, \ .name = _name,
@@ -91,7 +91,7 @@ static const struct machine_desc __mach_desc_##_type \#define DT_MACHINE_START (_name, _namestr) \ static const struct machine_desc __mach_desc_##_name \ __used \ - __attribute__((__section__(".arch.info.init"))) = { \ + __section(".arch.info.init") = { \ .nr = ~0, \ .name = _namestr,
arch/arm/include/asm/setup.h +1 -1
@@ -14,7 +14,7 @@#include <uapi/asm/setup.h> -#define __tag __used __attribute__((__section__(".taglist.init"))) +#define __tag __used __section(".taglist.init")#define __tagtable (tag, fn) \ static const struct tagtable __tagtable_##fn __tag = { tag, fn }
arch/arm/include/asm/smp.h +1 -1
@@ -112,7 +112,7 @@ struct of_cpu_method {#define CPU_METHOD_OF_DECLARE (name, _method, _ops) \ static const struct of_cpu_method __cpu_method_of_table_##name \ - __used __section(__cpu_method_of_table) \ + __used __section("__cpu_method_of_table") \ = { .method = _method, .ops = _ops }/* * set platform specific SMP operations
arch/arm/include/asm/tcm.h +4 -4
@@ -16,13 +16,13 @@#include <linux/compiler.h> /* Tag variables with this */ -#define __tcmdata __section(.tcm.data) +#define __tcmdata __section(".tcm.data")/* Tag constants with this */ -#define __tcmconst __section(.tcm.rodata) +#define __tcmconst __section(".tcm.rodata")/* Tag functions inside TCM called from outside TCM with this */ -#define __tcmfunc __attribute__((long_call)) __section(.tcm.text) noinline +#define __tcmfunc __attribute__((long_call)) __section(".tcm.text") noinline/* Tag function inside TCM called from inside TCM with this */ -#define __tcmlocalfunc __section(.tcm.text) +#define __tcmlocalfunc __section(".tcm.text")void *tcm_alloc (size_t len);void tcm_free (void *addr,size_t len);
arch/arm/kernel/cpuidle.c +1 -1
@@ -11,7 +11,7 @@extern struct of_cpuidle_method __cpuidle_method_of_table[]; static const struct of_cpuidle_method __cpuidle_method_of_table_sentinel -__used __section (__cpuidle_method_of_table_end); +__used __section ("__cpuidle_method_of_table_end" );static struct cpuidle_ops cpuidle_ops[NR_CPUS ]__ro_after_init ;
arch/arm/kernel/devtree.c +1 -1
@@ -29,7 +29,7 @@extern struct of_cpu_method __cpu_method_of_table[]; static const struct of_cpu_method __cpu_method_of_table_sentinel -__used __section (__cpu_method_of_table_end); +__used __section ("__cpu_method_of_table_end" );static int __init set_smp_ops_by_method (struct device_node *node)
arch/arm64/include/asm/cache.h +1 -1
@@ -79,7 +79,7 @@ static inline u32 cache_type_cwg(void)return (read_cpuid_cachetype () >>CTR_CWG_SHIFT ) &CTR_CWG_MASK ; } -#define __read_mostly __section(.data..read_mostly) +#define __read_mostly __section(".data..read_mostly")static inline int cache_line_size_of_cpu (void ) {
arch/arm64/kernel/efi.c +1 -1
@@ -54,7 +54,7 @@ static __init pteval_t create_mapping_protection(efi_memory_desc_t *md) }/* we will fill this structure from the stub, so don't put it in .bss */ -struct screen_info screen_info __section(.data); +struct screen_info screen_info __section(".data");int __init efi_create_mapping (struct mm_struct *mm,efi_memory_desc_t *md) {
arch/arm64/kernel/smp_spin_table.c +1 -1
@@ -19,7 +19,7 @@#include <asm/smp_plat.h> extern void secondary_holding_pen (void ); -volatile unsigned long __section(.mmuoff.data.read) +volatile unsigned long __section(".mmuoff.data.read") secondary_holding_pen_release =INVALID_HWID ;static phys_addr_t cpu_release_addr[NR_CPUS ];
arch/arm64/mm/mmu.c +1 -1
@@ -43,7 +43,7 @@u64 idmap_t0sz =TCR_T0SZ (VA_BITS );u64 idmap_ptrs_per_pgd =PTRS_PER_PGD ; -u64 __section(.mmuoff.data.write) vabits_actual; +u64 __section(".mmuoff.data.write") vabits_actual;EXPORT_SYMBOL (vabits_actual);u64 kimage_voffset__ro_after_init ;
arch/csky/include/asm/tcm.h +4 -4
@@ -10,13 +10,13 @@#include <linux/compiler.h> /* Tag variables with this */ -#define __tcmdata __section(.tcm.data) +#define __tcmdata __section(".tcm.data")/* Tag constants with this */ -#define __tcmconst __section(.tcm.rodata) +#define __tcmconst __section(".tcm.rodata")/* Tag functions inside TCM called from outside TCM with this */ -#define __tcmfunc __section(.tcm.text) noinline +#define __tcmfunc __section(".tcm.text") noinline/* Tag function inside TCM called from inside TCM with this */ -#define __tcmlocalfunc __section(.tcm.text) +#define __tcmlocalfunc __section(".tcm.text")void *tcm_alloc (size_t len);void tcm_free (void *addr,size_t len);
arch/ia64/include/asm/cache.h +1 -1
@@ -25,6 +25,6 @@# define SMP_CACHE_BYTES (1 << 3)#endif -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(".data..read_mostly")#endif /* _ASM_IA64_CACHE_H */
arch/microblaze/kernel/setup.c +1 -1
@@ -46,7 +46,7 @@ DEFINE_PER_CPU(unsigned int, CURRENT_SAVE); /* Saved current pointer */* ASM code. Default position is BSS section which is cleared * in machine_early_init(). */ -char cmd_line[COMMAND_LINE_SIZE] __attribute__ ((section(".data"))); +char cmd_line[COMMAND_LINE_SIZE] __section(".data");void __init setup_arch (char **cmdline_p) {
arch/mips/include/asm/cache.h +1 -1
@@ -14,6 +14,6 @@#define L1_CACHE_SHIFT CONFIG_MIPS_L1_CACHE_SHIFT#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(".data..read_mostly")#endif /* _ASM_CACHE_H */
arch/mips/include/asm/machine.h +1 -1
@@ -23,7 +23,7 @@ extern long __mips_machines_end;#define MIPS_MACHINE (name) \ static const struct mips_machine __mips_mach_##name \ - __used __section(.mips.machines.init) + __used __section(".mips.machines.init")#define for_each_mips_machine (mach) \ for ((mach) = (struct mips_machine *)&__mips_machines_start; \
arch/mips/kernel/setup.c +1 -1
@@ -44,7 +44,7 @@#include <asm/prom.h> #ifdef CONFIG_MIPS_ELF_APPENDED_DTB -const char __section(.appended_dtb) __appended_dtb[0x100000]; +const char __section(".appended_dtb") __appended_dtb[0x100000];#endif /* CONFIG_MIPS_ELF_APPENDED_DTB */ struct cpuinfo_mips cpu_data[NR_CPUS ]__read_mostly ;
arch/mips/mm/init.c +1 -1
@@ -569,7 +569,7 @@ unsigned long pgd_current[NR_CPUS];* size, and waste space. So we place it in its own section and align * it in the linker script. */ -pgd_t swapper_pg_dir[PTRS_PER_PGD] __section(.bss..swapper_pg_dir); +pgd_t swapper_pg_dir[PTRS_PER_PGD] __section(".bss..swapper_pg_dir");#ifndef __PAGETABLE_PUD_FOLDED pud_t invalid_pud_table[PTRS_PER_PUD] __page_aligned_bss;#endif
arch/parisc/include/asm/cache.h +1 -1
@@ -22,7 +22,7 @@#define ARCH_DMA_MINALIGN L1_CACHE_BYTES -#define __read_mostly __section(.data..read_mostly) +#define __read_mostly __section(".data..read_mostly")void parisc_cache_init (void );/* initializes cache-flushing */ void disable_sr_hashing_asm (int );/* low level support for above */
arch/parisc/include/asm/ldcw.h +1 -1
@@ -52,7 +52,7 @@ })#ifdef CONFIG_SMP -# define __lock_aligned __section(.data..lock_aligned) +# define __lock_aligned __section(".data..lock_aligned")#endif #endif /* __PARISC_LDCW_H */
arch/parisc/kernel/ftrace.c +1 -1
@@ -21,7 +21,7 @@#include <asm/ftrace.h> #include <asm/patch.h> -#define __hot __attribute__ ((__section__ (".text.hot"))) +#define __hot __section(".text.hot")#ifdef CONFIG_FUNCTION_GRAPH_TRACER /*
arch/parisc/mm/init.c +3 -3
@@ -42,11 +42,11 @@ extern void parisc_kernel_start(void); /* Kernel entry point in head.S */* guarantee that global objects will be laid out in memory in the same order * as the order of declaration, so put these in different sections and use * the linker script to order them. */ -pmd_t pmd0[PTRS_PER_PMD] __attribute__ ((__section__ (".data..vm0.pmd"), aligned(PAGE_SIZE))); +pmd_t pmd0[PTRS_PER_PMD] __section(".data..vm0.pmd") __attribute__ ((aligned(PAGE_SIZE)));#endif -pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__ ((__section__ (".data..vm0.pgd"), aligned(PAGE_SIZE))); -pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __attribute__ ((__section__ (".data..vm0.pte"), aligned(PAGE_SIZE))); +pgd_t swapper_pg_dir[PTRS_PER_PGD] __section(".data..vm0.pgd") __attribute__ ((aligned(PAGE_SIZE))); +pte_t pg0[PT_INITIAL * PTRS_PER_PTE] __section(".data..vm0.pte") __attribute__ ((aligned(PAGE_SIZE)));static struct resource data_resource = { .name ="Kernel data" ,
arch/powerpc/boot/main.c +1 -1
@@ -191,7 +191,7 @@ static inline void prep_esm_blob(struct addr_range vmlinux, void *chosen) { }* The buffer is put in it's own section so that tools may locate it easier. */ static char cmdline[BOOT_COMMAND_LINE_SIZE] - __attribute__((__section__("__builtin_cmdline"))); +__section ("__builtin_cmdline" );static void prep_cmdline (void *chosen) {
arch/powerpc/boot/ps3.c +1 -1
@@ -36,7 +36,7 @@ BSS_STACK(4096);*/ static char cmdline[BOOT_COMMAND_LINE_SIZE] - __attribute__((__section__("__builtin_cmdline"))); +__section ("__builtin_cmdline" );static void prep_cmdline (void *chosen) {
arch/powerpc/include/asm/cache.h +1 -1
@@ -97,7 +97,7 @@ static inline u32 l1_icache_bytes(void)#endif -#define __read_mostly __section(.data..read_mostly) +#define __read_mostly __section(".data..read_mostly")#ifdef CONFIG_PPC_BOOK3S_32 extern long _get_L2CR (void );
arch/powerpc/include/asm/machdep.h +1 -1
@@ -232,7 +232,7 @@ extern void book3e_idle(void);extern struct machdep_calls ppc_md;extern struct machdep_calls *machine_id; -#define __machine_desc __attribute__ ((__section__ (".machine.desc"))) +#define __machine_desc __section(".machine.desc")#define define_machine (name) \ extern struct machdep_calls mach_##name; \
arch/powerpc/kernel/btext.c +1 -1
@@ -26,7 +26,7 @@static void scrollscreen (void );#endif -#define __force_data __section(.data) +#define __force_data __section(".data") static int g_loc_X __force_data; static int g_loc_Y __force_data;
arch/powerpc/kernel/prom_init.c +1 -1
@@ -45,7 +45,7 @@#include <linux/linux_logo.h> /* All of prom_init bss lives here */ -#define __prombss __section(.bss.prominit) +#define __prombss __section(".bss.prominit")/* * Eventually bump that one up
arch/powerpc/kvm/book3s_64_vio_hv.c +1 -1
@@ -32,7 +32,7 @@#ifdef CONFIG_BUG #define WARN_ON_ONCE_RM (condition) ({ \ - static bool __section(.data.unlikely) __warned; \ + static bool __section(".data.unlikely") __warned; \ int __ret_warn_once = !!(condition); \ \ if (unlikely(__ret_warn_once && !__warned)) { \
arch/riscv/include/asm/soc.h +2 -2
@@ -13,7 +13,7 @@#define SOC_EARLY_INIT_DECLARE (name, compat, fn) \ static const struct of_device_id __soc_early_init__##name \ - __used __section(__soc_early_init_table) \ + __used __section("__soc_early_init_table") \ = { .compatible = compat, .data = fn }void soc_early_init (void );
@@ -46,7 +46,7 @@ struct soc_builtin_dtb { } \ \ static const struct soc_builtin_dtb __soc_builtin_dtb__##name \ - __used __section(__soc_builtin_dtb_table) = \ + __used __section("__soc_builtin_dtb_table") = \ { \ .vendor_id = vendor, \ .arch_id = arch, \
arch/riscv/kernel/cpu_ops.c +2 -2
@@ -15,8 +15,8 @@const struct cpu_operations *cpu_ops[NR_CPUS ]__ro_after_init ; -void *__cpu_up_stack_pointer[NR_CPUS] __section(.data); -void *__cpu_up_task_pointer[NR_CPUS] __section(.data); +void *__cpu_up_stack_pointer[NR_CPUS] __section(".data"); +void *__cpu_up_task_pointer[NR_CPUS] __section(".data");extern const struct cpu_operations cpu_ops_sbi;extern const struct cpu_operations cpu_ops_spinwait;
arch/riscv/kernel/setup.c +1 -1
@@ -44,7 +44,7 @@ struct screen_info screen_info = {* This is used before the kernel initializes the BSS so it can't be in the * BSS. */ -atomic_t hart_lottery __section(.sdata); +atomic_t hart_lottery __section(".sdata");unsigned long boot_cpu_hartid; static DEFINE_PER_CPU(struct cpu, cpu_devices);
arch/s390/boot/startup.c +1 -1
@@ -46,7 +46,7 @@ struct diag_ops __bootdata_preserved(diag_dma_ops) = { .diag0c = _diag0c_dma, .diag308_reset = _diag308_reset_dma }; -static struct diag210 _diag210_tmp_dma __section(.dma.data); +static struct diag210 _diag210_tmp_dma __section(".dma.data");struct diag210 *__bootdata_preserved (__diag210_tmp_dma ) = &_diag210_tmp_dma;void error (char *x)
arch/s390/include/asm/cache.h +1 -1
@@ -14,6 +14,6 @@#define L1_CACHE_SHIFT 8#define NET_SKB_PAD 32 -#define __read_mostly __section(.data..read_mostly) +#define __read_mostly __section(".data..read_mostly")#endif
arch/s390/include/asm/sections.h +2 -2
@@ -26,14 +26,14 @@ static inline int arch_is_kernel_initmem_freed(unsigned long addr)* final .boot.data section, which should be identical in the decompressor and * the decompressed kernel (that is checked during the build). */ -#define __bootdata (var) __section(.boot.data.var) var +#define __bootdata (var) __section(".boot.data.var") var/* * .boot.preserved.data is similar to .boot.data, but it is not part of the * .init section and thus will be preserved for later use in the decompressed * kernel. */ -#define __bootdata_preserved (var) __section(.boot.preserved.data.var) var +#define __bootdata_preserved (var) __section(".boot.preserved.data.var") varextern unsigned long __sdma, __edma;extern unsigned long __stext_dma, __etext_dma;
arch/s390/mm/init.c +1 -1
@@ -47,7 +47,7 @@#include <asm/dma-mapping.h> #include <asm/uv.h> -pgd_t swapper_pg_dir[PTRS_PER_PGD] __section(.bss..swapper_pg_dir); +pgd_t swapper_pg_dir[PTRS_PER_PGD] __section(".bss..swapper_pg_dir");unsigned long empty_zero_page, zero_page_mask;EXPORT_SYMBOL (empty_zero_page);
arch/sh/boards/of-generic.c +1 -1
@@ -49,7 +49,7 @@ static struct plat_smp_ops dummy_smp_ops = {extern const struct of_cpu_method __cpu_method_of_table[]; const struct of_cpu_method __cpu_method_of_table_sentinel -__section (__cpu_method_of_table_end); +__section ("__cpu_method_of_table_end" );static void sh_of_smp_probe (void ) {
arch/sh/include/asm/cache.h +1 -1
@@ -14,7 +14,7 @@#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(".data..read_mostly")#ifndef __ASSEMBLY__ struct cache_info {
arch/sh/include/asm/machvec.h +1 -1
@@ -36,6 +36,6 @@ extern struct sh_machine_vector sh_mv;#define get_system_type () sh_mv.mv_name#define __initmv \ - __used __section(.machvec.init) + __used __section(".machvec.init")#endif /* _ASM_SH_MACHVEC_H */
arch/sh/include/asm/smp.h +1 -1
@@ -71,7 +71,7 @@ struct of_cpu_method {#define CPU_METHOD_OF_DECLARE (name, _method, _ops) \ static const struct of_cpu_method __cpu_method_of_table_##name \ - __used __section(__cpu_method_of_table) \ + __used __section("__cpu_method_of_table") \ = { .method = _method, .ops = _ops }#else
arch/sparc/include/asm/cache.h +1 -1
@@ -21,6 +21,6 @@#define SMP_CACHE_BYTES (1 << SMP_CACHE_BYTES_SHIFT) -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(".data..read_mostly")#endif /* !(_SPARC_CACHE_H) */
arch/sparc/kernel/btext.c +1 -1
@@ -24,7 +24,7 @@ static void draw_byte_32(unsigned char *bits, unsigned int *base, int rb);static void draw_byte_16 (unsigned char *bits,unsigned int *base,int rb);static void draw_byte_8 (unsigned char *bits,unsigned int *base,int rb); -#define __force_data __attribute__((__section__(".data"))) +#define __force_data __section(".data") static int g_loc_X __force_data; static int g_loc_Y __force_data;
arch/um/include/shared/init.h +11 -11
@@ -45,15 +45,15 @@ typedef void (*exitcall_t)(void);/* These are for everybody (although not all archs will actually discard it in modules) */ -#define __init __section(.init.text) -#define __initdata __section(.init.data) -#define __exitdata __section(.exit.data) -#define __exit_call __used __section(.exitcall.exit) +#define __init __section(".init.text") +#define __initdata __section(".init.data") +#define __exitdata __section(".exit.data") +#define __exit_call __used __section(".exitcall.exit")#ifdef MODULE -#define __exit __section(.exit.text) +#define __exit __section(".exit.text")#else -#define __exit __used __section(.exit.text) +#define __exit __used __section(".exit.text")#endif #endif
@@ -102,10 +102,10 @@ extern struct uml_param __uml_setup_start, __uml_setup_end;* Mark functions and data as being only used at initialization * or exit time. */ -#define __uml_init_setup __used __section(.uml.setup.init) -#define __uml_setup_help __used __section(.uml.help.init) -#define __uml_postsetup_call __used __section(.uml.postsetup.init) -#define __uml_exit_call __used __section(.uml.exitcall.exit) +#define __uml_init_setup __used __section(".uml.setup.init") +#define __uml_setup_help __used __section(".uml.help.init") +#define __uml_postsetup_call __used __section(".uml.postsetup.init") +#define __uml_exit_call __used __section(".uml.exitcall.exit")#ifdef __UM_HOST__
@@ -120,7 +120,7 @@ extern struct uml_param __uml_setup_start, __uml_setup_end;#define __exitcall (fn) static exitcall_t __exitcall_##fn __exit_call = fn -#define __init_call __used __section(.initcall.init) +#define __init_call __used __section(".initcall.init")#endif
arch/um/kernel/skas/clone.c +1 -1
@@ -21,7 +21,7 @@* on some systems. */ -void __attribute__ ((__section__ (".__syscall_stub" ))) +void __section(".__syscall_stub")stub_clone_handler (void) {struct stub_data *data = (struct stub_data *)STUB_DATA ;
arch/um/kernel/um_arch.c +1 -1
@@ -52,7 +52,7 @@ struct cpuinfo_um boot_cpu_data = { }; union thread_union cpu0_irqstack - __attribute__((__section__(".data..init_irqstack"))) = +__section (".data..init_irqstack" ) = { .thread_info = INIT_THREAD_INFO(init_task) };/* Changed in setup_arch, which is called in early boot */
arch/x86/boot/compressed/pgtable_64.c +1 -1
@@ -32,7 +32,7 @@ static char trampoline_save[TRAMPOLINE_32BIT_SIZE];* Avoid putting the pointer into .bss as it will be cleared between * paging_prepare() and extract_kernel(). */ -unsigned long *trampoline_32bit __section(.data); +unsigned long *trampoline_32bit __section(".data");extern struct boot_params *boot_params;int cmdline_find_option_bool (const char *option);
arch/x86/boot/tty.c +4 -4
@@ -25,7 +25,7 @@ int early_serial_base;* error during initialization. */ -static void __attribute__((section (".inittext" )))serial_putchar (int ch) +static void __section(".inittext") serial_putchar(int ch) { unsigned timeout = 0xffff;
@@ -35,7 +35,7 @@ static void __attribute__((section(".inittext"))) serial_putchar(int ch)outb (ch, early_serial_base +TXR ); } -static void __attribute__((section (".inittext" )))bios_putchar (int ch) +static void __section(".inittext") bios_putchar(int ch) {struct biosregs ireg;
@@ -47,7 +47,7 @@ static void __attribute__((section(".inittext"))) bios_putchar(int ch)intcall (0x10 , &ireg,NULL ); } -void __attribute__((section (".inittext" )))putchar (int ch) +void __section(".inittext") putchar(int ch) {if (ch =='\n' )putchar ('\r' );/* \n -> \r\n */
@@ -58,7 +58,7 @@ void __attribute__((section(".inittext"))) putchar(int ch)serial_putchar (ch); } -void __attribute__((section (".inittext" )))puts (const char *str) +void __section(".inittext") puts(const char *str) {while (*str)putchar (*str++);
arch/x86/boot/video.h +1 -1
@@ -78,7 +78,7 @@ struct card_info {u16 xmode_n;/* Size of unprobed mode range */ }; -#define __videocard struct card_info __attribute__((used,section(".videocards"))) +#define __videocard struct card_info __section(".videocards") __attribute__((used))extern struct card_info video_cards[], video_cards_end[];int mode_defined (u16 mode);/* video.c */
arch/x86/include/asm/apic.h +2 -2
@@ -374,12 +374,12 @@ extern struct apic *apic;#define apic_driver (sym) \ static const struct apic *__apicdrivers_##sym __used \ __aligned(sizeof(struct apic *)) \ - __section(.apicdrivers) = { &sym } + __section(".apicdrivers") = { &sym }#define apic_drivers (sym1, sym2) \ static struct apic *__apicdrivers_##sym1##sym2[2] __used \ __aligned(sizeof(struct apic *)) \ - __section(.apicdrivers) = { &sym1, &sym2 } + __section(".apicdrivers") = { &sym1, &sym2 }extern struct apic *__apicdrivers[], *__apicdrivers_end[];
arch/x86/include/asm/cache.h +1 -1
@@ -8,7 +8,7 @@#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) -#define __read_mostly __attribute__((__section__(".data..read_mostly"))) +#define __read_mostly __section(".data..read_mostly")#define INTERNODE_CACHE_SHIFT CONFIG_X86_INTERNODE_CACHE_SHIFT#define INTERNODE_CACHE_BYTES (1 << INTERNODE_CACHE_SHIFT)
arch/x86/include/asm/intel-mid.h +1 -1
@@ -43,7 +43,7 @@ struct devs_id {#define sfi_device (i) \ static const struct devs_id *const __intel_mid_sfi_##i##_dev __used \ - __attribute__((__section__(".x86_intel_mid_dev.init"))) = &i + __section(".x86_intel_mid_dev.init") = &i/** * struct mid_sd_board_info - template for SD device creation
arch/x86/include/asm/irqflags.h +1 -1
@@ -9,7 +9,7 @@#include <asm/nospec-branch.h> /* Provide __cpuidle; we can't safely include <linux/cpu.h> */ -#define __cpuidle __attribute__((__section__(".cpuidle.text"))) +#define __cpuidle __section(".cpuidle.text")/* * Interrupt control:
arch/x86/include/asm/mem_encrypt.h +1 -1
@@ -54,7 +54,7 @@ bool sme_active(void);bool sev_active (void );bool sev_es_active (void ); -#define __bss_decrypted __attribute__((__section__(".bss..decrypted"))) +#define __bss_decrypted __section(".bss..decrypted")#else /* !CONFIG_AMD_MEM_ENCRYPT */
arch/x86/include/asm/setup.h +1 -1
@@ -119,7 +119,7 @@ void *extend_brk(size_t size, size_t align);* executable.) */ #define RESERVE_BRK (name,sz) \ - static void __section(.discard.text) __used notrace \ + static void __section(".discard.text") __used notrace \ __brk_reservation_fn_##name##__(void) { \ asm volatile ( \ ".pushsection .brk_reservation,\"aw\",@nobits;" \
arch/x86/kernel/cpu/cpu.h +1 -1
@@ -38,7 +38,7 @@ struct _tlb_table {#define cpu_dev_register (cpu_devX) \ static const struct cpu_dev *const __cpu_dev_##cpu_devX __used \ - __attribute__((__section__(".x86_cpu_dev.init"))) = \ + __section(".x86_cpu_dev.init") = \ &cpu_devX; extern const struct cpu_dev *const __x86_cpu_dev_start[],
arch/x86/kernel/head64.c +1 -1
@@ -84,7 +84,7 @@ static struct desc_ptr startup_gdt_descr = { .address = 0, }; -#define __head __section(.head.text) +#define __head __section(".head.text") static void __head *fixup_pointer(void *ptr, unsigned long physaddr) {
arch/x86/mm/mem_encrypt.c +3 -3
@@ -37,13 +37,13 @@* reside in the .data section so as not to be zeroed out when the .bss * section is later cleared. */ -u64 sme_me_mask __section(.data) = 0; -u64 sev_status __section(.data) = 0; +u64 sme_me_mask __section(".data") = 0; +u64 sev_status __section(".data") = 0;EXPORT_SYMBOL (sme_me_mask);DEFINE_STATIC_KEY_FALSE (sev_enable_key);EXPORT_SYMBOL_GPL (sev_enable_key); -bool sev_enabled __section(.data); +bool sev_enabled __section(".data");/* Buffer used for early in-place encryption by BSP, no locking needed */ static char sme_early_buffer[PAGE_SIZE ]__initdata __aligned(PAGE_SIZE) ;
arch/x86/mm/mem_encrypt_identity.c +1 -1
@@ -81,7 +81,7 @@ struct sme_populate_pgd_data {* section is 2MB aligned to allow for simple pagetable setup using only * PMD entries (see vmlinux.lds.S). */ -static char sme_workarea[2 * PMD_PAGE_SIZE] __section(.init.scratch); +static char sme_workarea[2 * PMD_PAGE_SIZE] __section(".init.scratch");static char sme_cmdline_arg[]__initdata ="mem_encrypt" ;static char sme_cmdline_on[]__initdata ="on" ;
arch/x86/platform/pvh/enlighten.c +2 -2
@@ -19,8 +19,8 @@* pvh_bootparams and pvh_start_info need to live in the data segment since * they are used after startup_{32|64}, which clear .bss, are invoked. */ -struct boot_params pvh_bootparams __attribute__((section(".data"))); -struct hvm_start_info pvh_start_info __attribute__((section(".data"))); +struct boot_params pvh_bootparams __section(".data"); +struct hvm_start_info pvh_start_info __section(".data");unsigned int pvh_start_info_sz =sizeof (pvh_start_info);
arch/x86/purgatory/purgatory.c +2 -2
@@ -14,9 +14,9 @@#include "../boot/string.h" -u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(.kexec-purgatory); +u8 purgatory_sha256_digest[SHA256_DIGEST_SIZE] __section(".kexec-purgatory"); -struct kexec_sha_region purgatory_sha_regions[KEXEC_SEGMENT_MAX] __section(.kexec-purgatory); +struct kexec_sha_region purgatory_sha_regions[KEXEC_SEGMENT_MAX] __section(".kexec-purgatory");static int verify_sha256_digest (void ) {
arch/x86/um/stub_segv.c +1 -1
@@ -8,7 +8,7 @@#include <sysdep/mcontext.h> #include <sys/ucontext.h> -void __attribute__ ((__section__ (".__syscall_stub" ))) +void __section(".__syscall_stub") stub_segv_handler(int sig, siginfo_t *info, void *p) { ucontext_t *uc = p;
arch/x86/xen/enlighten.c +1 -1
@@ -71,7 +71,7 @@ EXPORT_SYMBOL_GPL(xen_have_vector_callback);* NB: needs to live in .data because it's used by xen_prepare_pvh which runs * before clearing the bss. */ -uint32_t xen_start_flags __attribute__((section(".data"))) = 0; +uint32_t xen_start_flags __section(".data") = 0;EXPORT_SYMBOL (xen_start_flags);/*
arch/x86/xen/enlighten_pvh.c +1 -1
@@ -21,7 +21,7 @@* The variable xen_pvh needs to live in the data segment since it is used * after startup_{32|64} is invoked, which will clear the .bss segment. */ -bool xen_pvh __attribute__((section(".data"))) = 0; +bool xen_pvh __section(".data") = 0;void __init xen_pvh_init (struct boot_params *boot_params) {
arch/xtensa/kernel/setup.c +1 -1
@@ -93,7 +93,7 @@ typedef struct tagtable { } tagtable_t;#define __tagtable (tag, fn) static tagtable_t __tagtable_##fn \ - __attribute__((used, section(".taglist"))) = { tag, fn } + __section(".taglist") __attribute__((used)) = { tag, fn }/* parse current tag */
drivers/clk/clk.c +1 -1
@@ -4363,7 +4363,7 @@ struct of_clk_provider {extern struct of_device_id __clk_of_table; static const struct of_device_id __clk_of_table_sentinel -__used __section (__clk_of_table_end); +__used __section ("__clk_of_table_end" );static LIST_HEAD (of_clk_providers);static DEFINE_MUTEX (of_clk_mutex);
drivers/clocksource/timer-probe.c +1 -1
@@ -11,7 +11,7 @@extern struct of_device_id __timer_of_table[]; static const struct of_device_id __timer_of_table_sentinel -__used __section (__timer_of_table_end); +__used __section ("__timer_of_table_end" );void __init timer_probe (void ) {
drivers/irqchip/irqchip.c +1 -1
@@ -22,7 +22,7 @@* special section. */ static const struct of_device_id -irqchip_of_match_end __used __section(__irqchip_of_table_end); +irqchip_of_match_end __used __section("__irqchip_of_table_end");extern struct of_device_id __irqchip_of_table[];
drivers/of/of_reserved_mem.c +1 -1
@@ -162,7 +162,7 @@ static int __init __reserved_mem_alloc_size(unsigned long node, } static const struct of_device_id __rmem_of_table_sentinel -__used __section (__reservedmem_of_table_end); +__used __section ("__reservedmem_of_table_end" );/** * __reserved_mem_init_node() - call region specific reserved memory init code
drivers/thermal/thermal_core.h +1 -1
@@ -34,7 +34,7 @@ extern struct thermal_governor *__governor_thermal_table_end[];#define THERMAL_TABLE_ENTRY (table, name) \ static typeof(name) *__thermal_table_entry_##name \ - __used __section(__##table##_thermal_table) = &name + __used __section("__" #table "_thermal_table") = &name#define THERMAL_GOVERNOR_DECLARE (name) THERMAL_TABLE_ENTRY(governor, name)
fs/xfs/xfs_message.h +1 -1
@@ -42,7 +42,7 @@ do { \#define xfs_printk_once (func, dev, fmt, ...) \ ({ \ - static bool __section(.data.once) __print_once; \ + static bool __section(".data.once") __print_once; \ bool __ret_print_once = !__print_once; \ \ if (!__print_once) { \
include/asm-generic/bug.h +3 -3
@@ -141,7 +141,7 @@ void __warn(const char *file, int line, void *caller, unsigned taint,#ifndef WARN_ON_ONCE #define WARN_ON_ONCE (condition) ({ \ - static bool __section(.data.once) __warned; \ + static bool __section(".data.once") __warned; \ int __ret_warn_once = !!(condition); \ \ if (unlikely(__ret_warn_once && !__warned)) { \
@@ -153,7 +153,7 @@ void __warn(const char *file, int line, void *caller, unsigned taint,#endif #define WARN_ONCE(condition, format...) ({ \ - static bool __section(.data.once) __warned; \ + static bool __section(".data.once") __warned; \ int __ret_warn_once = !!(condition); \ \ if (unlikely(__ret_warn_once && !__warned)) { \
@@ -164,7 +164,7 @@ void __warn(const char *file, int line, void *caller, unsigned taint, }) #define WARN_TAINT_ONCE(condition, taint, format...) ({ \ - static bool __section(.data.once) __warned; \ + static bool __section(".data.once") __warned; \ int __ret_warn_once = !!(condition); \ \ if (unlikely(__ret_warn_once && !__warned)) { \
include/asm-generic/error-injection.h +1 -1
@@ -25,7 +25,7 @@ struct pt_regs;*/ #define ALLOW_ERROR_INJECTION (fname, _etype) \ static struct error_injection_entry __used \ - __attribute__((__section__("_error_injection_whitelist"))) \ + __section("_error_injection_whitelist") \ _eil_addr_##fname = { \ .addr = (unsigned long)fname, \ .etype = EI_ETYPE_##_etype, \
include/asm-generic/kprobes.h +2 -2
@@ -10,11 +10,11 @@*/ # define __NOKPROBE_SYMBOL (fname) \ static unsigned long __used \ - __attribute__((__section__("_kprobe_blacklist"))) \ + __section("_kprobe_blacklist") \ _kbl_addr_##fname = (unsigned long)fname;# define NOKPROBE_SYMBOL (fname) __NOKPROBE_SYMBOL(fname)/* Use this to forbid a kprobes attach on very low level functions */ -# define __kprobes __attribute__((__section__(".kprobes.text"))) +# define __kprobes __section(".kprobes.text")# define nokprobe_inline __always_inline#else # define NOKPROBE_SYMBOL (fname)
include/linux/acpi.h +2 -2
@@ -1152,7 +1152,7 @@ struct acpi_probe_entry {#define ACPI_DECLARE_PROBE_ENTRY (table, name, table_id, subtable, \ valid, data, fn) \ static const struct acpi_probe_entry __acpi_probe_##name \ - __used __section(__##table##_acpi_probe_table) = { \ + __used __section("__" #table "_acpi_probe_table") = { \ .id = table_id, \ .type = subtable, \ .subtable_valid = valid, \
@@ -1163,7 +1163,7 @@ struct acpi_probe_entry {#define ACPI_DECLARE_SUBTABLE_PROBE_ENTRY (table, name, table_id, \ subtable, valid, data, fn) \ static const struct acpi_probe_entry __acpi_probe_##name \ - __used __section(__##table##_acpi_probe_table) = { \ + __used __section("__" #table "_acpi_probe_table") = { \ .id = table_id, \ .type = subtable, \ .subtable_valid = valid, \
include/linux/cache.h +1 -1
@@ -34,7 +34,7 @@* but may get written to during init, so can't live in .rodata (via "const"). */ #ifndef __ro_after_init -#define __ro_after_init __attribute__((__section__(".data..ro_after_init"))) +#define __ro_after_init __section(".data..ro_after_init")#endif #ifndef ____cacheline_aligned
include/linux/compiler.h +4 -4
@@ -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 ()
@@ -206,7 +206,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,* visible to the compiler. */ #define __ADDRESSABLE (sym) \ - static void * __section(.discard.addressable) __used \ + static void * __section(".discard.addressable") __used \ __UNIQUE_ID(__PASTE(__addressable_,sym)) = (void *)&sym;/**
include/linux/compiler_attributes.h +1 -1
@@ -254,7 +254,7 @@* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-section-variable-attribute * clang: https://clang.llvm.org/docs/AttributeReference.html#section-declspec-allocate */ -#define __section (S ) __attribute__((__section__(#S))) +#define __section (section) __attribute__((__section__(section)))/* * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-unused-function-attribute
include/linux/cpu.h +1 -1
@@ -173,7 +173,7 @@ void cpu_startup_entry(enum cpuhp_state state);void cpu_idle_poll_ctrl (bool enable);/* Attach to any functions which should be considered cpuidle. */ -#define __cpuidle __attribute__((__section__(".cpuidle.text"))) +#define __cpuidle __section(".cpuidle.text")bool cpu_in_idle (unsigned long pc);
include/linux/dynamic_debug.h +1 -1
@@ -84,7 +84,7 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor,#define DEFINE_DYNAMIC_DEBUG_METADATA (name, fmt) \ static struct _ddebug __aligned(8) \ - __section(__dyndbg) name = { \ + __section("__dyndbg") name = { \ .modname = KBUILD_MODNAME, \ .function = __func__, \ .filename = __FILE__, \
include/linux/export.h +1 -1
@@ -130,7 +130,7 @@ struct kernel_symbol {* discarded in the final link stage. */ #define __ksym_marker (sym) \ - static int __ksym_marker_##sym[0] __section(.discard.ksym) __used + static int __ksym_marker_##sym[0] __section(".discard.ksym") __used#define __EXPORT_SYMBOL (sym, sec, ns) \ __ksym_marker(sym); \
include/linux/firmware.h +1 -1
@@ -36,7 +36,7 @@ struct builtin_fw {#define DECLARE_BUILTIN_FIRMWARE_SIZE (name, blob, size) \ static const struct builtin_fw __fw_concat(__builtin_fw,__COUNTER__) \ - __used __section(.builtin_fw) = { name, blob, size } + __used __section(".builtin_fw") = { name, blob, size }#if defined(CONFIG_FW_LOADER ) || (defined(CONFIG_FW_LOADER_MODULE ) && defined(MODULE )) int request_firmware(const struct firmware **fw, const char *name,
include/linux/init.h +17 -17
@@ -47,11 +47,11 @@/* These are for everybody (although not all archs will actually discard it in modules) */ -#define __init __section(.init.text) __cold __latent_entropy __noinitretpoline -#define __initdata __section(.init.data) -#define __initconst __section(.init.rodata) -#define __exitdata __section(.exit.data) -#define __exit_call __used __section(.exitcall.exit) +#define __init __section(".init.text") __cold __latent_entropy __noinitretpoline +#define __initdata __section(".init.data") +#define __initconst __section(".init.rodata") +#define __exitdata __section(".exit.data") +#define __exit_call __used __section(".exitcall.exit")/* * modpost check for section mismatches during the kernel build.
@@ -70,9 +70,9 @@* * The markers follow same syntax rules as __init / __initdata. */ -#define __ref __section(.ref.text) noinline -#define __refdata __section(.ref.data) -#define __refconst __section(.ref.rodata) +#define __ref __section(".ref.text") noinline +#define __refdata __section(".ref.data") +#define __refconst __section(".ref.rodata")#ifdef MODULE #define __exitused
@@ -80,16 +80,16 @@#define __exitused __used#endif -#define __exit __section(.exit.text) __exitused __cold notrace +#define __exit __section(".exit.text") __exitused __cold notrace/* Used for MEMORY_HOTPLUG */ -#define __meminit __section(.meminit.text) __cold notrace \ +#define __meminit __section(".meminit.text") __cold notrace \ __latent_entropy -#define __meminitdata __section(.meminit.data) -#define __meminitconst __section(.meminit.rodata) -#define __memexit __section(.memexit.text) __exitused __cold notrace -#define __memexitdata __section(.memexit.data) -#define __memexitconst __section(.memexit.rodata) +#define __meminitdata __section(".meminit.data") +#define __meminitconst __section(".meminit.rodata") +#define __memexit __section(".memexit.text") __exitused __cold notrace +#define __memexitdata __section(".memexit.data") +#define __memexitconst __section(".memexit.rodata")/* For assembly routines */ #define __HEAD .section ".head.text","ax"
@@ -254,7 +254,7 @@ struct obs_kernel_param { static const char __setup_str_##unique_id[] __initconst \ __aligned(1) = str; \ static struct obs_kernel_param __setup_##unique_id \ - __used __section(.init.setup) \ + __used __section(".init.setup") \ __attribute__((aligned((sizeof(long))))) \ = { __setup_str_##unique_id, fn, early }
@@ -298,7 +298,7 @@ void __init parse_early_options(char *cmdline);#endif /* Data marked not to be saved by software suspend */ -#define __nosavedata __section(.data..nosave) +#define __nosavedata __section(".data..nosave")#ifdef MODULE #define __exit_p (x) x
include/linux/init_task.h +2 -2
@@ -40,12 +40,12 @@ extern struct cred init_cred;/* Attach to the init_task data structure for proper alignment */ #ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK -#define __init_task_data __attribute__((__section__(".data..init_task"))) +#define __init_task_data __section(".data..init_task")#else #define __init_task_data/**/ #endif /* Attach to the thread_info data structure for proper alignment */ -#define __init_thread_info __attribute__((__section__(".data..init_thread_info"))) +#define __init_thread_info __section(".data..init_thread_info")#endif
include/linux/interrupt.h +2 -2
@@ -792,9 +792,9 @@ extern int arch_early_irq_init(void);* We want to know which function is an entrypoint of a hardirq or a softirq. */ #ifndef __irq_entry -# define __irq_entry __attribute__((__section__(".irqentry.text"))) +# define __irq_entry __section(".irqentry.text")#endif -#define __softirq_entry __attribute__((__section__(".softirqentry.text"))) +#define __softirq_entry __section(".softirqentry.text")#endif
include/linux/kernel.h +3 -3
@@ -730,7 +730,7 @@ do { \ #define do_trace_printk(fmt, args...) \ do { \ static const char *trace_printk_fmt __used \ - __attribute__((section("__trace_printk_fmt"))) = \ + __section("__trace_printk_fmt") = \ __builtin_constant_p(fmt) ? fmt : NULL; \ \ __trace_printk_check_format(fmt, ##args); \
@@ -774,7 +774,7 @@ int __trace_printk(unsigned long ip, const char *fmt, ...);#define trace_puts (str) ({ \ static const char *trace_printk_fmt __used \ - __attribute__((section("__trace_printk_fmt"))) = \ + __section("__trace_printk_fmt") = \ __builtin_constant_p(str) ? str : NULL; \ \ if (__builtin_constant_p(str)) \
@@ -796,7 +796,7 @@ extern void trace_dump_stack(int skip); do { \ if (__builtin_constant_p(fmt)) { \ static const char *trace_printk_fmt __used \ - __attribute__((section("__trace_printk_fmt"))) = \ + __section("__trace_printk_fmt") = \ __builtin_constant_p(fmt) ? fmt : NULL; \ \ __ftrace_vbprintk(_THIS_IP_, trace_printk_fmt, vargs); \
include/linux/linkage.h +2 -2
@@ -36,8 +36,8 @@ __stringify(name))#endif -#define __page_aligned_data __section(.data..page_aligned) __aligned(PAGE_SIZE) -#define __page_aligned_bss __section(.bss..page_aligned) __aligned(PAGE_SIZE) +#define __page_aligned_data __section(".data..page_aligned") __aligned(PAGE_SIZE) +#define __page_aligned_bss __section(".bss..page_aligned") __aligned(PAGE_SIZE)/* * For assembly routines.
include/linux/lsm_hooks.h +2 -2
@@ -1604,12 +1604,12 @@ extern struct lsm_info __start_early_lsm_info[], __end_early_lsm_info[];#define DEFINE_LSM (lsm) \ static struct lsm_info __lsm_##lsm \ - __used __section(.lsm_info.init) \ + __used __section(".lsm_info.init") \ __aligned(sizeof(unsigned long))#define DEFINE_EARLY_LSM (lsm) \ static struct lsm_info __early_lsm_##lsm \ - __used __section(.early_lsm_info.init) \ + __used __section(".early_lsm_info.init") \ __aligned(sizeof(unsigned long))#ifdef CONFIG_SECURITY_SELINUX_DISABLE
include/linux/module.h +1 -1
@@ -278,7 +278,7 @@ extern typeof(name) __mod_##type##__##name##_device_table \ .version = _version, \ }; \static const struct module_version_attribute \ - __used __attribute__ ((__section__ ("__modver"))) \ + __used __section("__modver") \ * __moduleparam_const __modver_attr = &___modver_attr#endif
include/linux/moduleparam.h +2 -2
@@ -22,7 +22,7 @@#define __MODULE_INFO (tag, name, info) \ static const char __UNIQUE_ID(name)[] \ - __used __attribute__((section(".modinfo"), unused, aligned(1))) \ + __used __section(".modinfo") __attribute__((unused, aligned(1))) \ = __MODULE_INFO_PREFIX __stringify(tag) "=" info#define __MODULE_PARM_TYPE (name, _type) \
@@ -289,7 +289,7 @@ struct kparam_array static const char __param_str_##name[] = prefix #name; \ static struct kernel_param __moduleparam_const __param_##name \ __used \ - __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \ + __section("__param") __attribute__ ((unused, aligned(sizeof(void *)))) \ = { __param_str_##name, THIS_MODULE, ops, \ VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } }
include/linux/mtd/xip.h +1 -1
@@ -28,7 +28,7 @@* those functions so they get relocated to ram. */ #ifdef CONFIG_XIP_KERNEL -#define __xipram noinline __attribute__ ((__section__ (".xiptext"))) +#define __xipram noinline __section(".xiptext")#endif /*
include/linux/objtool.h +1 -1
@@ -60,7 +60,7 @@ struct unwind_hint {* For more information, see tools/objtool/Documentation/stack-validation.txt. */ #define STACK_FRAME_NON_STANDARD (func) \ - static void __used __section(.discard.func_stack_frame_non_standard) \ + static void __used __section(".discard.func_stack_frame_non_standard") \ *__func_stack_frame_non_standard_##func = func#else /* __ASSEMBLY__ */
include/linux/of.h +1 -1
@@ -1299,7 +1299,7 @@ static inline int of_get_available_child_count(const struct device_node *np)#if defined(CONFIG_OF ) && !defined(MODULE )#define _OF_DECLARE (table, name, compat, fn, fn_type) \ static const struct of_device_id __of_table_##name \ - __used __section(__##table##_of_table) \ + __used __section("__" #table "_of_table") \ = { .compatible = compat, \ .data = (fn == (fn_type)NULL) ? fn : fn }#else
include/linux/percpu-defs.h +1 -1
@@ -51,7 +51,7 @@ PER_CPU_ATTRIBUTES#define __PCPU_DUMMY_ATTRS \ - __attribute__((section(".discard"), unused)) + __section(".discard") __attribute__((unused))/* * s390 and alpha modules require percpu variables to be defined as
include/linux/printk.h +2 -2
@@ -437,7 +437,7 @@ extern int kptr_restrict;#ifdef CONFIG_PRINTK #define printk_once (fmt, ...) \ ({ \ - static bool __section(.data.once) __print_once; \ + static bool __section(".data.once") __print_once; \ bool __ret_print_once = !__print_once; \ \ if (!__print_once) { \
@@ -448,7 +448,7 @@ extern int kptr_restrict; })#define printk_deferred_once (fmt, ...) \ ({ \ - static bool __section(.data.once) __print_once; \ + static bool __section(".data.once") __print_once; \ bool __ret_print_once = !__print_once; \ \ if (!__print_once) { \
include/linux/rcupdate.h +1 -1
@@ -300,7 +300,7 @@ static inline int rcu_read_lock_any_held(void)*/ #define RCU_LOCKDEP_WARN (c, s) \ do { \ - static bool __section(.data.unlikely) __warned; \ + static bool __section(".data.unlikely") __warned; \ if (debug_lockdep_rcu_enabled() && !__warned && (c)) { \ __warned = true; \ lockdep_rcu_suspicious(__FILE__, __LINE__, s); \
include/linux/sched/debug.h +1 -1
@@ -43,7 +43,7 @@ extern void proc_sched_set_task(struct task_struct *p);#endif /* Attach to any functions which should be ignored in wchan output. */ -#define __sched __attribute__((__section__(".sched.text"))) +#define __sched __section(".sched.text")/* Linker adds these: start and end of __sched functions */ extern char __sched_text_start[], __sched_text_end[];
include/linux/serial_core.h +1 -1
@@ -373,7 +373,7 @@ extern const struct earlycon_id *__earlycon_table_end[]; .compatible = compat, \ .setup = fn }; \ static const struct earlycon_id EARLYCON_USED_OR_UNUSED \ -__section (__earlycon_table) \ +__section ("__earlycon_table" ) \ * const __PASTE(__p, unique_id) = &unique_id#define OF_EARLYCON_DECLARE (_name, compat, fn) \
include/linux/spinlock.h +1 -1
@@ -76,7 +76,7 @@#define LOCK_SECTION_END \ ".previous\n\t" -#define __lockfunc __attribute__((section(".spinlock.text"))) +#define __lockfunc __section(".spinlock.text")/* * Pull the arch_spinlock_t and arch_rwlock_t definitions:
include/linux/syscalls.h +3 -3
@@ -144,7 +144,7 @@ extern struct trace_event_functions exit_syscall_print_funcs; .flags = TRACE_EVENT_FL_CAP_ANY, \ }; \ static struct trace_event_call __used \ - __attribute__((section("_ftrace_events"))) \ + __section("_ftrace_events") \ *__event_enter_##sname = &event_enter_##sname;#define SYSCALL_TRACE_EXIT_EVENT (sname) \
@@ -160,7 +160,7 @@ extern struct trace_event_functions exit_syscall_print_funcs; .flags = TRACE_EVENT_FL_CAP_ANY, \ }; \ static struct trace_event_call __used \ - __attribute__((section("_ftrace_events"))) \ + __section("_ftrace_events") \ *__event_exit_##sname = &event_exit_##sname;#define SYSCALL_METADATA (sname, nb, ...) \
@@ -184,7 +184,7 @@ extern struct trace_event_functions exit_syscall_print_funcs; .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ }; \ static struct syscall_metadata __used \ - __attribute__((section("__syscalls_metadata"))) \ + __section("__syscalls_metadata") \ *__p_syscall_meta_##sname = &__syscall_meta_##sname;static inline int is_syscall_trace_event (struct trace_event_call *tp_event)
include/linux/trace_events.h +1 -1
@@ -709,7 +709,7 @@ do { \tracing_record_cmdline (current); \if (__builtin_constant_p (fmt)) { \ static const char *trace_printk_fmt \ - __attribute__((section("__trace_printk_fmt"))) = \ +__section ("__trace_printk_fmt" ) = \__builtin_constant_p (fmt) ? fmt :NULL ; \ \ __trace_bprintk(ip, trace_printk_fmt, ##args); \
include/linux/tracepoint.h +4 -4
@@ -119,7 +119,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)#define __TRACEPOINT_ENTRY (name) \ static tracepoint_ptr_t __tracepoint_ptr_##name __used \ - __section(__tracepoints_ptrs) = &__tracepoint_##name + __section("__tracepoints_ptrs") = &__tracepoint_##name#endif #endif /* _LINUX_TRACEPOINT_H */
@@ -286,11 +286,11 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p)*/ #define DEFINE_TRACE_FN (_name, _reg, _unreg, proto, args) \ static const char __tpstrtab_##_name[] \ - __section(__tracepoints_strings) = #_name; \ + __section("__tracepoints_strings") = #_name; \ extern struct static_call_key STATIC_CALL_KEY(tp_func_##_name); \ int __traceiter_##_name(void *__data, proto); \ struct tracepoint __tracepoint_##_name __used \ - __section(__tracepoints) = { \ + __section("__tracepoints") = { \ .name = __tpstrtab_##_name, \ .key = STATIC_KEY_INIT_FALSE, \ .static_call_key = &STATIC_CALL_KEY(tp_func_##_name), \
@@ -396,7 +396,7 @@ static inline struct tracepoint *tracepoint_ptr_deref(tracepoint_ptr_t *p) static const char *___tp_str __tracepoint_string = str; \ ___tp_str; \ }) -#define __tracepoint_string __used __section(__tracepoint_str) +#define __tracepoint_string __used __section("__tracepoint_str")#else /* * tracepoint_string() is used to save the string address for userspace
include/trace/bpf_probe.h +1 -1
@@ -79,7 +79,7 @@ static union { \struct bpf_raw_event_map event; \ btf_trace_##call handler; \ } __bpf_trace_tp_map_##call __used \ -__attribute__((section("__bpf_raw_tp_map"))) = { \ +__section("__bpf_raw_tp_map") = { \ .event = { \ .tp = &__tracepoint_##call, \ .bpf_func = __bpf_trace_##template, \
include/trace/trace_events.h +5 -5
@@ -45,7 +45,7 @@ TRACE_MAKE_SYSTEM_STR(); .eval_value = a \ }; \ static struct trace_eval_map __used \ - __attribute__((section("_ftrace_eval_map"))) \ + __section("_ftrace_eval_map") \ *TRACE_SYSTEM##_##a = &__##TRACE_SYSTEM##_##a#undef TRACE_DEFINE_SIZEOF
@@ -58,7 +58,7 @@ TRACE_MAKE_SYSTEM_STR(); .eval_value = sizeof(a) \ }; \ static struct trace_eval_map __used \ - __attribute__((section("_ftrace_eval_map"))) \ + __section("_ftrace_eval_map") \ *TRACE_SYSTEM##_##a = &__##TRACE_SYSTEM##_##a/*
@@ -607,7 +607,7 @@ static inline notrace int trace_event_get_offsets_##call( \* // its only safe to use pointers when doing linker tricks to * // create an array. * static struct trace_event_call __used -* __attribute__((section("_ftrace_events"))) *__event_<call> = &event_<call>; +* __section("_ftrace_events") *__event_<call> = &event_<call>; * */
@@ -755,7 +755,7 @@ static struct trace_event_call __used event_##call = { \ .flags = TRACE_EVENT_FL_TRACEPOINT, \ }; \ static struct trace_event_call __used \ -__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call +__section("_ftrace_events") *__event_##call = &event_##call#undef DEFINE_EVENT_PRINT#define DEFINE_EVENT_PRINT (template, call, proto, args, print) \
@@ -772,6 +772,6 @@ static struct trace_event_call __used event_##call = { \ .flags = TRACE_EVENT_FL_TRACEPOINT, \ }; \ static struct trace_event_call __used \ -__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call +__section("_ftrace_events") *__event_##call = &event_##call#include TRACE_INCLUDE (TRACE_INCLUDE_FILE )
kernel/kallsyms.c +2 -2
@@ -40,10 +40,10 @@ extern const u8 kallsyms_names[] __weak;* has one (eg: FRV). */ extern const unsigned int kallsyms_num_syms -__attribute__((weak, section(".rodata"))); +__section(".rodata") __attribute__((weak));extern const unsigned long kallsyms_relative_base -__attribute__((weak, section(".rodata"))); +__section(".rodata") __attribute__((weak));extern const char kallsyms_token_table[]__weak ;extern const u16 kallsyms_token_index[]__weak ;
kernel/sched/deadline.c +1 -1
@@ -2480,7 +2480,7 @@ static void prio_changed_dl(struct rq *rq, struct task_struct *p, } const struct sched_class dl_sched_class - __attribute__((section("__dl_sched_class"))) = { + __section("__dl_sched_class") = { .enqueue_task = enqueue_task_dl, .dequeue_task = dequeue_task_dl, .yield_task = yield_task_dl,
kernel/sched/fair.c +1 -1
@@ -11143,7 +11143,7 @@ static unsigned int get_rr_interval_fair(struct rq *rq, struct task_struct *task* All the scheduling class methods: */ const struct sched_class fair_sched_class - __attribute__((section("__fair_sched_class"))) = { + __section("__fair_sched_class") = { .enqueue_task = enqueue_task_fair, .dequeue_task = dequeue_task_fair, .yield_task = yield_task_fair,
kernel/sched/idle.c +1 -1
@@ -458,7 +458,7 @@ static void update_curr_idle(struct rq *rq)* Simple, special scheduling class for the per-CPU idle tasks: */ const struct sched_class idle_sched_class - __attribute__((section("__idle_sched_class"))) = { + __section("__idle_sched_class") = {/* no enqueue/yield_task for idle tasks */ /* dequeue is not valid, we print a debug message there: */
kernel/sched/rt.c +1 -1
@@ -2430,7 +2430,7 @@ static unsigned int get_rr_interval_rt(struct rq *rq, struct task_struct *task) } const struct sched_class rt_sched_class - __attribute__((section("__rt_sched_class"))) = { + __section("__rt_sched_class") = { .enqueue_task = enqueue_task_rt, .dequeue_task = dequeue_task_rt, .yield_task = yield_task_rt,
kernel/sched/stop_task.c +1 -1
@@ -110,7 +110,7 @@ static void update_curr_stop(struct rq *rq)* Simple, special scheduling class for the per-CPU stop tasks: */ const struct sched_class stop_sched_class - __attribute__((section("__stop_sched_class"))) = { + __section("__stop_sched_class") = { .enqueue_task = enqueue_task_stop, .dequeue_task = dequeue_task_stop,
kernel/trace/trace.h +1 -1
@@ -98,7 +98,7 @@ enum trace_type {/* Use this for memory failure errors */ #define MEM_FAIL (condition, fmt, ...) ({ \ - static bool __section(.data.once) __warned; \ + static bool __section(".data.once") __warned; \ int __ret_warn_once = !!(condition); \ \ if (unlikely(__ret_warn_once && !__warned)) { \
kernel/trace/trace_export.c +1 -1
@@ -176,7 +176,7 @@ struct trace_event_call __used event_##call = { \ .flags = TRACE_EVENT_FL_IGNORE_ENABLE, \ }; \ static struct trace_event_call __used \ -__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call; +__section("_ftrace_events") *__event_##call = &event_##call;#undef FTRACE_ENTRY#define FTRACE_ENTRY (call, struct_name, etype, tstruct, print) \
scripts/mod/modpost.c +2 -2
@@ -2254,7 +2254,7 @@ static void add_header(struct buffer *b, struct module *mod)buf_printf (b,"MODULE_INFO(name, KBUILD_MODNAME);\n" );buf_printf (b,"\n" );buf_printf (b,"__visible struct module __this_module\n" ); -buf_printf (b,"__section(.gnu.linkonce.this_module) = {\n" ); +buf_printf (b,"__section(\".gnu.linkonce.this_module\") = {\n" );buf_printf (b,"\t.name = KBUILD_MODNAME,\n" );if (mod->has_init)buf_printf (b,"\t.init = init_module,\n" );
@@ -2308,7 +2308,7 @@ static int add_versions(struct buffer *b, struct module *mod)buf_printf (b,"\n" );buf_printf (b,"static const struct modversion_info ____versions[]\n" ); -buf_printf (b,"__used __section(__versions) = {\n" ); +buf_printf (b,"__used __section(\"__versions\") = {\n" );for (s = mod->unres; s; s = s->next) {if (!s->module)
tools/include/linux/objtool.h +1 -1
@@ -60,7 +60,7 @@ struct unwind_hint {* For more information, see tools/objtool/Documentation/stack-validation.txt. */ #define STACK_FRAME_NON_STANDARD (func) \ - static void __used __section(.discard.func_stack_frame_non_standard) \ + static void __used __section(".discard.func_stack_frame_non_standard") \ *__func_stack_frame_non_standard_##func = func#else /* __ASSEMBLY__ */
Signature · 1 line
2.26.0
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Quoted 13 lines · Joe Perches
Use a more generic form for
__sectionthat requires quotes to avoid complications with clang and gcc differences.Remove the quote operator # from
compiler_attributes.h__sectionmacro.Convert all unquoted
__section(foo)uses to quoted__section("foo"). Also convert __attribute__((section("foo"))) uses to__section("foo")even if the__attribute__has multiple list entry forms.Signed-off-by Joe Perches <[email protected]>---
Quoted 7 lines
This is the current output from the script against next-20200930 attached in this link:
https://lore.kernel.org/lkml/[email protected]/
It might be useful to run the script immediately before the next -rc1.
$ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71
powernv_defconfig
$ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71
...
arch/powerpc/boot/main.c:193:44: error: expected ';' after top level declarator
static char cmdline[BOOT_COMMAND_LINE_SIZE]
^
;
$ git blame arch/powerpc/boot/main.c -L 193 | head -n2
a2dd5da77f2cc arch/powerpc/boot/main.c (Anton Blanchard
2014-04-14 21:54:05 +1000 193) static char
cmdline[BOOT_COMMAND_LINE_SIZE]
9d04187c25477 arch/powerpc/boot/main.c (Joe Perches
2020-09-30 12:16:43 -0700 194) __section("__builtin_cmdline");Looks like arch/powerpc/boot/main.c doesn't include compiler_attributes.h? Preprocessing it doesn't expand __section as expected. I think scripts/Makefile.lib's c_flags injects this via -include flag.
(x86_64, arm, and arm64 defconfigs worked fine for me otherwise).
https://lore.kernel.org/lkml/[email protected]/
Signature · 2 lines
Thanks, ~Nick Desaulniers
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Quoted 21 lines · Nick Desaulniers
Quoted 12 lines · Joe Perches
Use a more generic form for
__sectionthat requires quotes to avoid complications with clang and gcc differences.Remove the quote operator # from
compiler_attributes.h__sectionmacro.Convert all unquoted
__section(foo)uses to quoted__section("foo"). Also convert __attribute__((section("foo"))) uses to__section("foo")even if the__attribute__has multiple list entry forms.Signed-off-by Joe Perches <[email protected]>---
Quoted 7 lines
This is the current output from the script against next-20200930 attached in this link:
https://lore.kernel.org/lkml/[email protected]/
It might be useful to run the script immediately before the next -rc1.
Quoted 6 lines
$ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71 powernv_defconfig $ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71 ... arch/powerpc/boot/main.c:193:44: error: expected ';' after top level declarator static char cmdline[BOOT_COMMAND_LINE_SIZE]
The script does not convert files in
scripts/
tools/
uapi/
and include/linux/compiler_attributes.h
It otherwise assumes that any __attribute__((__section__ use should be converted to __section.
If this ppc file is the only file outside of the listed exclusions, I can either exclude it directly or add compiler.h to it.
You have a preference?
Perhaps these are also possible files that need exclusions:
./arch/x86/boot/video.h:#define __videocard struct card_info __section(".videocards") __attribute__((used)) ./arch/x86/boot/compressed/pgtable_64.c:unsigned long *trampoline_32bit __section(".data"); ./arch/x86/boot/tty.c:static void __section(".inittext") serial_putchar(int ch) ./arch/x86/boot/tty.c:static void __section(".inittext") bios_putchar(int ch) ./arch/x86/boot/tty.c:void __section(".inittext") putchar(int ch) ./arch/x86/boot/tty.c:void __section(".inittext") puts(const char *str) ./arch/s390/boot/startup.c:static struct diag210 _diag210_tmp_dma __section(".dma.data");./arch/powerpc/boot/main.c: __section("__builtin_cmdline");./arch/powerpc/boot/ps3.c: __section("__builtin_cmdline");
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Quoted 11 lines · Joe Perches
Perhaps these are also possible files that need exclusions:
./arch/x86/boot/video.h:#define
__videocardstructcard_info__section(".videocards")__attribute__((used)) ./arch/x86/boot/compressed/pgtable_64.c:unsigned long*trampoline_32bit__section(".data"); ./arch/x86/boot/tty.c:static void__section(".inittext")serial_putchar(int ch)./arch/x86/boot/tty.c:static void__section(".inittext")bios_putchar(int ch)./arch/x86/boot/tty.c:void__section(".inittext")putchar(int ch) ./arch/x86/boot/tty.c:void__section(".inittext")puts(const char *str)./arch/s390/boot/startup.c:static struct diag210_diag210_tmp_dma__section(".dma.data");./arch/powerpc/boot/main.c:__section("__builtin_cmdline");./arch/powerpc/boot/ps3.c:__section("__builtin_cmdline");
It looks like all of the arch/x86, and arch/s390 files are fine but both of the arch/powerpc/boot files need modification.
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
In reply to Joe PerchesQuoted 37 lines · Joe Perches
Quoted 21 lines · Nick Desaulniers
Quoted 12 lines · Joe Perches
Use a more generic form for
__sectionthat requires quotes to avoid complications with clang and gcc differences.Remove the quote operator # from
compiler_attributes.h__sectionmacro.Convert all unquoted
__section(foo)uses to quoted__section("foo"). Also convert __attribute__((section("foo"))) uses to__section("foo")even if the__attribute__has multiple list entry forms.Signed-off-by Joe Perches <[email protected]>---
Quoted 7 lines
This is the current output from the script against next-20200930 attached in this link:
https://lore.kernel.org/lkml/[email protected]/
It might be useful to run the script immediately before the next -rc1.
Quoted 6 lines
$ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71 powernv_defconfig $ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71 ... arch/powerpc/boot/main.c:193:44: error: expected ';' after top level declarator static char cmdline[BOOT_COMMAND_LINE_SIZE]The script does not convert files in
scripts/
tools/
uapi/
andinclude/linux/compiler_attributes.h
Quoted 8 lines
It otherwise assumes that any __attribute__((__section__ use should be converted to
__section.If this ppc file is the only file outside of the listed exclusions, I can either exclude it directly or add
compiler.hto it.You have a preference?
If compiler_types.h which includes compiler_attributes.h is being implicitly including by Kbuild add -include flags to most translation units in the kernel, it would be nice to be able to use it everywhere. I consider open coded __attribute__'s a portability bug. So including the header in arch/powerpc/boot/*.c would be my preference.
Quoted 14 lines
Perhaps these are also possible files that need exclusions:
./arch/x86/boot/video.h:#define
__videocardstructcard_info__section(".videocards")__attribute__((used)) ./arch/x86/boot/compressed/pgtable_64.c:unsigned long*trampoline_32bit__section(".data"); ./arch/x86/boot/tty.c:static void__section(".inittext")serial_putchar(int ch)./arch/x86/boot/tty.c:static void__section(".inittext")bios_putchar(int ch)./arch/x86/boot/tty.c:void__section(".inittext")putchar(int ch) ./arch/x86/boot/tty.c:void__section(".inittext")puts(const char *str)./arch/s390/boot/startup.c:static struct diag210_diag210_tmp_dma__section(".dma.data");./arch/powerpc/boot/main.c:__section("__builtin_cmdline");./arch/powerpc/boot/ps3.c:__section("__builtin_cmdline");
Signature · 2 lines
Thanks, ~Nick Desaulniers
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Quoted 44 lines · Nick Desaulniers
Quoted 43 lines · Joe Perches
Quoted 21 lines · Nick Desaulniers
Quoted 12 lines · Joe Perches
Use a more generic form for
__sectionthat requires quotes to avoid complications with clang and gcc differences.Remove the quote operator # from
compiler_attributes.h__sectionmacro.Convert all unquoted
__section(foo)uses to quoted__section("foo"). Also convert __attribute__((section("foo"))) uses to__section("foo")even if the__attribute__has multiple list entry forms.Signed-off-by Joe Perches <[email protected]>---
Quoted 7 lines
This is the current output from the script against next-20200930 attached in this link:
https://lore.kernel.org/lkml/[email protected]/
It might be useful to run the script immediately before the next -rc1.
Quoted 6 lines
$ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71 powernv_defconfig $ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71 ... arch/powerpc/boot/main.c:193:44: error: expected ';' after top level declarator static char cmdline[BOOT_COMMAND_LINE_SIZE]The script does not convert files in
scripts/
tools/
uapi/
andinclude/linux/compiler_attributes.hIt otherwise assumes that any __attribute__((__section__ use should be converted to
__section.If this ppc file is the only file outside of the listed exclusions, I can either exclude it directly or add
compiler.hto it.
Quoted 23 lines
Quoted 1 line
You have a preference?
If
compiler_types.hwhich includescompiler_attributes.his being implicitly including byKbuildadd-includeflags to most translation units in the kernel, it would be nice to be able to use it everywhere. I consider open coded __attribute__'s a portability bug. So including the header inarch/powerpc/boot/*.cwould be my preference.Quoted 13 lines
Perhaps these are also possible files that need exclusions:
./arch/x86/boot/video.h:#define
__videocardstructcard_info__section(".videocards")__attribute__((used)) ./arch/x86/boot/compressed/pgtable_64.c:unsigned long*trampoline_32bit__section(".data"); ./arch/x86/boot/tty.c:static void__section(".inittext")serial_putchar(int ch)./arch/x86/boot/tty.c:static void__section(".inittext")bios_putchar(int ch)./arch/x86/boot/tty.c:void__section(".inittext")putchar(int ch) ./arch/x86/boot/tty.c:void__section(".inittext")puts(const char *str)./arch/s390/boot/startup.c:static struct diag210_diag210_tmp_dma__section(".dma.data");./arch/powerpc/boot/main.c:__section("__builtin_cmdline");./arch/powerpc/boot/ps3.c:__section("__builtin_cmdline");
no ppc cross compiler here, so can't test but maybe:
--- arch/powerpc/boot/main.c | 2 ++ arch/powerpc/boot/ps3.c | 2 ++ 2 files changed, 4 insertions(+)
arch/powerpc/boot/main.c +2 -0
@@ -6,6 +6,8 @@*/ #include <stdarg.h> #include <stddef.h> +#include <linux/compiler.h> +#include "elf.h" #include "page.h" #include "string.h"
arch/powerpc/boot/ps3.c +2 -0
@@ -8,6 +8,8 @@#include <stdarg.h> #include <stddef.h> +#include <linux/compiler.h> +#include "types.h" #include "elf.h" #include "string.h"
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Quoted 94 lines · Joe Perches
Quoted 44 lines · Nick Desaulniers
Quoted 43 lines · Joe Perches
Quoted 21 lines · Nick Desaulniers
Quoted 12 lines · Joe Perches
Use a more generic form for
__sectionthat requires quotes to avoid complications with clang and gcc differences.Remove the quote operator # from
compiler_attributes.h__sectionmacro.Convert all unquoted
__section(foo)uses to quoted__section("foo"). Also convert __attribute__((section("foo"))) uses to__section("foo")even if the__attribute__has multiple list entry forms.Signed-off-by Joe Perches <[email protected]>---
Quoted 7 lines
This is the current output from the script against next-20200930 attached in this link:
https://lore.kernel.org/lkml/[email protected]/
It might be useful to run the script immediately before the next -rc1.
Quoted 6 lines
$ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71 powernv_defconfig $ ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- make CC=clang -j71 ... arch/powerpc/boot/main.c:193:44: error: expected ';' after top level declarator static char cmdline[BOOT_COMMAND_LINE_SIZE]The script does not convert files in
scripts/
tools/
uapi/
andinclude/linux/compiler_attributes.hIt otherwise assumes that any __attribute__((__section__ use should be converted to
__section.If this ppc file is the only file outside of the listed exclusions, I can either exclude it directly or add
compiler.hto it.Quoted 22 lines
Quoted 1 line
You have a preference?
If
compiler_types.hwhich includescompiler_attributes.his being implicitly including byKbuildadd-includeflags to most translation units in the kernel, it would be nice to be able to use it everywhere. I consider open coded __attribute__'s a portability bug. So including the header inarch/powerpc/boot/*.cwould be my preference.Quoted 13 lines
Perhaps these are also possible files that need exclusions:
./arch/x86/boot/video.h:#define
__videocardstructcard_info__section(".videocards")__attribute__((used)) ./arch/x86/boot/compressed/pgtable_64.c:unsigned long*trampoline_32bit__section(".data"); ./arch/x86/boot/tty.c:static void__section(".inittext")serial_putchar(int ch)./arch/x86/boot/tty.c:static void__section(".inittext")bios_putchar(int ch)./arch/x86/boot/tty.c:void__section(".inittext")putchar(int ch) ./arch/x86/boot/tty.c:void__section(".inittext")puts(const char *str)./arch/s390/boot/startup.c:static struct diag210_diag210_tmp_dma__section(".dma.data");./arch/powerpc/boot/main.c:__section("__builtin_cmdline");./arch/powerpc/boot/ps3.c:__section("__builtin_cmdline");no ppc cross compiler here, so can't test but maybe:
--- arch/powerpc/boot/main.c | 2 ++ arch/powerpc/boot/ps3.c | 2 ++ 2 files changed, 4 insertions(+)arch/powerpc/boot/main.c +2
-0@@ -6,6 +6,8 @@*/ #include <stdarg.h> #include <stddef.h> +#include <linux/compiler.h> +#include "elf.h" #include "page.h" #include "string.h" arch/powerpc/boot/ps3.c +0
-0
arch/powerpc/boot/ps3.c line 15
Quoted 8 lines
arch/powerpc/boot/ps3.c +2
-0@@ -8,6 +8,8 @@#include <stdarg.h> #include <stddef.h> +#include <linux/compiler.h> +#include "types.h" #include "elf.h" #include "string.h"
So I installed the powerpc cross compiler, and
nope, that doesn't work, it makes a mess.
So it looks like the best option is to exclude these 2 files from conversion.
BOOTCC arch/powerpc/boot/main.o
In file included from ./include/linux/kcsan-checks.h:7,
from ./include/asm-generic/rwonce.h:27,
from ./arch/powerpc/include/generated/asm/rwonce.h:1,
from ./include/linux/compiler.h:232,
from arch/powerpc/boot/main.c:9:
./include/linux/compiler_attributes.h:64: warning: "__always_inline" redefined
64 | #define __always_inline inline __attribute__((__always_inline__))
|
In file included from ./include/linux/stddef.h:5,
from ./include/uapi/linux/posix_types.h:5,
from ./include/uapi/linux/types.h:14,
from ./include/linux/types.h:6,
from ./include/linux/kasan-checks.h:5,
from ./include/asm-generic/rwonce.h:26,
from ./arch/powerpc/include/generated/asm/rwonce.h:1,
from ./include/linux/compiler.h:232,
from arch/powerpc/boot/main.c:9:./include/uapi/linux/stddef.h:5: note: this is the location of the previous definition
5 | #define __always_inline inline
|
In file included from ./arch/powerpc/include/generated/asm/rwonce.h:1,
from ./include/linux/compiler.h:232,
from arch/powerpc/boot/main.c:9:
./include/asm-generic/rwonce.h:64:31: error: expected ‘;’ before ‘unsigned’
64 | static __no_sanitize_or_inline
| ^
| ;
65 | unsigned long __read_once_word_nocheck(const void *addr)
| ~~~~~~~~
./include/asm-generic/rwonce.h:82:28: error: expected ‘;’ before ‘unsigned’
82 | static __no_kasan_or_inline
| ^
| ;
83 | unsigned long read_word_at_a_time(const void *addr)
| ~~~~~~~~ In file included from arch/powerpc/boot/ops.h:15,
from arch/powerpc/boot/main.c:15:
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Hi Joe,
Quoted 3 lines · Joe Perches
So I installed the powerpc cross compiler, and
nope, that doesn't work, it makes a mess.
Thanks a lot for reviving the script and sending the treewide cleanup!
Quoted 2 lines
So it looks like the best option is to exclude these 2 files from conversion.
Agreed. Nevertheless, is there any reason arch/powerpc/* should not be compiling cleanly with compiler.h? (CC'ing the rest of the PowerPC reviewers and ML).
Cheers,
Miguel
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Quoted 1 line · Miguel Ojeda
Hi Joe,
Buenas Miguel.
Quoted 5 lines · Joe Perches
Quoted 2 lines
So I installed the powerpc cross compiler, and
nope, that doesn't work, it makes a mess.Thanks a lot for reviving the script and sending the treewide cleanup!
No charge...
I think the end result is cleaner and more obvious.
Quoted 6 lines
Quoted 2 lines
So it looks like the best option is to exclude these 2 files from conversion.
Agreed. Nevertheless, is there any reason
arch/powerpc/*should not be compiling cleanly withcompiler.h? (CC'ing the rest of the PowerPC reviewers and ML).
That's not a can of worms I care to open.
Perhaps the powerpc folk can do some fishing.
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
In reply to Miguel OjedaHi!
Quoted 6 lines · Miguel Ojeda
Quoted 2 lines
So it looks like the best option is to exclude these 2 files from conversion.
Agreed. Nevertheless, is there any reason
arch/powerpc/*should not be compiling cleanly withcompiler.h? (CC'ing the rest of the PowerPC reviewers and ML).
You need to #include compiler_types.h to get this #define?
(The twice-defined thing is a warning, not an error. It should be fixed of course, but it is less important; although it may be pointing to a deeper problem.)
Segher
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
On Thu, 2020-10-01 at 14:39 -0500, Segher Boessenkool wrch/ote:
Quoted 11 lines
Hi!
Quoted 6 lines · Miguel Ojeda
Quoted 2 lines
So it looks like the best option is to exclude these 2 files from conversion.
Agreed. Nevertheless, is there any reason
arch/powerpc/*should not be compiling cleanly withcompiler.h? (CC'ing the rest of the PowerPC reviewers and ML).You need to #include
compiler_types.hto get this #define?
Actually no, you need to add
#include <linux/compiler_attributes.h>
to both files and then it builds properly.
Ideally though nothing should include this file directly.
Quoted 6 lines
(The twice-defined thing is a warning, not an error. It should be fixed of course, but it is less important; although it may be pointing to a deeper problem.)
Segher
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Quoted 14 lines · Joe Perches
On Thu, 2020-10-01 at 14:39 -0500, Segher Boessenkool wrch/ote:
Quoted 11 lines
Hi!
Quoted 6 lines · Miguel Ojeda
Quoted 2 lines
So it looks like the best option is to exclude these 2 files from conversion.
Agreed. Nevertheless, is there any reason
arch/powerpc/*should not be compiling cleanly withcompiler.h? (CC'ing the rest of the PowerPC reviewers and ML).You need to #include
compiler_types.hto get this #define?
Quoted 7 lines
Actually no, you need to add
#include <
linux/compiler_attributes.h>to both files and then it builds properly.
Ideally though nothing should include this file directly.
That's because Kbuild injects it via command line flag -include. (Well, it injects compiler_types.h which includes this). If part of the tree reset KBUILD_CFLAGS, that -include gets dropped. I don't think there's anything wrong with manually including it and adding -I <path> (capital i) if needed.
Quoted 8 lines
Quoted 7 lines
(The twice-defined thing is a warning, not an error. It should be fixed of course, but it is less important; although it may be pointing to a deeper problem.)
Segher
Signature · 2 lines
Thanks, ~Nick Desaulniers
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Quoted 2 lines · Nick Desaulniers
I don't think there's anything wrong with manually including it and adding
-I <path>(capital i) if needed.
All of this is secondary to the actual change to use quoted __section("foo") rather than __section(foo)
I'd rather get that done first and then figure out if additional changes could be done later.
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
In reply to Joe PerchesQuoted 14 lines · Joe Perches
On Thu, 2020-10-01 at 14:39 -0500, Segher Boessenkool wrch/ote:
Quoted 11 lines
Hi!
Quoted 6 lines · Miguel Ojeda
Quoted 2 lines
So it looks like the best option is to exclude these 2 files from conversion.
Agreed. Nevertheless, is there any reason
arch/powerpc/*should not be compiling cleanly withcompiler.h? (CC'ing the rest of the PowerPC reviewers and ML).You need to #include
compiler_types.hto get this #define?
Quoted 7 lines
Actually no, you need to add
#include <
linux/compiler_attributes.h>to both files and then it builds properly.
Ideally though nothing should include this file directly.
arch/powerpc/boot is the powerpc wrapper, and it's not built with the same includes or flags as the rest of the kernel. It doesn't include any of the headers in the top level include/ directory for hysterical raisins.
The straightforward fix would be to exclude this directory from your script.
Cheers,
Joel
Re: [RFC PATCH next-20200930] treewide: Convert macro and uses of __section(foo) to __section("foo")
Quoted 6 lines · Joel Stanley
arch/powerpc/bootis the powerpc wrapper, and it's not built with the same includes or flags as the rest of the kernel. It doesn't include any of the headers in the top levelinclude/directory for hysterical raisins.The straightforward fix would be to exclude this directory from your script.
I agree and that's why I submitted another script
that does just that.
Quoted 10 lines · Nick Desaulniers
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>
I am guessing that this needs to go up with other patches. If so:
If not, let me know and I will queue it.
Thanx, Paul
Quoted 23 lines
---
ChangesV1->V2:
* drop unrelatedKconfigchanges accidentally committed in v1.include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/srcutree.h +1
-1@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \Signature · 1 line
2.28.0.709.gb0816b6eb0-goog
Quoted 13 lines · Paul E. McKenney
Quoted 10 lines · Nick Desaulniers
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>
Quoted 5 lines
I am guessing that this needs to go up with other patches. If so:
Acked-by Paul E. McKenney <[email protected]>If not, let me know and I will queue it.
I could have bundled them up as a series. I think you can pick it up, and I'll owe you a beer?
Quoted 26 lines
Thanx, Paul
Quoted 23 lines
---
ChangesV1->V2:
* drop unrelatedKconfigchanges accidentally committed in v1.include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/srcutree.h +1
-2@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \ --2.28.0.709.gb0816b6eb0-goog
Signature · 2 lines
Thanks, ~Nick Desaulniers
Paul E. McKenney
maintainerQuoted 14 lines · Nick Desaulniers
Quoted 13 lines · Paul E. McKenney
Quoted 10 lines · Nick Desaulniers
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>
Quoted 8 lines
Quoted 5 lines
I am guessing that this needs to go up with other patches. If so:
Acked-by Paul E. McKenney <[email protected]>If not, let me know and I will queue it.
I could have bundled them up as a series. I think you can pick it up, and I'll owe you a beer?
It is queued, thank you!
When does it need to hit mainline? (Your default is the v5.11 merge window, that is, the one following the upcoming merge window.)
Thanx, Paul
Quoted 29 lines
Quoted 23 lines
Quoted 23 lines
---
ChangesV1->V2:
* drop unrelatedKconfigchanges accidentally committed in v1.include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/srcutree.h +1
-2@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \ --2.28.0.709.gb0816b6eb0-goog
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 22 lines · Paul E. McKenney
Quoted 20 lines · Nick Desaulniers
Quoted 18 lines · Paul E. McKenney
Quoted 10 lines · Nick Desaulniers
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>I am guessing that this needs to go up with other patches. If so:
Acked-by Paul E. McKenney <[email protected]>If not, let me know and I will queue it.
Quoted 7 lines
Quoted 2 lines
I could have bundled them up as a series. I think you can pick it up, and I'll owe you a beer?
It is queued, thank you!
When does it need to hit mainline? (Your default is the v5.11 merge window, that is, the one following the upcoming merge window.)
No rush, this patch wasn't blocking any known issue, just a cleanup while I was in the neighborhood. 100 years ago, I was an Eagle scout. Pretty sure there was a motto about "leaving things better than you found them." Thanks for help resolving the merge conflict reported in -next related to it.
Quoted 33 lines
Thanx, Paul
Quoted 29 lines
Quoted 7 lines
Quoted 7 lines
---
ChangesV1->V2:
* drop unrelatedKconfigchanges accidentally committed in v1.include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
Quoted 14 lines
include/linux/srcutree.h +1
-2@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \ --Quoted 2 lines
2.28.0.709.gb0816b6eb0-goog
--
Thanks,
~Nick Desaulniers
Signature · 2 lines
Thanks, ~Nick Desaulniers
Quoted 29 lines · Nick Desaulniers' via Clang Built Linux
Quoted 27 lines · Paul E. McKenney
Quoted 14 lines · Nick Desaulniers
Quoted 13 lines · Paul E. McKenney
Quoted 10 lines · Nick Desaulniers
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>Quoted 8 lines
Quoted 5 lines
I am guessing that this needs to go up with other patches. If so:
Acked-by Paul E. McKenney <[email protected]>If not, let me know and I will queue it.
I could have bundled them up as a series. I think you can pick it up, and I'll owe you a beer?
It is queued, thank you!
Quoted 9 lines
Quoted 2 lines
When does it need to hit mainline? (Your default is the v5.11 merge window, that is, the one following the upcoming merge window.)
No rush, this patch wasn't blocking any known issue, just a cleanup while I was in the neighborhood. 100 years ago, I was an Eagle scout. Pretty sure there was a motto about "leaving things better than you found them." Thanks for help resolving the merge conflict reported in -next related to it.
Wasn't there a problem with your "Fixes:" tag (Fixes: *drop word "commit"* commit_hashid ("...")?
- Sedat -
Quoted 44 lines
Quoted 33 lines
Thanx, Paul
Quoted 29 lines
Quoted 7 lines
Quoted 7 lines
---
ChangesV1->V2:
* drop unrelatedKconfigchanges accidentally committed in v1.include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
Quoted 14 lines
include/linux/srcutree.h +1
-2@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \ --Quoted 2 lines
2.28.0.709.gb0816b6eb0-goog
--
Thanks,
~Nick Desaulniers--
Thanks,
~Nick Desaulniers--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAKwvOdkPMSwQneMLFNg3ihM5zHorFy%2BuGvzAL7y70%2Bhu_1q24w%40mail.gmail.com.
Paul E. McKenney
maintainerQuoted 34 lines · Sedat Dilek
Quoted 32 lines · Nick Desaulniers' via Clang Built Linux
Quoted 29 lines · Paul E. McKenney
Quoted 14 lines · Nick Desaulniers
Quoted 13 lines · Paul E. McKenney
Quoted 10 lines · Nick Desaulniers
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>Quoted 8 lines
Quoted 5 lines
I am guessing that this needs to go up with other patches. If so:
Acked-by Paul E. McKenney <[email protected]>If not, let me know and I will queue it.
I could have bundled them up as a series. I think you can pick it up, and I'll owe you a beer?
It is queued, thank you!
When does it need to hit mainline? (Your default is the v5.11 merge window, that is, the one following the upcoming merge window.)
Quoted 8 lines
Quoted 5 lines
No rush, this patch wasn't blocking any known issue, just a cleanup while I was in the neighborhood. 100 years ago, I was an Eagle scout. Pretty sure there was a motto about "leaving things better than you found them." Thanks for help resolving the merge conflict reported in -next related to it.
Wasn't there a problem with your "Fixes:" tag (Fixes: *drop word "commit"*
commit_hashid("...")?
Indeed there was, and I have it noted to be fixed on my next rebase.
Perhaps another reason not to rush to mainline though. ;-)
Thanx, Paul
Quoted 46 lines
- Sedat -
Quoted 44 lines
Quoted 33 lines
Thanx, Paul
Quoted 29 lines
Quoted 7 lines
Quoted 7 lines
---
ChangesV1->V2:
* drop unrelatedKconfigchanges accidentally committed in v1.include/linux/srcutree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Quoted 16 lines
Quoted 14 lines
include/linux/srcutree.h +1
-2@@ -124,7 +124,7 @@ struct srcu_struct {# define __DEFINE_SRCU (name, is_static) \ is_static struct srcu_struct name; \ struct srcu_struct * const __srcu_struct_##name \ - __section("___srcu_struct_ptrs") = &name + __section(___srcu_struct_ptrs) = &name#else # define __DEFINE_SRCU (name, is_static) \ static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data); \ --Quoted 2 lines
2.28.0.709.gb0816b6eb0-goog
--
Thanks,
~Nick Desaulniers--
Thanks,
~Nick Desaulniers--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAKwvOdkPMSwQneMLFNg3ihM5zHorFy%2BuGvzAL7y70%2Bhu_1q24w%40mail.gmail.com.
Nathan Chancellor
Tested-byQuoted 41 lines · Paul E. McKenney
Quoted 40 lines · Sedat Dilek
Quoted 37 lines · Nick Desaulniers' via Clang Built Linux
Quoted 22 lines · Paul E. McKenney
Quoted 20 lines · Nick Desaulniers
Quoted 18 lines · Paul E. McKenney
Quoted 10 lines · Nick Desaulniers
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>I am guessing that this needs to go up with other patches. If so:
Acked-by Paul E. McKenney <[email protected]>If not, let me know and I will queue it.
Quoted 7 lines
Quoted 2 lines
I could have bundled them up as a series. I think you can pick it up, and I'll owe you a beer?
It is queued, thank you!
When does it need to hit mainline? (Your default is the v5.11 merge window, that is, the one following the upcoming merge window.)
No rush, this patch wasn't blocking any known issue, just a cleanup while I was in the neighborhood. 100 years ago, I was an Eagle scout. Pretty sure there was a motto about "leaving things better than you found them." Thanks for help resolving the merge conflict reported in -next related to it.
Quoted 8 lines
Quoted 2 lines
Wasn't there a problem with your "Fixes:" tag (Fixes: *drop word "commit"*
commit_hashid("...")?Indeed there was, and I have it noted to be fixed on my next rebase.
Perhaps another reason not to rush to mainline though. ;-)
Thanx, Paul
I am replying here as well so that the relevant parties are in the know but I believe this patch should be fast tracked with a cc stable tag as this appears to be the root cause of the issue that Nick reported a few weeks ago:
https://lore.kernel.org/rcu/CAKwvOdm4AQhobdkKT08bjPGb15N58QN79XWxEaQt-P5Dk4+avQ@mail.gmail.com/
https://github.com/ClangBuiltLinux/linux/issues/1081
I can reproduce the issue on next-20201002 on my Raspberry Pi 4 just by booting it up. As soon as I apply this patch, all warnings disappear. I asked the original reporters to test if the patch resolves the issue for them but I figured more visibility on this, the sooner. The commit message might need to be revised if this turns out to be the case to make it more apparent that it has a user visible issue, rather than just a QoL fix.
Additionally, it seems like the patch is missing some reviewed by tags from Kees, Sedat, and myself. Feel free to add a
as well.
Cheers,
Nathan
Paul E. McKenney
maintainer Reviewed-by Kees Cook Reviewed-by Nathan Chancellor Tested-by Nathan Chancellor Reviewed-by Sedat DilekQuoted 67 lines · Nathan Chancellor
Quoted 41 lines · Paul E. McKenney
Quoted 40 lines · Sedat Dilek
Quoted 37 lines · Nick Desaulniers' via Clang Built Linux
Quoted 22 lines · Paul E. McKenney
Quoted 20 lines · Nick Desaulniers
Quoted 18 lines · Paul E. McKenney
Quoted 10 lines · Nick Desaulniers
The stringification operator,
#, in the preprocessor escapes strings. For example,# "foo"becomes"\"foo\"". GCC and Clang differ in how they treat section names that contain \".The portable solution is to not use a string literal with the preprocessor stringification operator.
Fixes commit fe15b50cdeee ("srcu: Allocate per-CPU data for DEFINE_SRCU() in modules")Signed-off-by Nick Desaulniers <[email protected]>I am guessing that this needs to go up with other patches. If so:
Acked-by Paul E. McKenney <[email protected]>If not, let me know and I will queue it.
Quoted 7 lines
Quoted 2 lines
I could have bundled them up as a series. I think you can pick it up, and I'll owe you a beer?
It is queued, thank you!
When does it need to hit mainline? (Your default is the v5.11 merge window, that is, the one following the upcoming merge window.)
No rush, this patch wasn't blocking any known issue, just a cleanup while I was in the neighborhood. 100 years ago, I was an Eagle scout. Pretty sure there was a motto about "leaving things better than you found them." Thanks for help resolving the merge conflict reported in -next related to it.
Quoted 8 lines
Quoted 2 lines
Wasn't there a problem with your "Fixes:" tag (Fixes: *drop word "commit"*
commit_hashid("...")?Indeed there was, and I have it noted to be fixed on my next rebase.
Perhaps another reason not to rush to mainline though. ;-)
Thanx, Paul
I am replying here as well so that the relevant parties are in the know but I believe this patch should be fast tracked with a cc stable tag as this appears to be the root cause of the issue that Nick reported a few weeks ago:
https://lore.kernel.org/rcu/CAKwvOdm4AQhobdkKT08bjPGb15N58QN79XWxEaQt-P5Dk4+avQ@mail.gmail.com/
https://github.com/ClangBuiltLinux/linux/issues/1081I can reproduce the issue on next-20201002 on my Raspberry Pi 4 just by booting it up. As soon as I apply this patch, all warnings disappear. I asked the original reporters to test if the patch resolves the issue for them but I figured more visibility on this, the sooner. The commit message might need to be revised if this turns out to be the case to make it more apparent that it has a user visible issue, rather than just a QoL fix.
Quoted 6 lines
Additionally, it seems like the patch is missing some reviewed by tags from Kees, Sedat, and myself. Feel free to add a
Tested-by Nathan Chancellor <[email protected]>as well.
Good catch, and apologies to all concerned! I have removed the stray "commit" and, based posts earlier in this thread, I have also added:
Thank you all!
Thanx, Paul