From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03CCE2248B4 for ; Wed, 22 Jul 2026 12:43:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784724221; cv=none; b=ey6sPj4y6PX8XXsAuk1GpMX4rO/lKv9AV9jQYhpZbCMgejzrKfc6zvx5GxwYsiLgK1JmE46buNCY3NVBMWM5xH+0zRXonPLZqdqNYwQLp3AMKvYW4VAvRrokhcoEiZDZqa47lL1UNWpZu2KPLoUPvWWTzeYWAfL5a74036QEwe0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784724221; c=relaxed/simple; bh=rOf3yOeoPaV8GbB0UMhEnSZ3ceLJXttM7TqE80KO8Q0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SeGjwJ+cFossHtkp90a6kL0UKdud5x/X7s1xjciwW0IkKeY9eqPtl9pzZ60u398xVIsUYN3qKQzvKtbq/N92zQrw8zmfd2TwOepazkOJdNR9uc5DWwGH2n+gURu1HYN6Ho+lrjQowDLOoKHvTVkUuCWZ41uTf1KzTmOS0oWuUwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=JiuPUqfy; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="JiuPUqfy" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-49546c690ffso40504895e9.2 for ; Wed, 22 Jul 2026 05:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784724218; x=1785329018; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=BnYnNtKTZhp3m/Ur7bxY+P2OLpfTbrGdAo3NRWVmIRE=; b=JiuPUqfyug/esm7RPvM5Pxvj55g3XEMQR4lJr4lvOeEnnyPJk5EOIKpKJKqaos1By4 WgWyjB2cxZMX8g88ZFQqzGx6vFBUfnyRwpt7t75QPhzTL1ZA/ktvK1RnEbwB76g/qn13 zpaBzHeMl/QsoEAFxivSYqUe6+uFESyso3cMl5aAPCMJXGdWSxmw5a00K/AIMgSg+zlO /bd3e6hQ+Bv+FA0MVH0TcdVK2kp9CQksqwJZVezvlkpHCWE7h/pOHDd48+pk5NIdJ9/V ctpjLsk8UuAt7sZXfzDV7o4HAIC7jKeomojjkBObkBGJbEfjNbEDHY9tnuFaOe0tBXmY 3p2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784724218; x=1785329018; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=BnYnNtKTZhp3m/Ur7bxY+P2OLpfTbrGdAo3NRWVmIRE=; b=ZBOOSZ7B4QV7ShF1p3RLCkAgekFi4h/AwMYZs3wSV5bqoBg20nN6kc7GdeOvuLZJGC mSqC94jVZ0UNU6GPjcQ6btqv9x7O/TXnTMPLeno0dWi7TjxDufsuF1CgmxeJbv76hFrg SMazVooIMQhVClyqap8eqqYo8aMbOLaossEJzUf4YQr9MXJBFlf5HeB8UZNcBm5QWYJe Wxeb9E2FwKyz+hGnatW8qPBWxrO8fIFg99PC96r9cOnoCm8MSInvawrxVQPeltTLlI+A fP+6gZpSAe7U81vLz5F/DNA6NQqn9qeBWK+qMarJZtlqfNS9Zz3g6r+M8nHu0TpROs0W zQoA== X-Forwarded-Encrypted: i=1; AHgh+RqSMaZBZqR78rrbJanVdBh+MwrNdBnosYUe1gTFfWssG0B6NU5RvE5DDvBfmLKRPUYJ0byRPHfVeMbvXOM=@vger.kernel.org X-Gm-Message-State: AOJu0YznY2Nj8GN8QAJATBlCZMwQtKTRrDdoZMf3Tgn5uB3Wg6hIP54w bR3Q5kFuUgcjmwFqTm45yWrOzj4hA2MesbL1vLkQhxR34PFM+/VYb4o/0DwXnVrbgw== X-Gm-Gg: AR+sD136MrLrD4Ys2I5p8UgeL8zUZQtMQ8dq8sqad7iupjTEFcmcJHMt+QkgghNuhlw BaWDdUbkMzovjwSNhOCdDsPGMRX88jLJSWCvgZku/kSbMrd7KawWCaN5YSYM0VI2ni1Q/FgCFcO v5HY65CKzf8cHfBsyFoUL21i/d58BI1Lpvrf8beX5VA3IELsTgbibB6rw4+cs5Vj52Kfv+hnYme 9gQgHPTqERNe8J3q+0JDcQLQ3kXVllL4J+53ymJ4DNQrvrihyNtmg3Q7WOTFHlOqQFXll/Fx3VH rBGcL3uLnQXaVQHORvzYlbKEMIkgHeJcNAhwVZiwW/qm+AzapHuTOMM3e18vU0q6Enml5S2TckU C8Khu9Az/+HcCn6poVgl0ILVvpWZ1qzp5K3xw32A2geO9M5qsZ1ILi6gGW0H0eFLDaQU8/mvwi3 C6sZ8BxXWirU6HUnnY51w2b7xsUmPO7i5NNqztqjt0XA== X-Received: by 2002:a05:600c:1d25:b0:495:6c44:633f with SMTP id 5b1f17b1804b1-4956c4463c8mr23451755e9.31.1784724217695; Wed, 22 Jul 2026 05:43:37 -0700 (PDT) Received: from google.com ([2a00:79e0:288a:8:b091:e7a3:a71:4447]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4956a4f9a11sm64818665e9.4.2026.07.22.05.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jul 2026 05:43:37 -0700 (PDT) Date: Wed, 22 Jul 2026 14:43:32 +0200 From: =?utf-8?Q?G=C3=BCnther?= Noack To: Oxana Kharitonova Cc: mic@digikod.net, paul@paul-moore.com, jmorris@namei.or, serge@hallyn.com, wangyan01@kylinos.cn, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, landlock@lists.linux.dev, webprosto@gmail.com Subject: Re: [PATCH 1/6] ipc: Move mqueue fs magic to uapi magic header Message-ID: References: <20260722122952.42149-1-oxana@cloudflare.com> <20260722122952.42149-2-oxana@cloudflare.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260722122952.42149-2-oxana@cloudflare.com> Hello! On Wed, Jul 22, 2026 at 01:29:37PM +0100, Oxana Kharitonova wrote: > Move MQUEUE_MAGIC from ipc/mqueue.c to include/uapi/linux/magic.h so > it can be shared by code outside of ipc/mqueue.c without duplicating > the constant. > > Signed-off-by: Oxana Kharitonova > --- > include/uapi/linux/magic.h | 2 ++ > ipc/mqueue.c | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h > index 4f2da935a76c..8e5d33bb1453 100644 > --- a/include/uapi/linux/magic.h > +++ b/include/uapi/linux/magic.h > @@ -78,6 +78,8 @@ > > #define V9FS_MAGIC 0x01021997 > > +#define MQUEUE_MAGIC 0x19800202 > + > #define BDEVFS_MAGIC 0x62646576 > #define DAXFS_MAGIC 0x64646178 > #define BINFMTFS_MAGIC 0x42494e4d > diff --git a/ipc/mqueue.c b/ipc/mqueue.c > index 4798b375972b..9515597d45ce 100644 > --- a/ipc/mqueue.c > +++ b/ipc/mqueue.c > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -47,7 +48,6 @@ struct mqueue_fs_context { > bool newns; /* Set if newly created ipc namespace */ > }; > > -#define MQUEUE_MAGIC 0x19800202 > #define DIRENT_SIZE 20 > #define FILENT_SIZE 80 > > -- > 2.50.1 (Apple Git-155) > The only reference to MQUEUE_MAGIC that I find in your patchset is from Landlock's kernel code -- For a value that gets serialized to disk, like for the other file systems, I think there is actually a legitimate use case for userspace to use that value, when dealing with raw images? But that's not the case here, I think? Should this live in include/linux/ipc_namespace.h instead? Or even be exposed as a helper function that lets you check whether an inode is referring to an mqueue? —Günther