[PATCH 9/9] integrity: Move integrity_inode_get() out of global header
Kees Cook
keescook at chromium.org
Thu Oct 13 22:36:54 UTC 2022
The function integrity_inode_get() does not need to be shared with the
rest of the kernel, so move it into the internal integrity.h header.
Cc: Mimi Zohar <zohar at linux.ibm.com>
Cc: Dmitry Kasatkin <dmitry.kasatkin at gmail.com>
Cc: Paul Moore <paul at paul-moore.com>
Cc: James Morris <jmorris at namei.org>
Cc: "Serge E. Hallyn" <serge at hallyn.com>
Cc: linux-integrity at vger.kernel.org
Cc: linux-security-module at vger.kernel.org
Signed-off-by: Kees Cook <keescook at chromium.org>
---
include/linux/integrity.h | 11 +----------
security/integrity/integrity.h | 1 +
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/include/linux/integrity.h b/include/linux/integrity.h
index c86bcf6b866b..4c6fd79b5bf8 100644
--- a/include/linux/integrity.h
+++ b/include/linux/integrity.h
@@ -21,19 +21,10 @@ enum integrity_status {
/* List of EVM protected security xattrs */
#ifdef CONFIG_INTEGRITY
-extern struct integrity_iint_cache *integrity_inode_get(struct inode *inode);
extern void __init integrity_load_keys(void);
-
#else
-static inline struct integrity_iint_cache *
- integrity_inode_get(struct inode *inode)
-{
- return NULL;
-}
-
static inline void integrity_load_keys(void)
-{
-}
+{ }
#endif /* CONFIG_INTEGRITY */
#endif /* _LINUX_INTEGRITY_H */
diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h
index 93f35b208809..acd904c12f87 100644
--- a/security/integrity/integrity.h
+++ b/security/integrity/integrity.h
@@ -178,6 +178,7 @@ struct integrity_iint_cache {
* integrity data associated with an inode.
*/
struct integrity_iint_cache *integrity_iint_find(struct inode *inode);
+struct integrity_iint_cache *integrity_inode_get(struct inode *inode);
int integrity_kernel_read(struct file *file, loff_t offset,
void *addr, unsigned long count);
--
2.34.1
More information about the Linux-security-module-archive
mailing list