aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorDaniel Colascione <dancol@google.com>2021-01-08 14:22:21 -0800
committerPaul Moore <paul@paul-moore.com>2021-01-14 17:31:05 -0500
commite7e832ce6fa769f800cd7eaebdb0459ad31e0416 (patch)
tree975011372d5e154fe1fc921e930465c12c53ab72 /security
parentsecurity: add inode_init_security_anon() LSM hook (diff)
downloadlinux-dev-e7e832ce6fa769f800cd7eaebdb0459ad31e0416.tar.xz
linux-dev-e7e832ce6fa769f800cd7eaebdb0459ad31e0416.zip
fs: add LSM-supporting anon-inode interface
This change adds a new function, anon_inode_getfd_secure, that creates anonymous-node file with individual non-S_PRIVATE inode to which security modules can apply policy. Existing callers continue using the original singleton-inode kind of anonymous-inode file. We can transition anonymous inode users to the new kind of anonymous inode in individual patches for the sake of bisection and review. The new function accepts an optional context_inode parameter that callers can use to provide additional contextual information to security modules. For example, in case of userfaultfd, the created inode is a 'logical child' of the context_inode (userfaultfd inode of the parent process) in the sense that it provides the security context required during creation of the child process' userfaultfd inode. Signed-off-by: Daniel Colascione <dancol@google.com> [LG: Delete obsolete comments to alloc_anon_inode()] [LG: Add context_inode description in comments to anon_inode_getfd_secure()] [LG: Remove definition of anon_inode_getfile_secure() as there are no callers] [LG: Make __anon_inode_getfile() static] [LG: Use correct error cast in __anon_inode_getfile()] [LG: Fix error handling in __anon_inode_getfile()] Signed-off-by: Lokesh Gidra <lokeshgidra@google.com> Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions