Skip to contentSkip to conversation

security: export security_kernel_load_data function

PATCH In review Arnd Bergmann 2 participants 2 messages Jul 17, 2018 – Jul 18, 2018 Security (LSM)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 security: export security_kernel_load_data function

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")
---
 security/security.c | 1 +
 1 file changed, 1 insertion(+)
security/security.c +1 -0
index 03e98be76d58..7f9618eaba10 100644
@@ -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)
Signature · 6 lines
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#1 lore raw
Quoted 11 lines · Arnd Bergmann

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")

Thanks!

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

Signature · 7 lines
James Morris
<[email protected]>

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html