[pcmoore-selinux:working-io_uring 9/9] security/smack/smack_lsm.c:4702:5: warning: no previous prototype for 'smack_uring_override_creds'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git working-io_uring
head:   1f25193a3f5495eefbc9826b1de1a008a2439351
commit: 1f25193a3f5495eefbc9826b1de1a008a2439351 [9/9] Smack: Brutalist io_uring support with debug
config: arm-randconfig-r023-20210526 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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/pcmoore/selinux.git/commit/?id=1f25193a3f5495eefbc9826b1de1a008a2439351
        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 1f25193a3f5495eefbc9826b1de1a008a2439351
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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

All warnings (new ones prefixed by >>):

>> security/smack/smack_lsm.c:4702:5: warning: no previous prototype for 'smack_uring_override_creds' [-Wmissing-prototypes]
    4702 | int smack_uring_override_creds(const struct cred *new)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> security/smack/smack_lsm.c:4739:5: warning: no previous prototype for 'smack_uring_sqpoll' [-Wmissing-prototypes]
    4739 | int smack_uring_sqpoll(void)
         |     ^~~~~~~~~~~~~~~~~~


vim +/smack_uring_override_creds +4702 security/smack/smack_lsm.c

  4693	
  4694	#ifdef CONFIG_IO_URING
  4695	/**
  4696	 * smack_uring_override_creds - Is io_uring cred override allowed?
  4697	 * @new: the target creds
  4698	 *
  4699	 * Check to see if the current task is allowed to override it's credentials
  4700	 * to service an io_uring operation.
  4701	 */
> 4702	int smack_uring_override_creds(const struct cred *new)
  4703	{
  4704		struct task_smack *tsp = smack_cred(current_cred());
  4705		struct task_smack *nsp = smack_cred(new);
  4706	
  4707	#if 1
  4708		if (tsp->smk_task == nsp->smk_task)
  4709			pr_info("%s: Smack matches %s\n", __func__,
  4710				tsp->smk_task->smk_known);
  4711		else
  4712			pr_info("%s: Smack override check %s to %s\n", __func__,
  4713				tsp->smk_task->smk_known, nsp->smk_task->smk_known);
  4714	#endif
  4715		/*
  4716		 * Allow the degenerate case where the new Smack value is
  4717		 * the same as the current Smack value.
  4718		 */
  4719		if (tsp->smk_task == nsp->smk_task)
  4720			return 0;
  4721	
  4722	#if 1
  4723		pr_info("%s: Smack sqpoll %s\n", __func__,
  4724			smack_privileged_cred(CAP_MAC_OVERRIDE, current_cred()) ?
  4725			"ok by Smack" : "disallowed (No CAP_MAC_OVERRIDE)");
  4726	#endif
  4727		if (smack_privileged_cred(CAP_MAC_OVERRIDE, current_cred()))
  4728			return 0;
  4729	
  4730		return -EPERM;
  4731	}
  4732	
  4733	/**
  4734	 * smack_uring_sqpoll - check if a io_uring polling thread can be created
  4735	 *
  4736	 * Check to see if the current task is allowed to create a new io_uring
  4737	 * kernel polling thread.
  4738	 */
> 4739	int smack_uring_sqpoll(void)
  4740	{
  4741	#if 1
  4742		pr_info("%s: Smack new ring %s\n", __func__,
  4743			smack_privileged_cred(CAP_MAC_ADMIN, current_cred()) ?
  4744			"ok by Smack" : "disallowed (No CAP_MAC_ADMIN)");
  4745	#endif
  4746		if (smack_privileged_cred(CAP_MAC_ADMIN, current_cred()))
  4747			return 0;
  4748	
  4749		return -EPERM;
  4750	}
  4751	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux