Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Mimi Zohar
On Wed, 2020-05-13 at 16:34 -0700, Kees Cook wrote: > On Wed, May 13, 2020 at 07:00:43PM -0400, Mimi Zohar wrote: > > On Wed, 2020-05-13 at 15:48 -0700, Scott Branden wrote: > > > > > > On 2020-05-13 3:12 p.m., Mimi Zohar wrote: > > > > On Wed, 2020-05-13 at 21:28 +, Luis Chamberlain wrote: >

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Kees Cook
On Wed, May 13, 2020 at 07:00:43PM -0400, Mimi Zohar wrote: > On Wed, 2020-05-13 at 15:48 -0700, Scott Branden wrote: > > > > On 2020-05-13 3:12 p.m., Mimi Zohar wrote: > > > On Wed, 2020-05-13 at 21:28 +, Luis Chamberlain wrote: > > >> On Wed, May 13, 2020 at 05:20:14PM -0400, Mimi Zohar wrot

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Mimi Zohar
On Wed, 2020-05-13 at 15:48 -0700, Scott Branden wrote: > > On 2020-05-13 3:12 p.m., Mimi Zohar wrote: > > On Wed, 2020-05-13 at 21:28 +, Luis Chamberlain wrote: > >> On Wed, May 13, 2020 at 05:20:14PM -0400, Mimi Zohar wrote: > >>> On Wed, 2020-05-13 at 12:41 -0700, Scott Branden wrote: > >>>

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Scott Branden
On 2020-05-13 3:12 p.m., Mimi Zohar wrote: On Wed, 2020-05-13 at 21:28 +, Luis Chamberlain wrote: On Wed, May 13, 2020 at 05:20:14PM -0400, Mimi Zohar wrote: On Wed, 2020-05-13 at 12:41 -0700, Scott Branden wrote: On 2020-05-13 12:39 p.m., Mimi Zohar wrote: On Wed, 2020-05-13 at 12:18

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Mimi Zohar
On Wed, 2020-05-13 at 21:28 +, Luis Chamberlain wrote: > On Wed, May 13, 2020 at 05:20:14PM -0400, Mimi Zohar wrote: > > On Wed, 2020-05-13 at 12:41 -0700, Scott Branden wrote: > > > > > > On 2020-05-13 12:39 p.m., Mimi Zohar wrote: > > > > On Wed, 2020-05-13 at 12:18 -0700, Scott Branden wrot

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Luis Chamberlain
On Wed, May 13, 2020 at 05:20:14PM -0400, Mimi Zohar wrote: > On Wed, 2020-05-13 at 12:41 -0700, Scott Branden wrote: > > > > On 2020-05-13 12:39 p.m., Mimi Zohar wrote: > > > On Wed, 2020-05-13 at 12:18 -0700, Scott Branden wrote: > > >> On 2020-05-13 12:03 p.m., Mimi Zohar wrote: > > >>> On Wed,

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Mimi Zohar
On Wed, 2020-05-13 at 12:41 -0700, Scott Branden wrote: > > On 2020-05-13 12:39 p.m., Mimi Zohar wrote: > > On Wed, 2020-05-13 at 12:18 -0700, Scott Branden wrote: > >> On 2020-05-13 12:03 p.m., Mimi Zohar wrote: > >>> On Wed, 2020-05-13 at 11:53 -0700, Scott Branden wrote: > >> Even if the kernel

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Scott Branden
On 2020-05-13 12:39 p.m., Mimi Zohar wrote: On Wed, 2020-05-13 at 12:18 -0700, Scott Branden wrote: On 2020-05-13 12:03 p.m., Mimi Zohar wrote: On Wed, 2020-05-13 at 11:53 -0700, Scott Branden wrote: Even if the kernel successfully verified the firmware file signature it would just be wasti

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Mimi Zohar
On Wed, 2020-05-13 at 12:18 -0700, Scott Branden wrote: > On 2020-05-13 12:03 p.m., Mimi Zohar wrote: > > On Wed, 2020-05-13 at 11:53 -0700, Scott Branden wrote: > Even if the kernel successfully verified the firmware file signature it > would just be wasting its time.  The kernel in these use cas

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Scott Branden
On 2020-05-13 12:03 p.m., Mimi Zohar wrote: On Wed, 2020-05-13 at 11:53 -0700, Scott Branden wrote: Hi Mimi, On 2020-05-13 11:39 a.m., Mimi Zohar wrote: [Cc'ing linux-security-module, linux-integrity] On Thu, 2020-05-07 at 17:27 -0700, Scott Branden wrote: Add kernel_pread_file* support t

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Mimi Zohar
On Wed, 2020-05-13 at 11:53 -0700, Scott Branden wrote: > Hi Mimi, > > On 2020-05-13 11:39 a.m., Mimi Zohar wrote: > > [Cc'ing linux-security-module, linux-integrity] > > > > On Thu, 2020-05-07 at 17:27 -0700, Scott Branden wrote: > >> Add kernel_pread_file* support to kernel to allow for partial

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Scott Branden
On 2020-05-13 11:53 a.m., Scott Branden wrote: Hi Mimi, On 2020-05-13 11:39 a.m., Mimi Zohar wrote: [Cc'ing linux-security-module, linux-integrity] On Thu, 2020-05-07 at 17:27 -0700, Scott Branden wrote: Add kernel_pread_file* support to kernel to allow for partial read of files with an of

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Scott Branden
Hi Mimi, On 2020-05-13 11:39 a.m., Mimi Zohar wrote: [Cc'ing linux-security-module, linux-integrity] On Thu, 2020-05-07 at 17:27 -0700, Scott Branden wrote: Add kernel_pread_file* support to kernel to allow for partial read of files with an offset into the file. Existing kernel_read_file func

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Mimi Zohar
[Cc'ing linux-security-module, linux-integrity] On Thu, 2020-05-07 at 17:27 -0700, Scott Branden wrote: > Add kernel_pread_file* support to kernel to allow for partial read > of files with an offset into the file. Existing kernel_read_file > functions call new kernel_pread_file functions with off

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-13 Thread Scott Branden
On 2020-05-12 11:51 p.m., Greg Kroah-Hartman wrote: On Tue, May 12, 2020 at 11:23:27PM -0700, Scott Branden wrote: Hi Luis, A few comments inline before I cleanup. We do not export symbols when there are no in-kernel users. Note: Existing kernel_read_file_from_path_initns is not used in th

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-12 Thread Greg Kroah-Hartman
On Tue, May 12, 2020 at 11:23:27PM -0700, Scott Branden wrote: > Hi Luis, > > A few comments inline before I cleanup. > > On 2020-05-12 5:27 p.m., Luis Chamberlain wrote: > > On Thu, May 07, 2020 at 05:27:33PM -0700, Scott Branden wrote: > > > diff --git a/fs/exec.c b/fs/exec.c > > > index 06b4c5

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-12 Thread Scott Branden
Hi Luis, A few comments inline before I cleanup. On 2020-05-12 5:27 p.m., Luis Chamberlain wrote: On Thu, May 07, 2020 at 05:27:33PM -0700, Scott Branden wrote: diff --git a/fs/exec.c b/fs/exec.c index 06b4c550af5d..cfab212fab9d 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -896,10 +896,14 @@ stru

Re: [PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-12 Thread Luis Chamberlain
On Thu, May 07, 2020 at 05:27:33PM -0700, Scott Branden wrote: > diff --git a/fs/exec.c b/fs/exec.c > index 06b4c550af5d..cfab212fab9d 100644 > --- a/fs/exec.c > +++ b/fs/exec.c > @@ -896,10 +896,14 @@ struct file *open_exec(const char *name) > } > EXPORT_SYMBOL(open_exec); > > -int kernel_read

[PATCH v5 1/7] fs: introduce kernel_pread_file* support

2020-05-07 Thread Scott Branden
Add kernel_pread_file* support to kernel to allow for partial read of files with an offset into the file. Existing kernel_read_file functions call new kernel_pread_file functions with offset=0 and flags=KERNEL_PREAD_FLAG_WHOLE. Signed-off-by: Scott Branden --- fs/exec.c | 96 ++