public inbox for linux-security-module@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lsm: export security_mmap_backing_file
@ 2026-03-18 10:42 Arnd Bergmann
  2026-03-18 16:29 ` Paul Moore
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2026-03-18 10:42 UTC (permalink / raw)
  To: Paul Moore, James Morris, Serge E. Hallyn, Amir Goldstein
  Cc: Arnd Bergmann, Casey Schaufler, John Johansen, Christian Brauner,
	Mimi Zohar, linux-security-module, linux-kernel

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] lsm: export security_mmap_backing_file
  2026-03-18 10:42 [PATCH] lsm: export security_mmap_backing_file Arnd Bergmann
@ 2026-03-18 16:29 ` Paul Moore
  2026-03-18 17:17   ` Arnd Bergmann
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Moore @ 2026-03-18 16:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: James Morris, Serge E. Hallyn, Amir Goldstein, Arnd Bergmann,
	Casey Schaufler, John Johansen, Christian Brauner, Mimi Zohar,
	linux-security-module, linux-kernel

On Wed, Mar 18, 2026 at 6:43 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> 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(+)

Thanks Arnd.  It looks like I'm going to need to respin this patchset
due to other changes, do you mind if I fold this patch into the
associated LSM patch when I do that, or would you prefer this as a
standalone fix?  No worries either way, fixes are always appreciated
:)

> 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

-- 
paul-moore.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] lsm: export security_mmap_backing_file
  2026-03-18 16:29 ` Paul Moore
@ 2026-03-18 17:17   ` Arnd Bergmann
  2026-03-18 18:50     ` Paul Moore
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2026-03-18 17:17 UTC (permalink / raw)
  To: Paul Moore, Arnd Bergmann
  Cc: James Morris, Serge E. Hallyn, Amir Goldstein, Casey Schaufler,
	John Johansen, Christian Brauner, Mimi Zohar,
	linux-security-module, linux-kernel

On Wed, Mar 18, 2026, at 17:29, Paul Moore wrote:
> On Wed, Mar 18, 2026 at 6:43 AM Arnd Bergmann <arnd@kernel.org> wrote:

> Thanks Arnd.  It looks like I'm going to need to respin this patchset
> due to other changes, do you mind if I fold this patch into the
> associated LSM patch when I do that, or would you prefer this as a
> standalone fix?  

Please fold it into your patch for the next version.

    Arnd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] lsm: export security_mmap_backing_file
  2026-03-18 17:17   ` Arnd Bergmann
@ 2026-03-18 18:50     ` Paul Moore
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Moore @ 2026-03-18 18:50 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, James Morris, Serge E. Hallyn, Amir Goldstein,
	Casey Schaufler, John Johansen, Christian Brauner, Mimi Zohar,
	linux-security-module, linux-kernel

On Wed, Mar 18, 2026 at 1:17 PM Arnd Bergmann <arnd@arndb.de> wrote:
> On Wed, Mar 18, 2026, at 17:29, Paul Moore wrote:
> > On Wed, Mar 18, 2026 at 6:43 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> > Thanks Arnd.  It looks like I'm going to need to respin this patchset
> > due to other changes, do you mind if I fold this patch into the
> > associated LSM patch when I do that, or would you prefer this as a
> > standalone fix?
>
> Please fold it into your patch for the next version.

Done with a thank you note added to the bottom of the patch description.

-- 
paul-moore.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-18 18:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18 10:42 [PATCH] lsm: export security_mmap_backing_file Arnd Bergmann
2026-03-18 16:29 ` Paul Moore
2026-03-18 17:17   ` Arnd Bergmann
2026-03-18 18:50     ` Paul Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox