Re: [PATCH v2 3/4] Landlock: Add POSIX message queue scoping

From
kernel test robot <hidden>
Date
2026-11-03 04:56:29
Also in
linux-fsdevel, oe-kbuild-all
Reply to
Oxana Kharitonova, 2026-11-02
Hi Oxana,

kernel test robot noticed the following build errors:

[auto build test ERROR on shuah-kselftest/next]
[also build test ERROR 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-4-webprosto%40gmail.com
patch subject: [PATCH v2 3/4] Landlock: Add POSIX message queue scoping
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20261103/202611031209.bINuNiz5-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261103/202611031209.bINuNiz5-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 [off-list ref]
| Closes: https://lore.kernel.org/oe-kbuild-all/202611031209.bINuNiz5-lkp@intel.com/ (local)

All errors (new ones prefixed by >>):

   security/landlock/task.c: In function 'landlock_check_posix_mqueue_open':
quoted
security/landlock/task.c:579:18: error: 'struct landlock_request' has no member named 'other_domain_id'
     579 |                 .other_domain_id = creator_domain ? creator_domain->hierarchy->id : 0,
         |                  ^~~~~~~~~~~~~~~


vim +579 security/landlock/task.c

   528	
   529	/**
   530	 * landlock_check_posix_mqueue_open - Deny opening a POSIX message queue
   531	 * created by a task from a different (non-ancestor) domain
   532	 *
   533	 * @file: The mqueuefs file being opened.
   534	 *
   535	 * Return: -EPERM if the open must be denied, 0 otherwise.
   536	 */
   537	int landlock_check_posix_mqueue_open(struct file *const file)
   538	{
   539		const struct inode *const inode = file_inode(file);
   540		const struct landlock_cred_security *subject;
   541		struct landlock_object *object;
   542		struct landlock_domain *creator_domain = NULL;
   543		bool is_scoped;
   544		size_t handle_layer;
   545	
   546		if (!landlock_is_posix_mqueue_inode(inode))
   547			return 0;
   548	
   549		subject = landlock_get_applicable_subject(
   550			file->f_cred, posix_mqueue_scope, &handle_layer);
   551		if (!subject)
   552			return 0;
   553	
   554		rcu_read_lock();
   555		object = rcu_dereference(landlock_inode(inode)->object);
   556		/* The temporary reference protects against concurrent object release. */
   557		if (object && !refcount_inc_not_zero(&object->usage))
   558			object = NULL;
   559		rcu_read_unlock();
   560	
   561		if (object) {
   562			spin_lock(&object->lock);
   563			creator_domain = object->domain;
   564			landlock_get_domain(creator_domain);
   565			spin_unlock(&object->lock);
   566		}
   567	
   568		/* Untagged queues were created outside any Landlock domain. */
   569		is_scoped = domain_is_scoped(subject->domain, creator_domain,
   570					     LANDLOCK_SCOPE_POSIX_MSG_QUEUE);
   571		if (!is_scoped) {
   572			landlock_put_domain_deferred(creator_domain);
   573			landlock_put_object(object);
   574			return 0;
   575		}
   576	
   577		landlock_log_denial(subject, &(struct landlock_request) {
   578			.type = LANDLOCK_REQUEST_SCOPE_POSIX_MSG_QUEUE,
 > 579			.other_domain_id = creator_domain ? creator_domain->hierarchy->id : 0,
   580			.audit = {
   581				.type = LSM_AUDIT_DATA_FILE,
   582				.u.file = file,
   583			},
   584			.layer_plus_one = handle_layer + 1,
   585		});
   586		landlock_put_domain_deferred(creator_domain);
   587		landlock_put_object(object);
   588		return -EPERM;
   589	}
   590	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Thread (12 messages) 12 messages, 3 authors, last reply 2d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help