Article View: linux.kernel.netdev
Article #15775Re: [PATCH RFC 20/41] apparmor: use fc_init_pseudo() for apparmorfs
From: Alexander Mikhalitsyn
Date: Fri, 13 Nov 2026 12:38
Date: Fri, 13 Nov 2026 12:38
38 lines
12844 bytes
12844 bytes
On Tue, 2026-11-10 at 10:14 +0100, Christian Brauner wrote:
> Initialize apparmorfs as a pseudo filesystem. This raises SB_I_PSEUDO
> and
> also SB_I_NOEXEC and SB_I_NODEV. apparmorfs never holds executables
> or
> device nodes.
>
> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Reviewed-by: Alexander Mikhalitsyn <alex@amutable.com>
> ---
> security/apparmor/apparmorfs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/security/apparmor/apparmorfs.c
> b/security/apparmor/apparmorfs.c
> index a99366467217..351ea3a7120e 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -21,6 +21,7 @@
> #include <linux/rcupdate.h>
> #include <linux/fs.h>
> #include <linux/fs_context.h>
> +#include <linux/pseudo_fs.h>
> #include <linux/poll.h>
> #include <linux/zstd.h>
> #include <linux/string.h>
> @@ -263,6 +264,7 @@ static const struct fs_context_operations
> apparmorfs_context_ops = {
>
> static int apparmorfs_init_fs_context(struct fs_context *fc)
> {
> + fc_init_pseudo(fc);
> fc->ops = &apparmorfs_context_ops;
> return 0;
> }
Technical Details
Message-ID:
<28a33fa649dcaae2eadcc934ec49fa591ec1c283.camel@amutable.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362639-linux-kernel-netdev=dewy.ruReferences:
<20261110-work-loop-pseudo-v1-0-4c998976c6c7@kernel.org> <20261110-work-loop-pseudo-v1-20-4c998976c6c7@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362639-linux-kernel-netdev=dewy.ru From: alex@amutable.com (Alexander Mikhalitsyn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH RFC 20/41] apparmor: use fc_init_pseudo() for apparmorfs Date: Fri, 13 Nov 2026 13:38:25 +0100 Organization: Usenet Network Message-ID: <28a33fa649dcaae2eadcc934ec49fa591ec1c283.camel@amutable.com> References: <20261110-work-loop-pseudo-v1-0-4c998976c6c7@kernel.org> <20261110-work-loop-pseudo-v1-20-4c998976c6c7@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="1361206"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:1lz3j/ncFSozwMIJG3oXx2ZeBhs= sha256:f/zDwBVFbfOM/gNF/thNAVB3Type4HPQ9VyHvSacmH8= sha1:PJwh7sH+1+7Ob+3/53yUY3FCnNI= sha256:msUb5SMORYtdwNUahq8R5PQNovtv+yvfLJmfETDg/M8= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 94594114565; Fri, 13 Nov 2026 17:30:56 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.951 X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=amutable-com.20260707.gappssmtp.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y0yuLV1Ls6lU; Fri, 13 Nov 2026 17:30:53 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-362639-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=amutable.com X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 4AC2C11452D; Fri, 13 Nov 2026 17:30:45 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id EE18E1C67C4; Fri, 13 Nov 2026 12:38:48 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794573511; b=CfQSyDl6fnsHjp2Dg6sJc0Utyh6oQd3XfvLi8Prh9yDGxkbVlTBn45njbVeQgD4Sz6el nyhxKQL5oemkf2A5IoSraHcHhfgxdEiUtDF9ChrejFD4cti0bx/ydbH1OEZmDKLP9aMcN UXGmoImaDm/lohw+g/D4aoSAayp4t9Bt5AoY72OLUY+BkUXtAA9d3MYfdzTLJTLZT29TQ Tpboou3iJZlcMLfieyksX+7zFRSssGbNIhusOjzpaxojhhw9oBqvF39G6I5UkdSIWfsVr Dammwhv+ruIioHt+OjAwlffu1F5r0JWXr8uwxi1Q07Pgf1TFvHrfmfQ8aavTS8gXAUw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794573511; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State: X-Gm-Gg:X-Received:Received:Message-ID:Subject:From:To:Cc:Date: In-Reply-To:References:Content-Type:Content-Transfer-Encoding: User-Agent:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version; bh=Ny+1veWg8VD0eIDxFJ1X48Kguf5Oe9PbJZTpbcgMiOk=; b=YoWW1DBGT132hgYC2D8spcaK4k930vtNfXI9qXVRfRetT4rKozCDxrWbIVLx87R64lLZ SUd246n4DpD1KLcraN97qj/Z+XrABkirqYqKjtN0E/sWer3Xuzu+Ys970KpvZa/yStCGZ e3J+vzBWV1f5w8D2eum75YjyO61nlyEQc89fZgdgM81mTOw3sqHC3b0Lvo4ODvhv3jNz1 eeaZnRFnx7W+O5PSBX25Bw9SEi6W1CJiPiw37i9mAdFnToV920XFUDlJJP+KhPEuU9EMJ 20BT8FKohsUbaJrIgcFRCEist+GJDm/QBBsvJZFFL880X+soVWUnKOJlMBPb/JXZpzw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=amutable-com.20260707.gappssmtp.com header.i=@amutable-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=Bz2+TnPI; dmarc=none header.from=amutable.com; spf=pass smtp.mailfrom=amutable.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58144606A337; Fri, 13 Nov 2026 12:38:31 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amutable-com.20260707.gappssmtp.com header.i=@amutable-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=Bz2+TnPI X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.52 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794573510; b=mEjLyB4BIhMRiUQfg50QuCuACLy5Sua14Ir7m+/xCBy5hGJpMpCTdBTK8iNLTxtjwFYC EtY+83KLAeQ0r0LK3Zez+w+RE4qBZE5sLdYRgvGPODLygnqiMMDCc/6xYM/CjJAU/N7YC b0dIKB5pnPoBKubJxeubvL9Jt3RB3GrMruVsghYQKsMhspTiU0rYFNDBkZtRiRAXrf3Y9 j+kWVNoX5PgOLu/fodPvuZvjOFiHctf4V/CH4dZjGFbkSMX4KhhL01mKwnrTRz2dLKUmR HJn8B6oLazzxlcFRTWES2Ps7gEJG6Ef7iNnGHBYas1yCkF8nY3hy/S6OUSFkC25xsag== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794573510; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:Content-Transfer-Encoding:User-Agent:MIME-Version; bh=Ny+1veWg8VD0eIDxFJ1X48Kguf5Oe9PbJZTpbcgMiOk=; b=qRWSMU2DfFjj4oGKl5fQg80tGDEOzezlcZtHgcDfZ7CvyfRVTFHwo+h5u3pk8uejwNnZ AgSKGk+36qLc4fZy7x6eqVwSC4L0s7mEDnBF7MaJsDX5QTrT0bGqTLy3hwrhhEOVeFoYr QPnMc+IPJK0f4MHTGyxzkXwL8ZUWerMXCiHChNljYss2E0+V8035BeWmneOsVyDckY3xD j40PcjZti11ZDhKuN0gd9NbEIO+jox9xkC8ytvv5VLLBMMmn3F41SSGtRJSmgfQTsIbL3 252mC4hESJhcFdlxRjrR1FCqmPaOfI1NeAYoMZuCzKruGj/YAavnxyxkj9j2YyeJVkQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=amutable.com; spf=pass smtp.mailfrom=amutable.com; dkim=pass header.d=amutable-com.20260707.gappssmtp.com header.i=@amutable-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=Bz2+TnPI; arc=none smtp.remote-ip=209.85.128.52 X-Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1DCE606A33A for <netdev@vger.kernel.org>; Fri, 13 Nov 2026 12:38:29 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E1DCE606A33A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=amutable.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amutable.com X-Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4bb55cda775so3649075e9.0 for <netdev@vger.kernel.org>; Fri, 13 Nov 2026 04:38:29 -0800 (PST) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amutable-com.20260707.gappssmtp.com; s=20260707; t=1794573508; x=1795178308; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:from:to :cc:subject:date:message-id:reply-to:content-type; bh=Ny+1veWg8VD0eIDxFJ1X48Kguf5Oe9PbJZTpbcgMiOk=; b=Bz2+TnPIApHKvsf08kyiSuJZ5AWViHONwTwuNXVAuo2u8JGXjKnEoxSd3hG/r/h3b1 tdsUEBtaZSOWfU3+mD3LjyqvBKt9Vc6RBsvkZZTD05u5eCDGhnWto1Wbu/C0r64DVVdd h2TGnt6meedDH7Iwjf2Hw2JxWOY8jwAvEAcAC10FURsf5jjp4p/KJzFYjzuPwuYFNKea Iij0h8HoPs5opXKf2XwMBJpd5hsYSV0+BHP/DvKdCCgwNFtbeIFAwqDf2ag0NBOCbqs2 OXWiZmXbdGCixyOlqQBMgrkFkrhg1VmbSdmvvBdeQ4Vz+QMvhYl+k9AO6FJ5UW1pg6b2 DVuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794573508; x=1795178308; h=mime-version:user-agent:content-transfer-encoding:content-type :references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Ny+1veWg8VD0eIDxFJ1X48Kguf5Oe9PbJZTpbcgMiOk=; b=Oo/YcTdmTpxJRt3XfwPKphHpxPhIdk8KZ3c17MpUxwPBXx1Zam4LpwF8M8W4QLLNIy 7Cwn0KBwcGnLiu9B6KtsBD/AEZaE5FbRh8EeWRLJYi/xn452drMrCcCaG7PJMu9bbbXN GIpIH9ntPaiaRXtg+FiIhPf/X8+qV8pqXouH1V6gk7On3kRabTNK1+1AssrveZASWpFs DUIgu/4MHMJcFc5ak02JZ7WeaE0vhBEUAzMb7txu9Z6O9wJr0oNbhPe11V6XArJ8FSkz 5qjU6R/vLaAL3AycXRayFaZTt+lJaQmu1YyUQ5olDbFsqj+9xzwTqqyhZ0eYTLHaHD5C vpSg== X-Forwarded-Encrypted: i=1; AL+hErE3JLflKIafZJoJoip5hUoPNSPu76x+7wPor4OrhKv9jx+IVoO00t8s/zHSKKGCfzsEqtbwKzc=@vger.kernel.org X-Gm-Message-State: APuU4Z+YKdbjva3osldfXmG8GAEObnen3phlxMWpNfSVtl2kgUYsNaeO 5aTHGHCECo843J7VLpmS3AqPyktDRRKX3xtGFc69fEMtzD+FyJGxpGRX+ji/QvdAyrlk X-Gm-Gg: AYBFou3WoEgTNOQEucUHDoc7px37Jfa9gmsTsJdJTzCPn957SNQHpw3gpS67VvN556c zKiqnmt2SC8bsev+zW2Nia4XmMZRSGXqeAnubNj9gYnqRCo9ZLQb9jNLZHRIQEmj+pUo2pIvOQ/ C1KhMRbMW4AX7O10vrTGa0MQ232dxpGyjVZsLz7q3KxYCDSRQwFvPZhEzn/OWebXbqncO6cIsRe Qi6x5+f/3Sq1auy/lZqXngUcwbcZ1PPuajxMsf6M/nCjwtxGYreqVByMpNAUX+tLdU21vQkybMr bwJhJUcTy2VgwC5njUz4hx+zLPJXBA9x8AM1W3whXyef75GaZnWjFB8tKJCK+kai01m/hqnzINW YRR3D3ChA/wA0uUVQxekgTlbWsku+9GwNKpnZM/vqb0BWT9it1yAwqQszA5f/qMOgD/9ZbVaTTZ lb4IRgWbUwpjDvnrVCrSvTUeTOda90LEP7AejWfv4xxLCulH/QDimwqsyxY0YacfrN5namh6na2 mmOYJTwxJoBGSd0JFfYDOzr4VCzJFAch7YiaBSwTLqn5utLFYAnrsCoyvZpokELimvw76gPcUlr JRuiKLz01h2eItmBw0fVfinuzPt8EArmieBziRlRg12cYwMMKq41eZs15nTZ4vY= X-Received: by 2002:a05:600c:a596:b0:4b5:d95c:2380 with SMTP id 5b1f17b1804b1-4bb55a86fb2mr24790785e9.11.1794573508217; Fri, 13 Nov 2026 04:38:28 -0800 (PST) X-Received: from [10.0.0.233] (tmo-086-54.customers.d1-online.com. [80.187.86.54]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb571cfa2esm48348475e9.2.2026.11.13.04.38.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Nov 2026 04:38:27 -0800 (PST) X-Cc: Jann Horn <jannh@google.com>, Chris Mason <mason@kernel.org>, Josef Bacik <josef@toxicpanda.com>, Christoph Hellwig <hch@lst.de>, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Alexander Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, driver-core@lists.linux.dev, linux-mm@kvack.org, bpf@vger.kernel.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, apparmor@lists.ubuntu.com, linux-nfs@vger.kernel.org, netdev@vger.kernel.org, fuse-devel@lists.linux.dev, linux-efi@vger.kernel.org, xen-devel@lists.xenproject.org, ocfs2-devel@lists.linux.dev, linux-s390@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-usb@vger.kernel.org, Amir Goldstein <amir73il@gmail.com>, linux-erofs@lists.ozlabs.org, linux-kselftest@vger.kernel.org X-In-Reply-To: <20261110-work-loop-pseudo-v1-20-4c998976c6c7@kernel.org> X-User-Agent: Evolution 3.56.2-0+deb13u1 X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list