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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202305170045.2m5IKxGD-lkp@intel.com>
Date:   Wed, 17 May 2023 00:52:26 +0800
From:   kernel test robot <lkp@...el.com>
To:     Sven Schnelle <svens@...ux.ibm.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        "Eric W . Biederman" <ebiederm@...ssion.com>,
        Mark Rutland <mark.rutland@....com>,
        Andy Lutomirski <luto@...nel.org>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-s390@...r.kernel.org,
        hca@...ux.ibm.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] entry: move the exit path to header files

Hi Sven,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/core/entry]
[also build test WARNING on linus/master v6.4-rc2 next-20230516]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sven-Schnelle/entry-move-the-exit-path-to-header-files/20230516-230146
base:   tip/core/entry
patch link:    https://lore.kernel.org/r/20230516133810.171487-2-svens%40linux.ibm.com
patch subject: [PATCH 1/2] entry: move the exit path to header files
config: loongarch-allyesconfig
compiler: loongarch64-linux-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/30656e2ff97c145a735ce61be030ba945ec99ace
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Sven-Schnelle/entry-move-the-exit-path-to-header-files/20230516-230146
        git checkout 30656e2ff97c145a735ce61be030ba945ec99ace
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash kernel/entry/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202305170045.2m5IKxGD-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from kernel/entry/common.c:4:
   include/linux/entry-common.h: In function 'syscall_exit_work':
   include/linux/entry-common.h:572:9: error: implicit declaration of function 'audit_syscall_exit' [-Werror=implicit-function-declaration]
     572 |         audit_syscall_exit(regs);
         |         ^~~~~~~~~~~~~~~~~~
   In file included from kernel/entry/common.c:10:
   include/linux/audit.h: At top level:
>> include/linux/audit.h:350:20: warning: conflicting types for 'audit_syscall_exit'; have 'void(void *)'
     350 | static inline void audit_syscall_exit(void *pt_regs)
         |                    ^~~~~~~~~~~~~~~~~~
   include/linux/audit.h:350:20: error: static declaration of 'audit_syscall_exit' follows non-static declaration
   include/linux/entry-common.h:572:9: note: previous implicit declaration of 'audit_syscall_exit' with type 'void(void *)'
     572 |         audit_syscall_exit(regs);
         |         ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +350 include/linux/audit.h

cdfb6b341f0f24 Richard Guy Briggs  2018-05-12  317  
36734810488e61 Yaowei Bai          2015-11-04  318  static inline bool audit_dummy_context(void)
d51374adf5f2f8 Al Viro             2006-08-03  319  {
cdfb6b341f0f24 Richard Guy Briggs  2018-05-12  320  	void *p = audit_context();
d51374adf5f2f8 Al Viro             2006-08-03  321  	return !p || *(int *)p;
d51374adf5f2f8 Al Viro             2006-08-03  322  }
a4ff8dba7d8ce5 Eric Paris          2012-01-03  323  static inline void audit_free(struct task_struct *task)
a4ff8dba7d8ce5 Eric Paris          2012-01-03  324  {
a4ff8dba7d8ce5 Eric Paris          2012-01-03  325  	if (unlikely(task->audit_context))
a4ff8dba7d8ce5 Eric Paris          2012-01-03  326  		__audit_free(task);
a4ff8dba7d8ce5 Eric Paris          2012-01-03  327  }
5bd2182d58e9d9 Paul Moore          2021-02-16  328  static inline void audit_uring_entry(u8 op)
5bd2182d58e9d9 Paul Moore          2021-02-16  329  {
5bd2182d58e9d9 Paul Moore          2021-02-16  330  	/*
5bd2182d58e9d9 Paul Moore          2021-02-16  331  	 * We intentionally check audit_context() before audit_enabled as most
5bd2182d58e9d9 Paul Moore          2021-02-16  332  	 * Linux systems (as of ~2021) rely on systemd which forces audit to
5bd2182d58e9d9 Paul Moore          2021-02-16  333  	 * be enabled regardless of the user's audit configuration.
5bd2182d58e9d9 Paul Moore          2021-02-16  334  	 */
5bd2182d58e9d9 Paul Moore          2021-02-16  335  	if (unlikely(audit_context() && audit_enabled))
5bd2182d58e9d9 Paul Moore          2021-02-16  336  		__audit_uring_entry(op);
5bd2182d58e9d9 Paul Moore          2021-02-16  337  }
5bd2182d58e9d9 Paul Moore          2021-02-16  338  static inline void audit_uring_exit(int success, long code)
5bd2182d58e9d9 Paul Moore          2021-02-16  339  {
69e9cd66ae1392 Julian Orth         2022-05-17  340  	if (unlikely(audit_context()))
5bd2182d58e9d9 Paul Moore          2021-02-16  341  		__audit_uring_exit(success, code);
5bd2182d58e9d9 Paul Moore          2021-02-16  342  }
91397401bb5072 Eric Paris          2014-03-11  343  static inline void audit_syscall_entry(int major, unsigned long a0,
b05d8447e78216 Eric Paris          2012-01-03  344  				       unsigned long a1, unsigned long a2,
b05d8447e78216 Eric Paris          2012-01-03  345  				       unsigned long a3)
b05d8447e78216 Eric Paris          2012-01-03  346  {
cdfb6b341f0f24 Richard Guy Briggs  2018-05-12  347  	if (unlikely(audit_context()))
b4f0d3755c5e9c Richard Guy Briggs  2014-03-04  348  		__audit_syscall_entry(major, a0, a1, a2, a3);
b05d8447e78216 Eric Paris          2012-01-03  349  }
d7e7528bcd456f Eric Paris          2012-01-03 @350  static inline void audit_syscall_exit(void *pt_regs)
d7e7528bcd456f Eric Paris          2012-01-03  351  {
cdfb6b341f0f24 Richard Guy Briggs  2018-05-12  352  	if (unlikely(audit_context())) {
d7e7528bcd456f Eric Paris          2012-01-03  353  		int success = is_syscall_success(pt_regs);
06bdadd7634551 AKASHI Takahiro     2014-01-13  354  		long return_code = regs_return_value(pt_regs);
d7e7528bcd456f Eric Paris          2012-01-03  355  
d7e7528bcd456f Eric Paris          2012-01-03  356  		__audit_syscall_exit(success, return_code);
d7e7528bcd456f Eric Paris          2012-01-03  357  	}
d7e7528bcd456f Eric Paris          2012-01-03  358  }
7ac86265dc8f66 Jeff Layton         2012-10-10  359  static inline struct filename *audit_reusename(const __user char *name)
7ac86265dc8f66 Jeff Layton         2012-10-10  360  {
7ac86265dc8f66 Jeff Layton         2012-10-10  361  	if (unlikely(!audit_dummy_context()))
7ac86265dc8f66 Jeff Layton         2012-10-10  362  		return __audit_reusename(name);
7ac86265dc8f66 Jeff Layton         2012-10-10  363  	return NULL;
7ac86265dc8f66 Jeff Layton         2012-10-10  364  }
91a27b2a756784 Jeff Layton         2012-10-10  365  static inline void audit_getname(struct filename *name)
d8945bb51a2bb6 Al Viro             2006-05-18  366  {
5ac3a9c26c1cc4 Al Viro             2006-07-16  367  	if (unlikely(!audit_dummy_context()))
d8945bb51a2bb6 Al Viro             2006-05-18  368  		__audit_getname(name);
d8945bb51a2bb6 Al Viro             2006-05-18  369  }
79f6530cb59e2a Jeff Layton         2013-07-08  370  static inline void audit_inode(struct filename *name,
79f6530cb59e2a Jeff Layton         2013-07-08  371  				const struct dentry *dentry,
c9b07eab0c8760 Al Viro             2019-07-14  372  				unsigned int aflags) {
c9b07eab0c8760 Al Viro             2019-07-14  373  	if (unlikely(!audit_dummy_context()))
57d4657716aca8 Richard Guy Briggs  2019-01-23  374  		__audit_inode(name, dentry, aflags);
79f6530cb59e2a Jeff Layton         2013-07-08  375  }
9f45f5bf302daa Al Viro             2014-10-31  376  static inline void audit_file(struct file *file)
9f45f5bf302daa Al Viro             2014-10-31  377  {
9f45f5bf302daa Al Viro             2014-10-31  378  	if (unlikely(!audit_dummy_context()))
9f45f5bf302daa Al Viro             2014-10-31  379  		__audit_file(file);
9f45f5bf302daa Al Viro             2014-10-31  380  }
79f6530cb59e2a Jeff Layton         2013-07-08  381  static inline void audit_inode_parent_hidden(struct filename *name,
79f6530cb59e2a Jeff Layton         2013-07-08  382  						const struct dentry *dentry)
79f6530cb59e2a Jeff Layton         2013-07-08  383  {
5ac3a9c26c1cc4 Al Viro             2006-07-16  384  	if (unlikely(!audit_dummy_context()))
79f6530cb59e2a Jeff Layton         2013-07-08  385  		__audit_inode(name, dentry,
79f6530cb59e2a Jeff Layton         2013-07-08  386  				AUDIT_INODE_PARENT | AUDIT_INODE_HIDDEN);
73241ccca0f778 Amy Griffis         2005-11-03  387  }
d6335d77a7622a Andreas Gruenbacher 2015-12-24  388  static inline void audit_inode_child(struct inode *parent,
4fa6b5ecbf092c Jeff Layton         2012-10-10  389  				     const struct dentry *dentry,
4fa6b5ecbf092c Jeff Layton         2012-10-10  390  				     const unsigned char type) {
5ac3a9c26c1cc4 Al Viro             2006-07-16  391  	if (unlikely(!audit_dummy_context()))
4fa6b5ecbf092c Jeff Layton         2012-10-10  392  		__audit_inode_child(parent, dentry, type);
73241ccca0f778 Amy Griffis         2005-11-03  393  }
0a4ff8c2598b72 Steve Grubb         2007-04-19  394  void audit_core_dumps(long signr);
^1da177e4c3f41 Linus Torvalds      2005-04-16  395  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

View attachment "config" of type "text/plain" (335661 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ