All of lore.kernel.org
 help / color / mirror / Atom feed
* [pcmoore-selinux:working-io_uring 8/9] security/selinux/hooks.c:7146:5: warning: no previous prototype for function 'selinux_uring_override_creds'
@ 2021-05-26 23:07 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-05-26 23:07 UTC (permalink / raw)
  To: Paul Moore; +Cc: kbuild-all, clang-built-linux, selinux

[-- Attachment #1: Type: text/plain, Size: 3803 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git working-io_uring
head:   1f25193a3f5495eefbc9826b1de1a008a2439351
commit: b403f1cbca9c1e81942995229eccf775b7acf092 [8/9] selinux: add support for the io_uring access controls
config: x86_64-randconfig-a012-20210526 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 99155e913e9bad5f7f8a247f8bb3a3ff3da74af1)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git/commit/?id=b403f1cbca9c1e81942995229eccf775b7acf092
        git remote add pcmoore-selinux https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git
        git fetch --no-tags pcmoore-selinux working-io_uring
        git checkout b403f1cbca9c1e81942995229eccf775b7acf092
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> security/selinux/hooks.c:7146:5: warning: no previous prototype for function 'selinux_uring_override_creds' [-Wmissing-prototypes]
   int selinux_uring_override_creds(const struct cred *new)
       ^
   security/selinux/hooks.c:7146:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int selinux_uring_override_creds(const struct cred *new)
   ^
   static 
>> security/selinux/hooks.c:7166:5: warning: no previous prototype for function 'selinux_uring_sqpoll' [-Wmissing-prototypes]
   int selinux_uring_sqpoll(void)
       ^
   security/selinux/hooks.c:7166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int selinux_uring_sqpoll(void)
   ^
   static 
   2 warnings generated.


vim +/selinux_uring_override_creds +7146 security/selinux/hooks.c

  7138	
  7139	/**
  7140	 * selinux_uring_override_creds - check the requested cred override
  7141	 * @new: the target creds
  7142	 *
  7143	 * Check to see if the current task is allowed to override it's credentials
  7144	 * to service an io_uring operation.
  7145	 */
> 7146	int selinux_uring_override_creds(const struct cred *new)
  7147	{
  7148	#if 1
  7149		/* XXX - debug only code, remove before committing */
  7150		pr_err("PMD: selinux_uring_override_creds()\n");
  7151		pr_err("PMD: >>> CURRENT\n");
  7152		dump_creds(current_cred());
  7153		pr_err("PMD: >>> NEW\n");
  7154		dump_creds(new);
  7155	#endif
  7156		return avc_has_perm(&selinux_state, current_sid(), cred_sid(new),
  7157				    SECCLASS_IO_URING, IO_URING__OVERRIDE_CREDS, NULL);
  7158	}
  7159	
  7160	/**
  7161	 * selinux_uring_sqpoll - check if a io_uring polling thread can be created
  7162	 *
  7163	 * Check to see if the current task is allowed to create a new io_uring
  7164	 * kernel polling thread.
  7165	 */
> 7166	int selinux_uring_sqpoll(void)
  7167	{
  7168		int sid = current_sid();
  7169	#if 1
  7170		/* XXX - debug only code, remove before committing */
  7171		pr_err("PMD: selinux_uring_sqpoll()\n");
  7172		pr_err("PMD: >>> CURRENT\n");
  7173		dump_creds(current_cred());
  7174	#endif
  7175		return avc_has_perm(&selinux_state, sid, sid,
  7176				    SECCLASS_IO_URING, IO_URING__SQPOLL, NULL);
  7177	}
  7178	#endif /* CONFIG_IO_URING */
  7179	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 43559 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pcmoore-selinux:working-io_uring 8/9] security/selinux/hooks.c:7146:5: warning: no previous prototype for function 'selinux_uring_override_creds'
@ 2021-05-26 23:07 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-05-26 23:07 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3892 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git working-io_uring
head:   1f25193a3f5495eefbc9826b1de1a008a2439351
commit: b403f1cbca9c1e81942995229eccf775b7acf092 [8/9] selinux: add support for the io_uring access controls
config: x86_64-randconfig-a012-20210526 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 99155e913e9bad5f7f8a247f8bb3a3ff3da74af1)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git/commit/?id=b403f1cbca9c1e81942995229eccf775b7acf092
        git remote add pcmoore-selinux https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git
        git fetch --no-tags pcmoore-selinux working-io_uring
        git checkout b403f1cbca9c1e81942995229eccf775b7acf092
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

>> security/selinux/hooks.c:7146:5: warning: no previous prototype for function 'selinux_uring_override_creds' [-Wmissing-prototypes]
   int selinux_uring_override_creds(const struct cred *new)
       ^
   security/selinux/hooks.c:7146:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int selinux_uring_override_creds(const struct cred *new)
   ^
   static 
>> security/selinux/hooks.c:7166:5: warning: no previous prototype for function 'selinux_uring_sqpoll' [-Wmissing-prototypes]
   int selinux_uring_sqpoll(void)
       ^
   security/selinux/hooks.c:7166:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int selinux_uring_sqpoll(void)
   ^
   static 
   2 warnings generated.


vim +/selinux_uring_override_creds +7146 security/selinux/hooks.c

  7138	
  7139	/**
  7140	 * selinux_uring_override_creds - check the requested cred override
  7141	 * @new: the target creds
  7142	 *
  7143	 * Check to see if the current task is allowed to override it's credentials
  7144	 * to service an io_uring operation.
  7145	 */
> 7146	int selinux_uring_override_creds(const struct cred *new)
  7147	{
  7148	#if 1
  7149		/* XXX - debug only code, remove before committing */
  7150		pr_err("PMD: selinux_uring_override_creds()\n");
  7151		pr_err("PMD: >>> CURRENT\n");
  7152		dump_creds(current_cred());
  7153		pr_err("PMD: >>> NEW\n");
  7154		dump_creds(new);
  7155	#endif
  7156		return avc_has_perm(&selinux_state, current_sid(), cred_sid(new),
  7157				    SECCLASS_IO_URING, IO_URING__OVERRIDE_CREDS, NULL);
  7158	}
  7159	
  7160	/**
  7161	 * selinux_uring_sqpoll - check if a io_uring polling thread can be created
  7162	 *
  7163	 * Check to see if the current task is allowed to create a new io_uring
  7164	 * kernel polling thread.
  7165	 */
> 7166	int selinux_uring_sqpoll(void)
  7167	{
  7168		int sid = current_sid();
  7169	#if 1
  7170		/* XXX - debug only code, remove before committing */
  7171		pr_err("PMD: selinux_uring_sqpoll()\n");
  7172		pr_err("PMD: >>> CURRENT\n");
  7173		dump_creds(current_cred());
  7174	#endif
  7175		return avc_has_perm(&selinux_state, sid, sid,
  7176				    SECCLASS_IO_URING, IO_URING__SQPOLL, NULL);
  7177	}
  7178	#endif /* CONFIG_IO_URING */
  7179	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 43559 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-26 23:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 23:07 [pcmoore-selinux:working-io_uring 8/9] security/selinux/hooks.c:7146:5: warning: no previous prototype for function 'selinux_uring_override_creds' kernel test robot
2021-05-26 23:07 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.