Re: [PATCH v2] module: use relative references for __ksymtab entries
Hi Ard, [auto build test ERROR on linus/master] [also build test ERROR on v4.13-rc3 next-20170804] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ard-Biesheuvel/module-use-relative-references-for-__ksymtab-entries/20170806-205309 config: x86_64-allyesdebian (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): In file included from include/asm-generic/percpu.h:6:0, from arch/x86/include/asm/percpu.h:542, from arch/x86/include/asm/preempt.h:5, from include/linux/preempt.h:80, from include/linux/spinlock.h:50, from include/linux/mmzone.h:7, from include/linux/gfp.h:5, from include/linux/slab.h:14, from kernel/fork.c:14: >> include/linux/percpu-defs.h:92:26: error: __pcpu_unique_cached_stacks causes >> a section type conflict with __discard_lockdep_tasklist_lock_is_held __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ ^ include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION' DEFINE_PER_CPU_SECTION(type, name, "") ^~ kernel/fork.c:181:8: note: in expansion of macro 'DEFINE_PER_CPU' static DEFINE_PER_CPU(struct vm_struct *, cached_stacks[NR_CACHED_STACKS]); ^~ In file included from include/linux/linkage.h:6:0, from include/linux/kernel.h:6, from include/asm-generic/bug.h:15, from arch/x86/include/asm/bug.h:81, from include/linux/bug.h:4, from include/linux/mmdebug.h:4, from include/linux/gfp.h:4, from include/linux/slab.h:14, from kernel/fork.c:14: include/linux/export.h:71:4: note: '__discard_lockdep_tasklist_lock_is_held' was declared here __discard_##sym(void) { return (void *)&sym; } \ ^ include/linux/export.h:104:25: note: in expansion of macro '___EXPORT_SYMBOL' #define __EXPORT_SYMBOL ___EXPORT_SYMBOL ^~~~ include/linux/export.h:111:2: note: in expansion of macro '__EXPORT_SYMBOL' __EXPORT_SYMBOL(sym, "_gpl") ^~~ kernel/fork.c:131:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL' EXPORT_SYMBOL_GPL(lockdep_tasklist_lock_is_held); ^ -- In file included from include/asm-generic/percpu.h:6:0, from arch/x86/include/asm/percpu.h:542, from arch/x86/include/asm/preempt.h:5, from include/linux/preempt.h:80, from include/linux/spinlock.h:50, from include/linux/mmzone.h:7, from include/linux/gfp.h:5, from include/linux/slab.h:14, from mm/slab.c:89: >> include/linux/percpu-defs.h:92:26: error: __pcpu_unique_slab_reap_node >> causes a section type conflict with __discard_kmem_cache_alloc __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ ^ include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION' DEFINE_PER_CPU_SECTION(type, name, "") ^~ >> mm/slab.c:524:8: note: in expansion of macro 'DEFINE_PER_CPU' static DEFINE_PER_CPU(unsigned long, slab_reap_node); ^~ In file included from include/linux/linkage.h:6:0, from include/linux/kernel.h:6, from include/asm-generic/bug.h:15, from arch/x86/include/asm/bug.h:81, from include/linux/bug.h:4, from include/linux/mmdebug.h:4, from include/linux/gfp.h:4, from include/linux/slab.h:14, from mm/slab.c:89: include/linux/export.h:71:4: note: '__discard_kmem_cache_alloc' was declared here __discard_##sym(void) { return (void *)&sym; } \ ^ include/linux/export.h:104:25: note: in expansion of macro '___EXPORT_SYMBOL' #define __EXPORT_SYMBOL ___EXPORT_SYMBOL ^~~~ include/linux/export.h:108:2: note: in expansion of macro '__EXPORT_SYMBOL' __EXPORT_SYMBOL(sym, "") ^~~ mm/slab.c:3567:1: note: in expansion of macro 'EXPORT_SYMBOL' EXPORT_SYMBOL(kmem_cache_alloc); ^ vim +92 include/linux/percpu-defs.h 62fde541 Tejun Heo 2014-06-17 37 5028eaa9 David Howells 2009-04-21 38 /* 5028eaa9 David Howells 2009-04-21 39 * Base implementations of per-CPU variable declarations and definitions, where 5028eaa9 Dav
Re: [PATCH v2] module: use relative references for __ksymtab entries
Hi Ard, [auto build test ERROR on linus/master] [also build test ERROR on v4.13-rc3 next-20170804] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ard-Biesheuvel/module-use-relative-references-for-__ksymtab-entries/20170806-205309 config: x86_64-allyesdebian (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): In file included from include/asm-generic/percpu.h:6:0, from arch/x86/include/asm/percpu.h:542, from arch/x86/include/asm/current.h:5, from include/linux/mutex.h:13, from kernel//locking/lockdep.c:29: >> include/linux/percpu-defs.h:92:26: error: __pcpu_unique_cpu_lock_stats >> causes a section type conflict with __discard_lockdep_off __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ ^ include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION' DEFINE_PER_CPU_SECTION(type, name, "") ^~ kernel//locking/lockdep.c:156:8: note: in expansion of macro 'DEFINE_PER_CPU' static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats); ^~ In file included from include/linux/linkage.h:6:0, from include/linux/kernel.h:6, from arch/x86/include/asm/percpu.h:44, from arch/x86/include/asm/current.h:5, from include/linux/mutex.h:13, from kernel//locking/lockdep.c:29: include/linux/export.h:71:4: note: '__discard_lockdep_off' was declared here __discard_##sym(void) { return (void *)&sym; } \ ^ include/linux/export.h:104:25: note: in expansion of macro '___EXPORT_SYMBOL' #define __EXPORT_SYMBOL ___EXPORT_SYMBOL ^~~~ include/linux/export.h:108:2: note: in expansion of macro '__EXPORT_SYMBOL' __EXPORT_SYMBOL(sym, "") ^~~ kernel//locking/lockdep.c:329:1: note: in expansion of macro 'EXPORT_SYMBOL' EXPORT_SYMBOL(lockdep_off); ^ -- In file included from include/asm-generic/percpu.h:6:0, from arch/x86/include/asm/percpu.h:542, from arch/x86/include/asm/current.h:5, from include/linux/mutex.h:13, from kernel///locking/lockdep.c:29: >> include/linux/percpu-defs.h:92:26: error: __pcpu_unique_cpu_lock_stats >> causes a section type conflict with __discard_lockdep_off __PCPU_DUMMY_ATTRS char __pcpu_unique_##name; \ ^ include/linux/percpu-defs.h:116:2: note: in expansion of macro 'DEFINE_PER_CPU_SECTION' DEFINE_PER_CPU_SECTION(type, name, "") ^~ kernel///locking/lockdep.c:156:8: note: in expansion of macro 'DEFINE_PER_CPU' static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], cpu_lock_stats); ^~ In file included from include/linux/linkage.h:6:0, from include/linux/kernel.h:6, from arch/x86/include/asm/percpu.h:44, from arch/x86/include/asm/current.h:5, from include/linux/mutex.h:13, from kernel///locking/lockdep.c:29: include/linux/export.h:71:4: note: '__discard_lockdep_off' was declared here __discard_##sym(void) { return (void *)&sym; } \ ^ include/linux/export.h:104:25: note: in expansion of macro '___EXPORT_SYMBOL' #define __EXPORT_SYMBOL ___EXPORT_SYMBOL ^~~~ include/linux/export.h:108:2: note: in expansion of macro '__EXPORT_SYMBOL' __EXPORT_SYMBOL(sym, "") ^~~ kernel///locking/lockdep.c:329:1: note: in expansion of macro 'EXPORT_SYMBOL' EXPORT_SYMBOL(lockdep_off); ^ vim +92 include/linux/percpu-defs.h 62fde541 Tejun Heo 2014-06-17 37 5028eaa9 David Howells 2009-04-21 38 /* 5028eaa9 David Howells 2009-04-21 39 * Base implementations of per-CPU variable declarations and definitions, where 5028eaa9 David Howells 2009-04-21 40 * the section in which the variable is to be placed is provided by the 7c756e6e Tejun Heo 2009-06-24 41 * 'sec' argument. This may be used to affect the parameters governing the 5028eaa9 David Howells 2009-04-21 42 * variable's storage. 5028eaa9 David Howells 2009-04-21 43 * 5028eaa9 David Howells 2009-04-21 44 * NOTE! The sections for the DECLARE and for the DEFINE must match, lest 5028eaa9 David Howells 2009-04-21 45 * linkage errors occur due the compiler generating the wrong code to access 5028eaa9 David Howells 2009-04-21 46 * that section. 5028eaa9 David Ho