From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796443350; b=grJhQ2PACNlzGtSNy468mG6E8mVeKjC+Kadniz9zVJUOSfMhBDQ3Ffm6yZ/1y/Qx7f5B 0QMEfJS+9OLVLfHEXwwP0B7sKyeeDfVPtSVITn17WhhbfRJi9KwoOqxfBJJRKAgWAJCO4 QEbclUKe31vDz53CaDCSrfP4jFW92NiaQLMmRrmIRc5PsLs0D4xVabLEIQx7uIfdIP02q aX+kiosmHSvXgVOR7AAedjuG6RNUczEi5joEJZ6KsXTx1GNQ5awUiiUSI/VqMdcwMmgYH 7Gy/Hv/6d7bkJpwVUBUbNBZ3zNnLajAlmJIqE955QqHaPGSeF2BIZ7oZsmSqqUvrmzA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796443350; h=Received:DKIM-Signature:Content-Type:MIME-Version:Message-Id: In-Reply-To:References:Subject:From:To:Cc:Date; bh=M08IlqyETf7rzIglDC/pDdY3CJI2WfWIQmF5F71I0SM=; b=F30kQzhz5MrdtRDFjmsIjOpKU68QYV15z8gPPxi6Xw6K/sYIlP88rY2rHwxMMYitUzst FanZBBSCFoVJkYIFGdF6x8sVTnr6dO7ijvNzUV1OuzE1h6TzI1iIKNjpHLPpgEqPsP+JA 8xjtbW53XoqHP0n1Ilx7ZNo7FjaxdRecOe3IQhXzlRtB8BXraGcrMyBgeqoV6mHJnmeEx P8dMOyuiLklCTu/AO4K18p2ufAJZQIr2x8Y5B4gzVIVdbSxbF2H6RLrJq2ECEY5eEwL96 nLtkVDJjRRvQwQvcC3kwr07hjAqqNzw+mtNosjgrlzgWgOacx2H1DIKoVVCsh1/8Gnw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l9BdDFtH; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48DE0606A333; Sat, 5 Dec 2026 04:02:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=l9BdDFtH Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87CB31F00936; Sat, 5 Dec 2026 04:02:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796443350; bh=M08IlqyETf7rzIglDC/pDdY3CJI2WfWIQmF5F71I0SM=; h=In-Reply-To:References:Subject:From:To:Cc:Date; b=l9BdDFtHLkha+vX8O2NzYdQUcTJ7MP+0ZsB3A+k3cbI3f6JV9BWIpIgE8CJoQAL9Z QzWGYd6/H4el9yN9FcXT065SPH0JaJ+k0HNXWFmPUFMmJwjgjIB1TDE/f106uWjHMO hRp2XWDXTo/xkgCQ6YVBJQiIFZJrP2UyKkHkfjmEtXL4RmTCBGbdvhWN9ZCUyPLgzf UODXvTg7GMvBd/lsG7VnIbZHEFJChxq1KRavz8dbze5tXRbTzg69QO/zgjLeTVwny7 135PK0ZWuntVIbBP003w84k5ssydzIx7mdcqAcvbfi2zM1mR1IMCeKDCvEy5T16KFs vPPdIBl6Ka5mw== Content-Type: multipart/mixed; boundary="===============2596976776024200306==" X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-Id: In-Reply-To: <20261205032633.1702772-22-jarkko@kernel.org> References: <20261205032633.1702772-22-jarkko@kernel.org> Subject: Re: [RFC PATCH v10 21/28] ipc/mqueue: Implement ->set_run() fs_context operation From: bot+bpf-ci@kernel.org To: jarkko@kernel.org,fsdevel@vger.kernel.org Cc: jarkko@kernel.org,bpf@vger.kernel.org,containers@lists.linux.dev,linux-api@vger.kernel.org,linux-arch@vger.kernel.org,linux-doc@vger.kernel.org,linux-fsdevel@vger.kernel.org,linux-integrity@vger.kernel.org,linux-kernel@vger.kernel.org,linux-kselftest@vger.kernel.org,linux-mm@kvack.org,linux-security-module@vger.kernel.org,aleksa@amutable.com,alex@amutable.com,viro@zeniv.linux.org.uk,ast@kernel.org,akpm@linux-foundation.org,andrii@kernel.org,luto@amacapital.net,arnd@arndb.de,baolin.wang@linux.alibaba.com,bsegall@google.com,brauner@kernel.org,daniel@iogearbox.net,david@kernel.org,dhowells@redhat.com,dwmw2@infradead.org,dave@stgolabs.net,dietmar.eggemann@arm.com,eddyz87@gmail.com,emil@etsalapatis.com,ebiggers@kernel.org,georgia.garcia@canonical.com,giuseppe@scrivano.org,gnoack@google.com,hughd@google.com,ihor.solodrai@linux.dev,mingo@redhat.com,jmorris@namei.org,jack@suse.cz,jgg@nvidia.com,jlayton@kernel.org,jolsa@kernel.org,john.johansen@canonical.com,corbet@lwn.net,josef@toxicpand a.com,juri.lelli@redhat.com,kees@kernel.org,kprateek.nayak@amd.com,kpsingh@kernel.org,memxor@gmail.com,lennart@poettering.net,liam@infradead.org,manfred@colorfullife.com,martin.lau@linux.dev,matt@bobrowski.net,mgorman@suse.de,mhocko@suse.com,mic@digikod.net,rppt@kernel.org,neal@gompa.dev,oleg@redhat.com,paul@paul-moore.com,ptikhomirov@virtuozzo.com,peterz@infradead.org,rdunlap@infradead.org,serge@hallyn.com,sergeh@kernel.org,skhan@linuxfoundation.org,song@kernel.org,stephen.smalley.work@gmail.com,rostedt@goodmis.org,vschneid@redhat.com,vincent.guittot@linaro.org,yonghong.song@linux.dev,zygmunt.krynicki@canonical.com,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev Date: Sat, 5 Dec 2026 04:02:23 +0000 (UTC) --===============2596976776024200306== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit > ipc/mqueue: Implement ->set_run() fs_context operation TL;DR: Commit message only: mqueue_init_fs_context() now skips IPC namespace capture on reconfigure (fspick, remount) without saying so, and the new comment is confusing. Not a bug. > ipc/mqueue: Implement ->set_run() fs_context operation > > mqueue_init_fs_context() captures current->nsproxy->ipc_ns and resets > fc->user_ns to ctx->ipc_ns->user_ns, overriding the user namespace > delegated by FSCONFIG_SET_RUN and leaving the context bound to the > caller's IPC namespace. > Wire up mqueue_set_run() to switch ctx->ipc_ns to the target > run's IPC namespace, update fc->user_ns to match, and mark mqueue > with FS_RUN_MOUNT. > Co-developed-by: David Howells > Signed-off-by: David Howells > Signed-off-by: Jarkko Sakkinen > diff --git a/ipc/mqueue.c b/ipc/mqueue.c > --- a/ipc/mqueue.c > +++ b/ipc/mqueue.c [ ... ] > @@ -453,9 +468,16 @@ static int mqueue_init_fs_context(struct fs_context *fc) > if (!ctx) > return -ENOMEM; > > - ctx->ipc_ns = get_ipc_ns(current->nsproxy->ipc_ns); > - put_user_ns(fc->user_ns); > - fc->user_ns = get_user_ns(ctx->ipc_ns->user_ns); > + /* > + * Reconfiguration keeps the superblock's user namespace and does not > + * use ctx->ipc_ns, which put_ipc_ns() could be tearing down via > + * sb->s_fs_info. > + */ > + if (fc->purpose != FS_CONTEXT_FOR_RECONFIGURE) { > + ctx->ipc_ns = get_ipc_ns(current->nsproxy->ipc_ns); > + put_user_ns(fc->user_ns); > + fc->user_ns = get_user_ns(ctx->ipc_ns->user_ns); > + } > fc->fs_private = ctx; > fc->ops = &mqueue_fs_context_ops; > return 0; This isn't a bug, but the changelog only describes the new ->set_run() operation and the FS_RUN_MOUNT flag. It doesn't mention that mqueue_init_fs_context() now skips capturing the IPC namespace and overriding fc->user_ns when fc->purpose == FS_CONTEXT_FOR_RECONFIGURE. That change applies to every fspick() and remount of mqueue, and to the re-initialisation done after fsmount(), not only to run-bound contexts. For those paths ctx->ipc_ns is now NULL, and fc->user_ns stays as the superblock's user namespace. The new comment is also hard to follow. It says ctx->ipc_ns is something put_ipc_ns() "could be tearing down via sb->s_fs_info", but neither the old nor the new code reads sb->s_fs_info here. Could the changelog say why the FS_CONTEXT_FOR_RECONFIGURE case is now skipped, and could the comment be reworded to say that, unlike proc, mqueue does not take the superblock's IPC namespace from sb->s_fs_info? Or would this hunk be better as a separate patch? --- AI reviewed your patch. Please fix the bug or email reply why it's not a bug. See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md CI run summary: https://github.com/kernel-patches/bpf/actions/runs/47474652355 --===============2596976776024200306==--