All of lore.kernel.org
 help / color / mirror / Atom feed
* [pcmoore-selinux:working-io_uring 9/9] security/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds'
@ 2021-05-27  1:50 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-05-27  1:50 UTC (permalink / raw)
  To: Casey Schaufler; +Cc: kbuild-all, clang-built-linux, selinux, Paul Moore

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

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: x86_64-randconfig-r013-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=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=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/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds' [-Wmissing-prototypes]
   int smack_uring_override_creds(const struct cred *new)
       ^
   security/smack/smack_lsm.c:4702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int smack_uring_override_creds(const struct cred *new)
   ^
   static 
>> security/smack/smack_lsm.c:4739:5: warning: no previous prototype for function 'smack_uring_sqpoll' [-Wmissing-prototypes]
   int smack_uring_sqpoll(void)
       ^
   security/smack/smack_lsm.c:4739:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int smack_uring_sqpoll(void)
   ^
   static 
   2 warnings generated.


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@lists.01.org

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

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

* [pcmoore-selinux:working-io_uring 9/9] security/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds'
@ 2021-05-27  1:50 ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2021-05-27  1:50 UTC (permalink / raw)
  To: kbuild-all

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

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: x86_64-randconfig-r013-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=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=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/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds' [-Wmissing-prototypes]
   int smack_uring_override_creds(const struct cred *new)
       ^
   security/smack/smack_lsm.c:4702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int smack_uring_override_creds(const struct cred *new)
   ^
   static 
>> security/smack/smack_lsm.c:4739:5: warning: no previous prototype for function 'smack_uring_sqpoll' [-Wmissing-prototypes]
   int smack_uring_sqpoll(void)
       ^
   security/smack/smack_lsm.c:4739:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int smack_uring_sqpoll(void)
   ^
   static 
   2 warnings generated.


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(a)lists.01.org

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

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

* Re: [pcmoore-selinux:working-io_uring 9/9] security/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds'
  2021-05-27  1:50 ` kernel test robot
@ 2021-05-27 15:29   ` Paul Moore
  -1 siblings, 0 replies; 8+ messages in thread
From: Paul Moore @ 2021-05-27 15:29 UTC (permalink / raw)
  To: kernel test robot; +Cc: Casey Schaufler, kbuild-all, clang-built-linux, selinux

On Wed, May 26, 2021 at 9:51 PM kernel test robot <lkp@intel.com> wrote:
>
> 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: x86_64-randconfig-r013-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=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=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/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds' [-Wmissing-prototypes]
>    int smack_uring_override_creds(const struct cred *new)
>        ^
>    security/smack/smack_lsm.c:4702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>    int smack_uring_override_creds(const struct cred *new)
>    ^
>    static
> >> security/smack/smack_lsm.c:4739:5: warning: no previous prototype for function 'smack_uring_sqpoll' [-Wmissing-prototypes]
>    int smack_uring_sqpoll(void)
>        ^
>    security/smack/smack_lsm.c:4739:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>    int smack_uring_sqpoll(void)
>    ^
>    static
>    2 warnings generated.

FYI, Casey I took the liberty of making the Smack functions static (I
had made the same mistake with the SELinux code).

-- 
paul moore
www.paul-moore.com

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

* Re: [pcmoore-selinux:working-io_uring 9/9] security/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds'
@ 2021-05-27 15:29   ` Paul Moore
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Moore @ 2021-05-27 15:29 UTC (permalink / raw)
  To: kbuild-all

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

On Wed, May 26, 2021 at 9:51 PM kernel test robot <lkp@intel.com> wrote:
>
> 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: x86_64-randconfig-r013-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=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=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/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds' [-Wmissing-prototypes]
>    int smack_uring_override_creds(const struct cred *new)
>        ^
>    security/smack/smack_lsm.c:4702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>    int smack_uring_override_creds(const struct cred *new)
>    ^
>    static
> >> security/smack/smack_lsm.c:4739:5: warning: no previous prototype for function 'smack_uring_sqpoll' [-Wmissing-prototypes]
>    int smack_uring_sqpoll(void)
>        ^
>    security/smack/smack_lsm.c:4739:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>    int smack_uring_sqpoll(void)
>    ^
>    static
>    2 warnings generated.

FYI, Casey I took the liberty of making the Smack functions static (I
had made the same mistake with the SELinux code).

-- 
paul moore
www.paul-moore.com

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

* Re: [pcmoore-selinux:working-io_uring 9/9] security/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds'
  2021-05-27 15:29   ` Paul Moore
@ 2021-05-27 17:05     ` Casey Schaufler
  -1 siblings, 0 replies; 8+ messages in thread
From: Casey Schaufler @ 2021-05-27 17:05 UTC (permalink / raw)
  To: Paul Moore, kernel test robot
  Cc: kbuild-all, clang-built-linux, selinux, Casey Schaufler

On 5/27/2021 8:29 AM, Paul Moore wrote:
> On Wed, May 26, 2021 at 9:51 PM kernel test robot <lkp@intel.com> wrote:
>> 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: x86_64-randconfig-r013-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=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=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/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds' [-Wmissing-prototypes]
>>    int smack_uring_override_creds(const struct cred *new)
>>        ^
>>    security/smack/smack_lsm.c:4702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>>    int smack_uring_override_creds(const struct cred *new)
>>    ^
>>    static
>>>> security/smack/smack_lsm.c:4739:5: warning: no previous prototype for function 'smack_uring_sqpoll' [-Wmissing-prototypes]
>>    int smack_uring_sqpoll(void)
>>        ^
>>    security/smack/smack_lsm.c:4739:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>>    int smack_uring_sqpoll(void)
>>    ^
>>    static
>>    2 warnings generated.
> FYI, Casey I took the liberty of making the Smack functions static (I
> had made the same mistake with the SELinux code).

Thank you. If there was any doubt, the Smack function declarations
were taken directly from the SELinux versions. 


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

* Re: [pcmoore-selinux:working-io_uring 9/9] security/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds'
@ 2021-05-27 17:05     ` Casey Schaufler
  0 siblings, 0 replies; 8+ messages in thread
From: Casey Schaufler @ 2021-05-27 17:05 UTC (permalink / raw)
  To: kbuild-all

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

On 5/27/2021 8:29 AM, Paul Moore wrote:
> On Wed, May 26, 2021 at 9:51 PM kernel test robot <lkp@intel.com> wrote:
>> 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: x86_64-randconfig-r013-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=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=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/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds' [-Wmissing-prototypes]
>>    int smack_uring_override_creds(const struct cred *new)
>>        ^
>>    security/smack/smack_lsm.c:4702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>>    int smack_uring_override_creds(const struct cred *new)
>>    ^
>>    static
>>>> security/smack/smack_lsm.c:4739:5: warning: no previous prototype for function 'smack_uring_sqpoll' [-Wmissing-prototypes]
>>    int smack_uring_sqpoll(void)
>>        ^
>>    security/smack/smack_lsm.c:4739:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
>>    int smack_uring_sqpoll(void)
>>    ^
>>    static
>>    2 warnings generated.
> FYI, Casey I took the liberty of making the Smack functions static (I
> had made the same mistake with the SELinux code).

Thank you. If there was any doubt, the Smack function declarations
were taken directly from the SELinux versions. 

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

* Re: [pcmoore-selinux:working-io_uring 9/9] security/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds'
  2021-05-27 17:05     ` Casey Schaufler
@ 2021-05-27 17:53       ` Paul Moore
  -1 siblings, 0 replies; 8+ messages in thread
From: Paul Moore @ 2021-05-27 17:53 UTC (permalink / raw)
  To: Casey Schaufler; +Cc: kernel test robot, kbuild-all, clang-built-linux, selinux

On Thu, May 27, 2021 at 1:05 PM Casey Schaufler <casey@schaufler-ca.com> wrote:
>
> On 5/27/2021 8:29 AM, Paul Moore wrote:
> > On Wed, May 26, 2021 at 9:51 PM kernel test robot <lkp@intel.com> wrote:
> >> 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: x86_64-randconfig-r013-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=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=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/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds' [-Wmissing-prototypes]
> >>    int smack_uring_override_creds(const struct cred *new)
> >>        ^
> >>    security/smack/smack_lsm.c:4702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >>    int smack_uring_override_creds(const struct cred *new)
> >>    ^
> >>    static
> >>>> security/smack/smack_lsm.c:4739:5: warning: no previous prototype for function 'smack_uring_sqpoll' [-Wmissing-prototypes]
> >>    int smack_uring_sqpoll(void)
> >>        ^
> >>    security/smack/smack_lsm.c:4739:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >>    int smack_uring_sqpoll(void)
> >>    ^
> >>    static
> >>    2 warnings generated.
>
> > FYI, Casey I took the liberty of making the Smack functions static (I
> > had made the same mistake with the SELinux code).
>
> Thank you. If there was any doubt, the Smack function declarations
> were taken directly from the SELinux versions.

I figured that was the case, and for whatever it is worth I would have
done the exact same thing :)

-- 
paul moore
www.paul-moore.com

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

* Re: [pcmoore-selinux:working-io_uring 9/9] security/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds'
@ 2021-05-27 17:53       ` Paul Moore
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Moore @ 2021-05-27 17:53 UTC (permalink / raw)
  To: kbuild-all

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

On Thu, May 27, 2021 at 1:05 PM Casey Schaufler <casey@schaufler-ca.com> wrote:
>
> On 5/27/2021 8:29 AM, Paul Moore wrote:
> > On Wed, May 26, 2021 at 9:51 PM kernel test robot <lkp@intel.com> wrote:
> >> 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: x86_64-randconfig-r013-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=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=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/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds' [-Wmissing-prototypes]
> >>    int smack_uring_override_creds(const struct cred *new)
> >>        ^
> >>    security/smack/smack_lsm.c:4702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >>    int smack_uring_override_creds(const struct cred *new)
> >>    ^
> >>    static
> >>>> security/smack/smack_lsm.c:4739:5: warning: no previous prototype for function 'smack_uring_sqpoll' [-Wmissing-prototypes]
> >>    int smack_uring_sqpoll(void)
> >>        ^
> >>    security/smack/smack_lsm.c:4739:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >>    int smack_uring_sqpoll(void)
> >>    ^
> >>    static
> >>    2 warnings generated.
>
> > FYI, Casey I took the liberty of making the Smack functions static (I
> > had made the same mistake with the SELinux code).
>
> Thank you. If there was any doubt, the Smack function declarations
> were taken directly from the SELinux versions.

I figured that was the case, and for whatever it is worth I would have
done the exact same thing :)

-- 
paul moore
www.paul-moore.com

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

end of thread, other threads:[~2021-05-27 17:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27  1:50 [pcmoore-selinux:working-io_uring 9/9] security/smack/smack_lsm.c:4702:5: warning: no previous prototype for function 'smack_uring_override_creds' kernel test robot
2021-05-27  1:50 ` kernel test robot
2021-05-27 15:29 ` Paul Moore
2021-05-27 15:29   ` Paul Moore
2021-05-27 17:05   ` Casey Schaufler
2021-05-27 17:05     ` Casey Schaufler
2021-05-27 17:53     ` Paul Moore
2021-05-27 17:53       ` Paul Moore

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.