[PATCH v2 2/4] Landlock: Enforce MAKE_REG for POSIX message queue creation

kernel test robot lkp at intel.com
Tue Nov 3 02:42:35 UTC 2026


Hi Oxana,

kernel test robot noticed the following build warnings:

[auto build test WARNING on shuah-kselftest/next]
[also build test WARNING on linus/master next-20261030]
[cannot apply to shuah-kselftest/fixes trace/for-next brauner-vfs/vfs.all v7.3]
[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/Oxana-Kharitonova/ipc-Move-MQUEUE_MAGIC-to-a-shared-header/20261102-144557
base:   https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git next
patch link:    https://lore.kernel.org/r/20261102144708.920232-3-webprosto%40gmail.com
patch subject: [PATCH v2 2/4] Landlock: Enforce MAKE_REG for POSIX message queue creation
config: s390-defconfig (https://download.01.org/0day-ci/archive/20261103/202611031036.3r5EL9TN-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261103/202611031036.3r5EL9TN-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/202611031036.3r5EL9TN-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> security/landlock/fs.c:1686:51: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
    1686 |                              struct dentry *const dentry, const umode_t)
         |                                                                        ^
   security/landlock/fs.c:2117:30: error: incompatible function pointer types initializing 'int (*)(const struct mnt_idmap *, struct inode *, struct dentry *, umode_t)' (aka 'int (*)(const struct mnt_idmap *, struct inode *, struct dentry *, unsigned short)') with an expression of type 'int (struct inode *const, struct dentry *const, const umode_t)' (aka 'int (struct inode *const, struct dentry *const, const unsigned short)') [-Wincompatible-function-pointer-types]
    2117 |         LSM_HOOK_INIT(inode_create, hook_inode_create),
         |                                     ^~~~~~~~~~~~~~~~~
   include/linux/lsm_hooks.h:141:21: note: expanded from macro 'LSM_HOOK_INIT'
     141 |                 .hook = { .NAME = HOOK }                \
         |                                   ^~~~
   1 warning and 1 error generated.


vim +1686 security/landlock/fs.c

  1679	
  1680	/*
  1681	 * Unlike regular file creation, mq_open(2) calls vfs_mkobj() directly and
  1682	 * therefore does not trigger the path_mknod hook.  Use the mqueuefs mount
  1683	 * associated with the current IPC namespace to recover the parent path.
  1684	 */
  1685	static int hook_inode_create(struct inode *const dir,
> 1686				     struct dentry *const dentry, const umode_t)
  1687	{
  1688		struct ipc_namespace *ipc_ns;
  1689		struct vfsmount *mnt;
  1690		struct path parent;
  1691	
  1692		if (!landlock_is_posix_mqueue_fs(dir))
  1693			return 0;
  1694	
  1695		if (!current->nsproxy)
  1696			return 0;
  1697		ipc_ns = current->nsproxy->ipc_ns;
  1698		if (!ipc_ns)
  1699			return 0;
  1700		mnt = ipc_ns->mq_mnt;
  1701		if (WARN_ON_ONCE(!mnt || mnt->mnt_sb != dir->i_sb))
  1702			return 0;
  1703	
  1704		parent.mnt = mnt;
  1705		parent.dentry = dentry->d_parent;
  1706		return current_check_access_path(&parent, LANDLOCK_ACCESS_FS_MAKE_REG);
  1707	}
  1708	

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



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