lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202010291100.DornGfYR-lkp@intel.com>
Date:   Thu, 29 Oct 2020 11:41:02 +0800
From:   kernel test robot <lkp@...el.com>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Nathan Chancellor <natechancellor@...il.com>,
        Sedat Dilek <sedat.dilek@...il.com>
Subject: [rcu:dev.2020.10.26b 81/97] include/linux/srcutree.h:127:13: error:
 '___srcu_struct_ptrs' undeclared here (not in a function)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.10.26b
head:   387807f02923dd87ad097a4245ddbd9d8079687d
commit: c1370c128cf49147f1d4c670b7101134231b3dc5 [81/97] srcu: Avoid escaped section names
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?id=c1370c128cf49147f1d4c670b7101134231b3dc5
        git remote add rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
        git fetch --no-tags rcu dev.2020.10.26b
        git checkout c1370c128cf49147f1d4c670b7101134231b3dc5
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from include/linux/compiler_types.h:65,
                    from <command-line>:
>> include/linux/srcutree.h:127:13: error: '___srcu_struct_ptrs' undeclared here (not in a function)
     127 |   __section(___srcu_struct_ptrs) = &name
         |             ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler_attributes.h:257:68: note: in definition of macro '__section'
     257 | #define __section(section)              __attribute__((__section__(section)))
         |                                                                    ^~~~~~~
   include/linux/srcutree.h:135:34: note: in expansion of macro '__DEFINE_SRCU'
     135 | #define DEFINE_STATIC_SRCU(name) __DEFINE_SRCU(name, static)
         |                                  ^~~~~~~~~~~~~
   drivers/gpu/drm/drm_drv.c:68:1: note: in expansion of macro 'DEFINE_STATIC_SRCU'
      68 | DEFINE_STATIC_SRCU(drm_unplug_srcu);
         | ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/srcu.h:49,
                    from include/linux/notifier.h:16,
                    from arch/x86/include/asm/uprobes.h:13,
                    from include/linux/uprobes.h:49,
                    from include/linux/mm_types.h:14,
                    from include/linux/mmzone.h:21,
                    from include/linux/gfp.h:6,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:19,
                    from include/linux/fs.h:15,
                    from include/linux/debugfs.h:15,
                    from drivers/gpu/drm/drm_drv.c:29:
>> include/linux/srcutree.h:126:9: error: section attribute argument not a string constant
     126 |  struct srcu_struct * const __srcu_struct_##name   \
         |         ^~~~~~~~~~~
   include/linux/srcutree.h:135:34: note: in expansion of macro '__DEFINE_SRCU'
     135 | #define DEFINE_STATIC_SRCU(name) __DEFINE_SRCU(name, static)
         |                                  ^~~~~~~~~~~~~
   drivers/gpu/drm/drm_drv.c:68:1: note: in expansion of macro 'DEFINE_STATIC_SRCU'
      68 | DEFINE_STATIC_SRCU(drm_unplug_srcu);
         | ^~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/compiler_types.h:65,
                    from <command-line>:
>> include/linux/srcutree.h:127:13: error: '___srcu_struct_ptrs' undeclared here (not in a function)
     127 |   __section(___srcu_struct_ptrs) = &name
         |             ^~~~~~~~~~~~~~~~~~~
   include/linux/compiler_attributes.h:257:68: note: in definition of macro '__section'
     257 | #define __section(section)              __attribute__((__section__(section)))
         |                                                                    ^~~~~~~
   include/linux/srcutree.h:135:34: note: in expansion of macro '__DEFINE_SRCU'
     135 | #define DEFINE_STATIC_SRCU(name) __DEFINE_SRCU(name, static)
         |                                  ^~~~~~~~~~~~~
   fs/dlm/lowcomms.c:139:1: note: in expansion of macro 'DEFINE_STATIC_SRCU'
     139 | DEFINE_STATIC_SRCU(connections_srcu);
         | ^~~~~~~~~~~~~~~~~~
   In file included from include/linux/srcu.h:49,
                    from include/linux/notifier.h:16,
                    from arch/x86/include/asm/uprobes.h:13,
                    from include/linux/uprobes.h:49,
                    from include/linux/mm_types.h:14,
                    from include/linux/mmzone.h:21,
                    from include/linux/gfp.h:6,
                    from include/linux/xarray.h:14,
                    from include/linux/radix-tree.h:19,
                    from include/linux/fs.h:15,
                    from include/linux/compat.h:17,
                    from include/linux/ethtool.h:17,
                    from include/linux/netdevice.h:37,
                    from include/net/sock.h:46,
                    from fs/dlm/lowcomms.c:46:
>> include/linux/srcutree.h:126:9: error: section attribute argument not a string constant
     126 |  struct srcu_struct * const __srcu_struct_##name   \
         |         ^~~~~~~~~~~
   include/linux/srcutree.h:135:34: note: in expansion of macro '__DEFINE_SRCU'
     135 | #define DEFINE_STATIC_SRCU(name) __DEFINE_SRCU(name, static)
         |                                  ^~~~~~~~~~~~~
   fs/dlm/lowcomms.c:139:1: note: in expansion of macro 'DEFINE_STATIC_SRCU'
     139 | DEFINE_STATIC_SRCU(connections_srcu);
         | ^~~~~~~~~~~~~~~~~~

vim +/___srcu_struct_ptrs +127 include/linux/srcutree.h

   103	
   104	/*
   105	 * Define and initialize a srcu struct at build time.
   106	 * Do -not- call init_srcu_struct() nor cleanup_srcu_struct() on it.
   107	 *
   108	 * Note that although DEFINE_STATIC_SRCU() hides the name from other
   109	 * files, the per-CPU variable rules nevertheless require that the
   110	 * chosen name be globally unique.  These rules also prohibit use of
   111	 * DEFINE_STATIC_SRCU() within a function.  If these rules are too
   112	 * restrictive, declare the srcu_struct manually.  For example, in
   113	 * each file:
   114	 *
   115	 *	static struct srcu_struct my_srcu;
   116	 *
   117	 * Then, before the first use of each my_srcu, manually initialize it:
   118	 *
   119	 *	init_srcu_struct(&my_srcu);
   120	 *
   121	 * See include/linux/percpu-defs.h for the rules on per-CPU variables.
   122	 */
   123	#ifdef MODULE
   124	# define __DEFINE_SRCU(name, is_static)					\
   125		is_static struct srcu_struct name;				\
 > 126		struct srcu_struct * const __srcu_struct_##name			\
 > 127			__section(___srcu_struct_ptrs) = &name
   128	#else
   129	# define __DEFINE_SRCU(name, is_static)					\
   130		static DEFINE_PER_CPU(struct srcu_data, name##_srcu_data);	\
   131		is_static struct srcu_struct name =				\
   132			__SRCU_STRUCT_INIT(name, name##_srcu_data)
   133	#endif
   134	#define DEFINE_SRCU(name)		__DEFINE_SRCU(name, /* not static */)
   135	#define DEFINE_STATIC_SRCU(name)	__DEFINE_SRCU(name, static)
   136	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (45912 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ