From: Frederick Lawler <fred@cloudflare.com>
To: Andreas Hindborg <a.hindborg@kernel.org>,
Breno Leitao <leitao@debian.org>,
Mimi Zohar <zohar@linux.ibm.com>,
Roberto Sassu <roberto.sassu@huawei.com>,
Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
Eric Snowberg <eric.snowberg@oracle.com>,
Paul Moore <paul@paul-moore.com>,
James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>
Cc: linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org,
kernel-team@cloudflare.com,
Frederick Lawler <fred@cloudflare.com>
Subject: [PATCH 1/2] configfs: move CONFIGFS_MAGIC definition to magic.h
Date: Tue, 18 Aug 2026 14:35:15 -0500 [thread overview]
Message-ID: <20260818-configfs-v1-1-a2329043cf86@cloudflare.com> (raw)
In-Reply-To: <20260818-configfs-v1-0-a2329043cf86@cloudflare.com>
IMA shouldn't measure or appraise configfs, but currently does because
it's missing from the default exclusion policies. Move CONFIGFS_MAGIC to
magic.h to expose the file system's magic to IMA, as well as other userland
applications.
Suggested-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Frederick Lawler <fred@cloudflare.com>
---
fs/configfs/mount.c | 4 +---
include/uapi/linux/magic.h | 1 +
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/configfs/mount.c b/fs/configfs/mount.c
index 4929f343118946eaa55a539db4192e9c6621a8dc..d8cac1cbf3bd573a0549f2f044714c9d669205a4 100644
--- a/fs/configfs/mount.c
+++ b/fs/configfs/mount.c
@@ -9,6 +9,7 @@
*/
#include <linux/fs.h>
+#include <linux/magic.h>
#include <linux/module.h>
#include <linux/mount.h>
#include <linux/fs_context.h>
@@ -19,9 +20,6 @@
#include <linux/configfs.h>
#include "configfs_internal.h"
-/* Random magic number */
-#define CONFIGFS_MAGIC 0x62656570
-
static struct vfsmount *configfs_mount = NULL;
struct kmem_cache *configfs_dir_cachep;
static int configfs_mnt_count = 0;
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index 4f2da935a76ccae6e1c3310b2fae5379186548b8..d5b9958ddfaae90b270b66fe7853c5a3d49ce739 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -8,6 +8,7 @@
#define AUTOFS_SUPER_MAGIC 0x0187
#define CEPH_SUPER_MAGIC 0x00c36400
#define CODA_SUPER_MAGIC 0x73757245
+#define CONFIGFS_MAGIC 0x62656570 /* some random number */
#define CRAMFS_MAGIC 0x28cd3d45 /* some random number */
#define CRAMFS_MAGIC_WEND 0x453dcd28 /* magic number with the wrong endianess */
#define DEBUGFS_MAGIC 0x64626720
--
2.43.0
next prev parent reply other threads:[~2026-08-18 19:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 19:35 [PATCH 0/2] ima: don't measure/appraise files on configfs Frederick Lawler
2026-08-18 19:35 ` Frederick Lawler [this message]
2026-08-19 9:21 ` [PATCH 1/2] configfs: move CONFIGFS_MAGIC definition to magic.h Breno Leitao
2026-08-19 14:39 ` Frederick Lawler
2026-08-18 19:35 ` [PATCH 2/2] ima: don't measure/appraise files on configfs Frederick Lawler
2026-08-19 18:39 ` Mimi Zohar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260818-configfs-v1-1-a2329043cf86@cloudflare.com \
--to=fred@cloudflare.com \
--cc=a.hindborg@kernel.org \
--cc=dmitry.kasatkin@gmail.com \
--cc=eric.snowberg@oracle.com \
--cc=jmorris@namei.org \
--cc=kernel-team@cloudflare.com \
--cc=leitao@debian.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=roberto.sassu@huawei.com \
--cc=serge@hallyn.com \
--cc=zohar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.