Re: [PATCH v6 8/8] ima: add FIRMWARE_PARTIAL_READ support

2020-06-05 Thread Mimi Zohar
On Fri, 2020-06-05 at 16:31 -0700, Scott Branden wrote: > Hi Mimi, > > On 2020-06-05 4:19 p.m., Mimi Zohar wrote: > > Hi Scott, > > > > On Fri, 2020-06-05 at 15:59 -0700, Scott Branden wrote: > >> @@ -648,6 +667,9 @@ int ima_post_read_file(struct file *file, void *buf, > >> loff_t size, > >>

Re: [PATCH v6 8/8] ima: add FIRMWARE_PARTIAL_READ support

2020-06-05 Thread Scott Branden
Hi Mimi, On 2020-06-05 4:19 p.m., Mimi Zohar wrote: Hi Scott, On Fri, 2020-06-05 at 15:59 -0700, Scott Branden wrote: @@ -648,6 +667,9 @@ int ima_post_read_file(struct file *file, void *buf, loff_t size, enum ima_hooks func; u32 secid; + if (!file && read_id ==

Re: [PATCH v6 8/8] ima: add FIRMWARE_PARTIAL_READ support

2020-06-05 Thread Mimi Zohar
Hi Scott, On Fri, 2020-06-05 at 15:59 -0700, Scott Branden wrote: > > @@ -648,6 +667,9 @@ int ima_post_read_file(struct file *file, void *buf, > loff_t size, > enum ima_hooks func; > u32 secid; > > + if (!file && read_id == READING_FIRMWARE_PARTIAL_READ) > + return

[PATCH v6 8/8] ima: add FIRMWARE_PARTIAL_READ support

2020-06-05 Thread Scott Branden
Add FIRMWARE_PARTIAL_READ support for integrity measurement on partial reads of firmware files. Signed-off-by: Scott Branden --- drivers/base/firmware_loader/main.c | 6 +- fs/exec.c | 6 -- include/linux/fs.h | 1 +