mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] security: export security_kernel_load_data function
@ 2018-07-17 20:23 Arnd Bergmann
  2018-07-18  4:28 ` James Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-07-17 20:23 UTC (permalink / raw)
  To: James Morris, Serge E. Hallyn
  Cc: Arnd Bergmann, Mimi Zohar, Kees Cook, David Howells,
	Eric W. Biederman, linux-security-module, linux-kernel

The firmware_loader can be built as a loadable module, which now
fails when CONFIG_SECURITY is enabled, because a call to the
security_kernel_load_data() function got added, and this is
not exported to modules:

ERROR: "security_kernel_load_data" [drivers/base/firmware_loader/firmware_class.ko] undefined!

Add an EXPORT_SYMBOL_GPL() to make it available here.

Fixes: 6e852651f28e ("firmware: add call to LSM hook before firmware sysfs fallback")
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 03e98be76d58..7f9618eaba10 100644
--- a/security/security.c
+++ b/security/security.c
@@ -1121,6 +1121,7 @@ int security_kernel_load_data(enum kernel_load_data_id id)
 		return ret;
 	return ima_load_data(id);
 }
+EXPORT_SYMBOL_GPL(security_kernel_load_data);
 
 int security_task_fix_setuid(struct cred *new, const struct cred *old,
 			     int flags)
-- 
2.9.0


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

* Re: [PATCH] security: export security_kernel_load_data function
  2018-07-17 20:23 [PATCH] security: export security_kernel_load_data function Arnd Bergmann
@ 2018-07-18  4:28 ` James Morris
  0 siblings, 0 replies; 2+ messages in thread
From: James Morris @ 2018-07-18  4:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Serge E. Hallyn, Mimi Zohar, Kees Cook, David Howells,
	Eric W. Biederman, linux-security-module, linux-kernel

On Tue, 17 Jul 2018, Arnd Bergmann wrote:

> The firmware_loader can be built as a loadable module, which now
> fails when CONFIG_SECURITY is enabled, because a call to the
> security_kernel_load_data() function got added, and this is
> not exported to modules:
> 
> ERROR: "security_kernel_load_data" [drivers/base/firmware_loader/firmware_class.ko] undefined!
> 
> Add an EXPORT_SYMBOL_GPL() to make it available here.
> 
> Fixes: 6e852651f28e ("firmware: add call to LSM hook before firmware sysfs fallback")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks!

Applied to
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-general


-- 
James Morris
<jmorris@namei.org>


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

end of thread, other threads:[~2018-07-18  4:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-17 20:23 [PATCH] security: export security_kernel_load_data function Arnd Bergmann
2018-07-18  4:28 ` James Morris

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

all inboxes | Powered by JetHome®