public inbox for linux-security-module@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Amir Goldstein <amir73il@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Casey Schaufler <casey@schaufler-ca.com>,
	John Johansen <john.johhansen@canonical.com>,
	Christian Brauner <brauner@kernel.org>,
	Mimi Zohar <zohar@linux.ibm.com>,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] lsm: export security_mmap_backing_file
Date: Wed, 18 Mar 2026 11:42:54 +0100	[thread overview]
Message-ID: <20260318104322.1643085-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

This symbol can now be used from a loadable erofs module, which causes
a build failure when it is not exported:

ERROR: modpost: "security_mmap_backing_file" [fs/erofs/erofs.ko] undefined!

Fixes: 0e2baaf8fed0 ("lsm: add the security_mmap_backing_file() hook")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 security/security.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/security/security.c b/security/security.c
index 8d10b184ce25..3e426a762864 100644
--- a/security/security.c
+++ b/security/security.c
@@ -2529,6 +2529,7 @@ int security_mmap_backing_file(struct vm_area_struct *vma,
 
 	return call_int_hook(mmap_backing_file, vma, backing_file, user_file);
 }
+EXPORT_SYMBOL_GPL(security_mmap_backing_file);
 
 /**
  * security_mmap_addr() - Check if mmap'ing an address is allowed
-- 
2.39.5


             reply	other threads:[~2026-03-18 10:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 10:42 Arnd Bergmann [this message]
2026-03-18 16:29 ` [PATCH] lsm: export security_mmap_backing_file Paul Moore
2026-03-18 17:17   ` Arnd Bergmann
2026-03-18 18:50     ` Paul Moore

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=20260318104322.1643085-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=amir73il@gmail.com \
    --cc=arnd@arndb.de \
    --cc=brauner@kernel.org \
    --cc=casey@schaufler-ca.com \
    --cc=jmorris@namei.org \
    --cc=john.johhansen@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox