Re: [PATCH bpf-next v3 1/3] ima: Implement ima_inode_hash

2020-11-25 Thread Mimi Zohar
On Tue, 2020-11-24 at 15:12 +, KP Singh wrote: > From: KP Singh > > This is in preparation to add a helper for BPF LSM programs to use > IMA hashes when attached to LSM hooks. There are LSM hooks like > inode_unlink which do not have a struct file * argument and cannot > use the existing

Re: [PATCH bpf-next v3 1/3] ima: Implement ima_inode_hash

2020-11-25 Thread Daniel Borkmann
On 11/25/20 1:04 PM, KP Singh wrote: On Tue, Nov 24, 2020 at 6:35 PM Yonghong Song wrote: On 11/24/20 7:12 AM, KP Singh wrote: From: KP Singh This is in preparation to add a helper for BPF LSM programs to use IMA hashes when attached to LSM hooks. There are LSM hooks like inode_unlink which

Re: [PATCH bpf-next v3 1/3] ima: Implement ima_inode_hash

2020-11-25 Thread KP Singh
On Tue, Nov 24, 2020 at 6:35 PM Yonghong Song wrote: > > > > On 11/24/20 7:12 AM, KP Singh wrote: > > From: KP Singh > > > > This is in preparation to add a helper for BPF LSM programs to use > > IMA hashes when attached to LSM hooks. There are LSM hooks like > > inode_unlink which do not have a

Re: [PATCH bpf-next v3 1/3] ima: Implement ima_inode_hash

2020-11-24 Thread Yonghong Song
On 11/24/20 7:12 AM, KP Singh wrote: From: KP Singh This is in preparation to add a helper for BPF LSM programs to use IMA hashes when attached to LSM hooks. There are LSM hooks like inode_unlink which do not have a struct file * argument and cannot use the existing ima_file_hash API. An

[PATCH bpf-next v3 1/3] ima: Implement ima_inode_hash

2020-11-24 Thread KP Singh
From: KP Singh This is in preparation to add a helper for BPF LSM programs to use IMA hashes when attached to LSM hooks. There are LSM hooks like inode_unlink which do not have a struct file * argument and cannot use the existing ima_file_hash API. An inode based API is, therefore, useful in