Skip to contentSkip to conversation

lsm: export security_mmap_backing_file

PATCH In review Arnd Bergmann 3 participants 4 messages Mar 18 Security (LSM)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lsm: export security_mmap_backing_file

From: Arnd Bergmann <[email protected]>

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")
---
 security/security.c | 1 +
 1 file changed, 1 insertion(+)
security/security.c +1 -0
index 8d10b184ce25..3e426a762864 100644
@@ -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
Signature · 1 line
2.39.5
maintainer
#1 lore raw
Quoted 6 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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

Quoted 7 lines

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

Fixes 0e2baaf8fed0 ("lsm: add the security_mmap_backing_file() hook")
---
 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 :)

Quoted 14 lines
security/security.c +1 -1
index 8d10b184ce25..3e426a762864 100644
@@ -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

Signature · 1 line
paul-moore.com
#2 lore raw
Quoted 6 lines · Paul Moore

On Wed, Mar 18, 2026 at 6:43 AM Arnd Bergmann <[email protected]> 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

maintainer
#3 lore raw
Quoted 9 lines · Arnd Bergmann
Quoted 6 lines · Paul Moore

On Wed, Mar 18, 2026 at 6:43 AM Arnd Bergmann <[email protected]> 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.

Signature · 1 line
paul-moore.com