[PATCH] security: Add KUnit tests for rootid_owns_currentns()
kernel test robot
lkp at intel.com
Tue Nov 11 06:52:54 UTC 2025
Hi Ryan,
kernel test robot noticed the following build errors:
[auto build test ERROR on pcmoore-selinux/next]
[also build test ERROR on linus/master v6.18-rc5 next-20251110]
[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/Ryan-Foster/security-Add-KUnit-tests-for-rootid_owns_currentns/20251110-223824
base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next
patch link: https://lore.kernel.org/r/20251110143748.4144288-1-foster.ryan.r%40gmail.com
patch subject: [PATCH] security: Add KUnit tests for rootid_owns_currentns()
config: mips-randconfig-r053-20251111 (https://download.01.org/0day-ci/archive/20251111/202511111459.1ToyUP5p-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251111/202511111459.1ToyUP5p-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/202511111459.1ToyUP5p-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> security/commoncap_test.c:23:3: error: conflicting types for 'vfsuid_t'
} vfsuid_t;
^~~~~~~~
In file included from include/linux/fs.h:45,
from arch/mips/include/asm/elf.h:12,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/kunit/test.h:24,
from security/commoncap_test.c:9:
include/linux/mnt_idmapping.h:17:3: note: previous declaration of 'vfsuid_t' was here
} vfsuid_t;
^~~~~~~~
>> security/commoncap_test.c:26:21: error: conflicting types for '__vfsuid_val'
static inline uid_t __vfsuid_val(vfsuid_t uid)
^~~~~~~~~~~~
In file included from include/linux/fs.h:45,
from arch/mips/include/asm/elf.h:12,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/kunit/test.h:24,
from security/commoncap_test.c:9:
include/linux/mnt_idmapping.h:34:21: note: previous definition of '__vfsuid_val' was here
static inline uid_t __vfsuid_val(vfsuid_t uid)
^~~~~~~~~~~~
>> security/commoncap_test.c:31: warning: "VFSUIDT_INIT" redefined
#define VFSUIDT_INIT(val) ((vfsuid_t){ __kuid_val(val) })
In file included from include/linux/fs.h:45,
from arch/mips/include/asm/elf.h:12,
from include/linux/elf.h:6,
from include/linux/module.h:20,
from include/kunit/test.h:24,
from security/commoncap_test.c:9:
include/linux/mnt_idmapping.h:109: note: this is the location of the previous definition
#define VFSUIDT_INIT(val) (vfsuid_t){ __kuid_val(val) }
vim +/vfsuid_t +23 security/commoncap_test.c
18
19 /* Forward declare the minimal types we need - match the actual kernel definitions */
20 struct mnt_idmap;
21 typedef struct {
22 uid_t val;
> 23 } vfsuid_t;
24
25 /* Minimal macros we need - match kernel definitions from mnt_idmapping.h */
> 26 static inline uid_t __vfsuid_val(vfsuid_t uid)
27 {
28 return uid.val;
29 }
30
> 31 #define VFSUIDT_INIT(val) ((vfsuid_t){ __kuid_val(val) })
32 #define INVALID_VFSUID VFSUIDT_INIT(INVALID_UID)
33
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linux-security-module-archive
mailing list