Skip to contentSkip to conversation

security: export binder symbols

PATCH In review Alice Ryhl 2 participants 2 messages Jan 19 Security (LSM)

lore
Share & tools
lore

Alice Ryhl

author
#0 lore raw

PATCH 1/1 security: export binder symbols

To enable building Rust Binder (possibly also C Binder) as a module, export these symbols.

---
 security/security.c | 4 ++++
 1 file changed, 4 insertions(+)
security/security.c +4 -0
index 31a688650601..b4776f0e25b3 100644
@@ -479,61 +479,65 @@ int security_binder_set_context_mgr(const struct cred *mgr)
 /**
  * security_binder_set_context_mgr() - Check if becoming binder ctx mgr is ok
  * @mgr: task credentials of current binder process
  *
  * Check whether @mgr is allowed to be the binder context manager.
  *
  * Return: Return 0 if permission is granted.
  */
 int security_binder_set_context_mgr(const struct cred *mgr)
 {
 	return call_int_hook(binder_set_context_mgr, mgr);
 }
+EXPORT_SYMBOL_GPL(security_binder_set_context_mgr);
 
 /**
  * security_binder_transaction() - Check if a binder transaction is allowed
  * @from: sending process
  * @to: receiving process
  *
  * Check whether @from is allowed to invoke a binder transaction call to @to.
  *
  * Return: Returns 0 if permission is granted.
  */
 int security_binder_transaction(const struct cred *from,
 				const struct cred *to)
 {
 	return call_int_hook(binder_transaction, from, to);
 }
+EXPORT_SYMBOL_GPL(security_binder_transaction);
 
 /**
  * security_binder_transfer_binder() - Check if a binder transfer is allowed
  * @from: sending process
  * @to: receiving process
  *
  * Check whether @from is allowed to transfer a binder reference to @to.
  *
  * Return: Returns 0 if permission is granted.
  */
 int security_binder_transfer_binder(const struct cred *from,
 				    const struct cred *to)
 {
 	return call_int_hook(binder_transfer_binder, from, to);
 }
+EXPORT_SYMBOL_GPL(security_binder_transfer_binder);
 
 /**
  * security_binder_transfer_file() - Check if a binder file xfer is allowed
  * @from: sending process
  * @to: receiving process
  * @file: file being transferred
  *
  * Check whether @from is allowed to transfer @file to @to.
  *
  * Return: Returns 0 if permission is granted.
  */
 int security_binder_transfer_file(const struct cred *from,
 				  const struct cred *to, const struct file *file)
 {
 	return call_int_hook(binder_transfer_file, from, to, file);
 }
+EXPORT_SYMBOL_GPL(security_binder_transfer_file);
 
 /**
  * security_ptrace_access_check() - Check if tracing is allowed

base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
prerequisite-patch-id: 0000000000000000000000000000000000000000

Signature · 1 line
2.52.0.457.g6b5491de43-goog
#1 lore raw
Quoted 7 lines · Alice Ryhl

To enable building Rust Binder (possibly also C Binder) as a module, export these symbols.

---
 security/security.c | 4 ++++
 1 file changed, 4 insertions(+)

We need this as a patch series that actually uses these symbols from a module please.

thanks,

greg k-h