[PATCH v2 2/3] lockdown/kunit: Introduce kunit tests

kernel test robot lkp at intel.com
Mon Jul 28 22:04:45 UTC 2025


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 at 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.


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	

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



More information about the Linux-security-module-archive mailing list