public inbox for linux-security-module@vger.kernel.org
 help / color / mirror / Atom feed
From: Philip Li <philip.li@intel.com>
To: Nikolay Borisov <nik.borisov@suse.com>
Cc: kernel test robot <lkp@intel.com>,
	<linux-security-module@vger.kernel.org>, <llvm@lists.linux.dev>,
	<oe-kbuild-all@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	<paul@paul-moore.com>, <serge@hallyn.com>, <jmorris@namei.org>,
	<dan.j.williams@intel.com>
Subject: Re: [PATCH v2 2/3] lockdown/kunit: Introduce kunit tests
Date: Wed, 30 Jul 2025 07:28:19 +0800	[thread overview]
Message-ID: <aIlZE8i/XzSFWS2U@rli9-mobl> (raw)
In-Reply-To: <c2754ac3-28d0-4c6c-bd2d-0dcc9ca66b77@suse.com>

On Tue, Jul 29, 2025 at 10:46:48AM +0300, Nikolay Borisov wrote:
> 
> 
> On 29.07.25 г. 1:04 ч., kernel test robot wrote:
> > Hi Nikolay,
> > 
> > kernel test robot noticed the following build warnings:
> > 
> > [auto build test WARNING on linus/master]
> > [also build test WARNING on v6.16 next-20250728]
> > [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/Nikolay-Borisov/lockdown-Switch-implementation-to-using-bitmap/20250728-191807
> > base:   linus/master
> > patch link:    https://lore.kernel.org/r/20250728111517.134116-3-nik.borisov%40suse.com
> > patch subject: [PATCH v2 2/3] lockdown/kunit: Introduce kunit tests
> > config: arm-randconfig-004-20250729 (https://download.01.org/0day-ci/archive/20250729/202507290540.9IANrMED-lkp@intel.com/config)
> > compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 1b4db78d2eaa070b3f364a2d2b2b826a5439b892)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250729/202507290540.9IANrMED-lkp@intel.com/reproduce)
> > 
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202507290540.9IANrMED-lkp@intel.com/
> > 
> > All warnings (new ones prefixed by >>):
> > 
> > > > security/lockdown/lockdown.c:31:5: warning: no previous prototype for function 'lock_kernel_down' [-Wmissing-prototypes]
> >        31 | int lock_kernel_down(const char *where, enum lockdown_reason level)
> >           |     ^
> >     security/lockdown/lockdown.c:31:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> >        31 | int lock_kernel_down(const char *where, enum lockdown_reason level)
> >           | ^
> >           | static
> >     1 warning generated.
> 
> 
> That's a false positive, since the function is exported only for KUNIT case,
> what's the correct way to make testbot ignore it ?

thanks for the info, i will configure the bot to ignore this firstly, and
later to check whether there's any pattern for more general ignore. Sorry
for the noise.

> > 
> > 
> > vim +/lock_kernel_down +31 security/lockdown/lockdown.c
> > 
> >      20	
> >      21	static const enum lockdown_reason lockdown_levels[] = {LOCKDOWN_NONE,
> >      22							 LOCKDOWN_INTEGRITY_MAX,
> >      23							 LOCKDOWN_CONFIDENTIALITY_MAX};
> >      24	
> >      25	/*
> >      26	 * Put the kernel into lock-down mode.
> >      27	 */
> >      28	#if !IS_ENABLED(CONFIG_KUNIT)
> >      29	static
> >      30	#endif
> >    > 31	int lock_kernel_down(const char *where, enum lockdown_reason level)
> >      32	{
> >      33	
> >      34		if (level > LOCKDOWN_CONFIDENTIALITY_MAX)
> >      35			return -EINVAL;
> >      36	
> >      37		if (level == LOCKDOWN_INTEGRITY_MAX || level == LOCKDOWN_CONFIDENTIALITY_MAX)
> >      38			bitmap_set(kernel_locked_down, 1, level);
> >      39		else
> >      40			bitmap_set(kernel_locked_down, level, 1);
> >      41	
> >      42		pr_notice("Kernel is locked down from %s; see man kernel_lockdown.7\n",
> >      43			  where);
> >      44		return 0;
> >      45	}
> >      46	
> > 
> 

  reply	other threads:[~2025-07-29 23:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28 11:15 [PATCH v2 0/3] Allow individual features to be locked down Nikolay Borisov
2025-07-28 11:15 ` [PATCH v2 1/3] lockdown: Switch implementation to using bitmap Nikolay Borisov
2025-07-28 12:47   ` Serge E. Hallyn
2025-07-28 13:21   ` Serge E. Hallyn
2025-08-05 22:18   ` dan.j.williams
2025-07-28 11:15 ` [PATCH v2 2/3] lockdown/kunit: Introduce kunit tests Nikolay Borisov
2025-07-28 12:49   ` Serge E. Hallyn
2025-07-28 22:04   ` kernel test robot
2025-07-29  7:46     ` Nikolay Borisov
2025-07-29 23:28       ` Philip Li [this message]
2025-07-29  7:30   ` kernel test robot
2025-07-28 11:15 ` [PATCH v2 3/3] lockdown: Use snprintf in lockdown_read Nikolay Borisov
2025-07-28 12:39   ` Serge E. Hallyn
2025-08-05  7:56     ` Nikolay Borisov
2025-08-05 22:30   ` dan.j.williams
2025-07-29 12:16 ` [PATCH v2 0/3] Allow individual features to be locked down Nicolas Bouchinet
2025-07-29 12:25   ` Nikolay Borisov
2025-08-05  6:57     ` xiujianfeng
2025-08-05  8:03       ` Nikolay Borisov
2025-08-05 23:28       ` dan.j.williams
2025-08-14  8:59     ` Nicolas Bouchinet
2025-08-14 10:02       ` Nikolay Borisov
2025-08-14 10:51         ` Nicolas Bouchinet
2025-08-05 23:43   ` dan.j.williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aIlZE8i/XzSFWS2U@rli9-mobl \
    --to=philip.li@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nik.borisov@suse.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox