mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-04-04 04:43:10 +00:00
This change adds a new LSM hook, inode_init_security_anon(), that will be used while creating secure anonymous inodes. The hook allows/denies its creation and assigns a security context to the inode. The new hook accepts an optional context_inode parameter that callers can use to provide additional contextual information to security modules for granting/denying permission to create an anon-inode of the same type. This context_inode's security_context can also be used to initialize the newly created anon-inode's security_context. Signed-off-by: Lokesh Gidra <lokeshgidra@google.com> Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Paul Moore <paul@paul-moore.com> (cherry picked from commit 215b674b84dd052098fe6389e32a5afaff8b4d56) Conflicts: include/linux/lsm_hook_defs.h (1. Added LSM hook in lsm_hook.h and removd lsm_hook_defs.h as per 98e828a0650f348be85728c69875260cf78069e6, which is not merged here) Signed-off-by: Lokesh Gidra <lokeshgidra@google.com> Bug: 160737021 Bug: 169683130 Change-Id: I83fe318c891f034b4dd7f3f357cc74964b55ffc8