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: <202111171936.wytZ2w6E-lkp@intel.com>
Date:   Wed, 17 Nov 2021 19:40:50 +0800
From:   kernel test robot <lkp@...el.com>
To:     Xiaoming Ni <nixiaoming@...wei.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Luis Chamberlain <mcgrof@...nel.org>
Subject: [mcgrof-next:20211116-sysctl-cleanups-v4 6/35]
 include/linux/export.h:98:9: error: expected expression before 'extern'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20211116-sysctl-cleanups-v4
head:   5347239461f25fc50aa761923245b9ec4a4aafec
commit: 88b045e811bcb4988e2f37077d8a582b7a111b68 [6/35] sysctl: Add const decoration for static boundary value variables
config: nios2-defconfig (attached as .config)
compiler: nios2-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/commit/?id=88b045e811bcb4988e2f37077d8a582b7a111b68
        git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
        git fetch --no-tags mcgrof-next 20211116-sysctl-cleanups-v4
        git checkout 88b045e811bcb4988e2f37077d8a582b7a111b68
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nios2 SHELL=/bin/bash

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 >>):

   kernel/sysctl.c:1775:36: error: 'sysctl_sched_min_granularity' undeclared here (not in a function)
    1775 |                 .data           = &sysctl_sched_min_granularity,
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sysctl.c:1778:35: error: 'sched_proc_update_handler' undeclared here (not in a function); did you mean 'sched_rt_handler'?
    1778 |                 .proc_handler   = sched_proc_update_handler,
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
         |                                   sched_rt_handler
   kernel/sysctl.c:1784:36: error: 'sysctl_sched_latency' undeclared here (not in a function); did you mean 'sysctl_schedstats'?
    1784 |                 .data           = &sysctl_sched_latency,
         |                                    ^~~~~~~~~~~~~~~~~~~~
         |                                    sysctl_schedstats
   kernel/sysctl.c:1793:36: error: 'sysctl_sched_wakeup_granularity' undeclared here (not in a function)
    1793 |                 .data           = &sysctl_sched_wakeup_granularity,
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from include/linux/cpumask.h:10,
                    from include/linux/mm_types_task.h:14,
                    from include/linux/mm_types.h:5,
                    from include/linux/buildid.h:5,
                    from include/linux/module.h:14,
                    from kernel/sysctl.c:22:
>> include/linux/export.h:98:9: error: expected expression before 'extern'
      98 |         extern typeof(sym) sym;                                                 \
         |         ^~~~~~
   include/linux/export.h:152:41: note: in expansion of macro '___EXPORT_SYMBOL'
     152 | #define __EXPORT_SYMBOL(sym, sec, ns)   ___EXPORT_SYMBOL(sym, sec, ns)
         |                                         ^~~~~~~~~~~~~~~~
   include/linux/export.h:160:41: note: in expansion of macro '__EXPORT_SYMBOL'
     160 | #define _EXPORT_SYMBOL(sym, sec)        __EXPORT_SYMBOL(sym, sec, "")
         |                                         ^~~~~~~~~~~~~~~
   include/linux/export.h:163:41: note: in expansion of macro '_EXPORT_SYMBOL'
     163 | #define EXPORT_SYMBOL(sym)              _EXPORT_SYMBOL(sym, "")
         |                                         ^~~~~~~~~~~~~~
   kernel/sysctl.c:3387:1: note: in expansion of macro 'EXPORT_SYMBOL'
    3387 | EXPORT_SYMBOL(proc_dobool);
         | ^~~~~~~~~~~~~
   kernel/sysctl.c:1772: error: unterminated #ifdef
    1772 | #ifdef CONFIG_SCHED_DEBUG
         | 
   kernel/sysctl.c:1733: error: unterminated #if
    1733 | #if defined(CONFIG_SYSCTL)
         | 
   kernel/sysctl.c:1764:25: warning: 'kern_table' defined but not used [-Wunused-variable]
    1764 | static struct ctl_table kern_table[] = {
         |                         ^~~~~~~~~~
   kernel/sysctl.c:1482:12: warning: 'proc_do_cad_pid' defined but not used [-Wunused-function]
    1482 | static int proc_do_cad_pid(struct ctl_table *table, int write, void *buffer,
         |            ^~~~~~~~~~~~~~~
   kernel/sysctl.c:1187:12: warning: 'proc_dostring_coredump' defined but not used [-Wunused-function]
    1187 | static int proc_dostring_coredump(struct ctl_table *table, int write,
         |            ^~~~~~~~~~~~~~~~~~~~~~
   kernel/sysctl.c:1177:12: warning: 'proc_dointvec_minmax_coredump' defined but not used [-Wunused-function]
    1177 | static int proc_dointvec_minmax_coredump(struct ctl_table *table, int write,
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sysctl.c:1156:12: warning: 'proc_dopipe_max_size' defined but not used [-Wunused-function]
    1156 | static int proc_dopipe_max_size(struct ctl_table *table, int write,
         |            ^~~~~~~~~~~~~~~~~~~~
   kernel/sysctl.c:931:12: warning: 'proc_dointvec_minmax_sysadmin' defined but not used [-Wunused-function]
     931 | static int proc_dointvec_minmax_sysadmin(struct ctl_table *table, int write,
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sysctl.c:891:12: warning: 'proc_taint' defined but not used [-Wunused-function]
     891 | static int proc_taint(struct ctl_table *table, int write,
         |            ^~~~~~~~~~
   kernel/sysctl.c:847:12: warning: 'proc_dointvec_minmax_warn_RT_change' defined but not used [-Wunused-function]
     847 | static int proc_dointvec_minmax_warn_RT_change(struct ctl_table *table,
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/sysctl.c:185:18: warning: 'max_extfrag_threshold' defined but not used [-Wunused-const-variable=]
     185 | static const int max_extfrag_threshold = 1000;
         |                  ^~~~~~~~~~~~~~~~~~~~~
   kernel/sysctl.c:184:18: warning: 'min_extfrag_threshold' defined but not used [-Wunused-const-variable=]
     184 | static const int min_extfrag_threshold;
         |                  ^~~~~~~~~~~~~~~~~~~~~
   kernel/sysctl.c:128:18: warning: 'cap_last_cap' defined but not used [-Wunused-const-variable=]
     128 | static const int cap_last_cap = CAP_LAST_CAP;
         |                  ^~~~~~~~~~~~
   kernel/sysctl.c:127:18: warning: 'ngroups_max' defined but not used [-Wunused-const-variable=]
     127 | static const int ngroups_max = NGROUPS_MAX;
         |                  ^~~~~~~~~~~
   kernel/sysctl.c:125:18: warning: 'minolduid' defined but not used [-Wunused-const-variable=]
     125 | static const int minolduid;
         |                  ^~~~~~~~~
   kernel/sysctl.c:124:18: warning: 'maxolduid' defined but not used [-Wunused-const-variable=]
     124 | static const int maxolduid = 65535;
         |                  ^~~~~~~~~
   kernel/sysctl.c:121:28: warning: 'dirty_bytes_min' defined but not used [-Wunused-const-variable=]
     121 | static const unsigned long dirty_bytes_min = 2 * PAGE_SIZE;
         |                            ^~~~~~~~~~~~~~~
   kernel/sysctl.c:114:18: warning: 'ten_thousand' defined but not used [-Wunused-const-variable=]
     114 | static const int ten_thousand = 10000;
         |                  ^~~~~~~~~~~~
   kernel/sysctl.c:112:28: warning: 'long_max' defined but not used [-Wunused-const-variable=]
     112 | static const unsigned long long_max = LONG_MAX;
         |                            ^~~~~~~~
   kernel/sysctl.c:111:28: warning: 'one_ul' defined but not used [-Wunused-const-variable=]
     111 | static const unsigned long one_ul = 1;
         |                            ^~~~~~
   kernel/sysctl.c:110:28: warning: 'zero_ul' defined but not used [-Wunused-const-variable=]
     110 | static const unsigned long zero_ul;
         |                            ^~~~~~~


vim +/extern +98 include/linux/export.h

69a94abb82eed2 Masahiro Yamada   2019-09-09   84  
ce2b617ce8cbb7 Jessica Yu        2019-11-12   85  /*
ce2b617ce8cbb7 Jessica Yu        2019-11-12   86   * For every exported symbol, do the following:
ce2b617ce8cbb7 Jessica Yu        2019-11-12   87   *
ce2b617ce8cbb7 Jessica Yu        2019-11-12   88   * - If applicable, place a CRC entry in the __kcrctab section.
ce2b617ce8cbb7 Jessica Yu        2019-11-12   89   * - Put the name of the symbol and namespace (empty string "" for none) in
ce2b617ce8cbb7 Jessica Yu        2019-11-12   90   *   __ksymtab_strings.
ce2b617ce8cbb7 Jessica Yu        2019-11-12   91   * - Place a struct kernel_symbol entry in the __ksymtab section.
ce2b617ce8cbb7 Jessica Yu        2019-11-12   92   *
ce2b617ce8cbb7 Jessica Yu        2019-11-12   93   * note on .section use: we specify progbits since usage of the "M" (SHF_MERGE)
ce2b617ce8cbb7 Jessica Yu        2019-11-12   94   * section flag requires it. Use '%progbits' instead of '@...gbits' since the
ce2b617ce8cbb7 Jessica Yu        2019-11-12   95   * former apparently works on all arches according to the binutils source.
ce2b617ce8cbb7 Jessica Yu        2019-11-12   96   */
c3a6cf19e695c8 Masahiro Yamada   2019-10-18   97  #define ___EXPORT_SYMBOL(sym, sec, ns)						\
f50169324df4ad Paul Gortmaker    2011-05-23  @98  	extern typeof(sym) sym;							\
ce2b617ce8cbb7 Jessica Yu        2019-11-12   99  	extern const char __kstrtab_##sym[];					\
ce2b617ce8cbb7 Jessica Yu        2019-11-12  100  	extern const char __kstrtabns_##sym[];					\
8651ec01daedad Matthias Maennich 2019-09-06  101  	__CRC_SYMBOL(sym, sec);							\
ce2b617ce8cbb7 Jessica Yu        2019-11-12  102  	asm("	.section \"__ksymtab_strings\",\"aMS\",%progbits,1	\n"	\
ce2b617ce8cbb7 Jessica Yu        2019-11-12  103  	    "__kstrtab_" #sym ":					\n"	\
ce2b617ce8cbb7 Jessica Yu        2019-11-12  104  	    "	.asciz 	\"" #sym "\"					\n"	\
ce2b617ce8cbb7 Jessica Yu        2019-11-12  105  	    "__kstrtabns_" #sym ":					\n"	\
ce2b617ce8cbb7 Jessica Yu        2019-11-12  106  	    "	.asciz 	\"" ns "\"					\n"	\
ce2b617ce8cbb7 Jessica Yu        2019-11-12  107  	    "	.previous						\n");	\
7290d58095712a Ard Biesheuvel    2018-08-21  108  	__KSYMTAB_ENTRY(sym, sec)
f50169324df4ad Paul Gortmaker    2011-05-23  109  

:::::: The code at line 98 was first introduced by commit
:::::: f50169324df4ad942e544386d136216c8617636a module.h: split out the EXPORT_SYMBOL into export.h

:::::: TO: Paul Gortmaker <paul.gortmaker@...driver.com>
:::::: CC: Paul Gortmaker <paul.gortmaker@...driver.com>

---
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" (10374 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ