Re: [PATCH v10 2/9] fs: introduce kernel_pread_file* support

2020-07-07 Thread Scott Branden
Hi Kees, one more comment below. On 2020-07-07 9:01 p.m., Scott Branden wrote: On 2020-07-07 4:56 p.m., Kees Cook wrote: On Mon, Jul 06, 2020 at 04:23:02PM -0700, Scott Branden wrote: Add kernel_pread_file* support to kernel to allow for partial read of files with an offset into the file.

Re: [PATCH v10 2/9] fs: introduce kernel_pread_file* support

2020-07-07 Thread Scott Branden
On 2020-07-07 4:56 p.m., Kees Cook wrote: On Mon, Jul 06, 2020 at 04:23:02PM -0700, Scott Branden wrote: Add kernel_pread_file* support to kernel to allow for partial read of files with an offset into the file. Signed-off-by: Scott Branden --- fs/exec.c| 93 +++

Re: [PATCH v10 2/9] fs: introduce kernel_pread_file* support

2020-07-07 Thread Mimi Zohar
On Tue, 2020-07-07 at 16:56 -0700, Kees Cook wrote: > > @@ -951,21 +955,32 @@ int kernel_read_file(struct file *file, void **buf, > > loff_t *size, > >   ret = -EINVAL; > >   goto out; > >   } > > - if (i_size > SIZE_MAX || (max_size > 0 && i_size > max_size)) { > >

Re: [PATCH v10 2/9] fs: introduce kernel_pread_file* support

2020-07-07 Thread Kees Cook
On Mon, Jul 06, 2020 at 04:23:02PM -0700, Scott Branden wrote: > Add kernel_pread_file* support to kernel to allow for partial read > of files with an offset into the file. > > Signed-off-by: Scott Branden > --- > fs/exec.c| 93 > include/

[PATCH v10 2/9] fs: introduce kernel_pread_file* support

2020-07-06 Thread Scott Branden
Add kernel_pread_file* support to kernel to allow for partial read of files with an offset into the file. Signed-off-by: Scott Branden --- fs/exec.c| 93 include/linux/kernel_read_file.h | 17 ++ 2 files changed, 87 insertions(+), 23 d