Re: [PATCH 06/13] fs/kernel_read_file: Remove redundant size argument

2020-07-21 Thread Kees Cook
On Tue, Jul 21, 2020 at 02:43:07PM -0700, Scott Branden wrote: > On 2020-07-17 10:43 a.m., Kees Cook wrote: > > In preparation for refactoring kernel_read_file*(), remove the redundant > > "size" argument which is not needed: it can be included in the return > > code, with callers adjusted. (VFS re

Re: [PATCH 06/13] fs/kernel_read_file: Remove redundant size argument

2020-07-21 Thread Scott Branden
Hi Kees, On 2020-07-17 10:43 a.m., Kees Cook wrote: In preparation for refactoring kernel_read_file*(), remove the redundant "size" argument which is not needed: it can be included in the return code, with callers adjusted. (VFS reads already cannot be larger than INT_MAX.) Signed-off-by: Kees

Re: [PATCH 06/13] fs/kernel_read_file: Remove redundant size argument

2020-07-17 Thread Scott Branden
Hi Kees, On 2020-07-17 3:06 p.m., Kees Cook wrote: On Fri, Jul 17, 2020 at 12:04:18PM -0700, Scott Branden wrote: On 2020-07-17 10:43 a.m., Kees Cook wrote: In preparation for refactoring kernel_read_file*(), remove the redundant "size" argument which is not needed: it can be included in the r

Re: [PATCH 06/13] fs/kernel_read_file: Remove redundant size argument

2020-07-17 Thread Kees Cook
On Fri, Jul 17, 2020 at 12:04:18PM -0700, Scott Branden wrote: > On 2020-07-17 10:43 a.m., Kees Cook wrote: > > In preparation for refactoring kernel_read_file*(), remove the redundant > > "size" argument which is not needed: it can be included in the return > > I don't think the size argument is r

Re: [PATCH 06/13] fs/kernel_read_file: Remove redundant size argument

2020-07-17 Thread Scott Branden
On 2020-07-17 12:04 p.m., Scott Branden wrote: Hi Kees, On 2020-07-17 10:43 a.m., Kees Cook wrote: In preparation for refactoring kernel_read_file*(), remove the redundant "size" argument which is not needed: it can be included in the return I don't think the size argument is redundant thou

Re: [PATCH 06/13] fs/kernel_read_file: Remove redundant size argument

2020-07-17 Thread Scott Branden
Hi Kees, On 2020-07-17 10:43 a.m., Kees Cook wrote: In preparation for refactoring kernel_read_file*(), remove the redundant "size" argument which is not needed: it can be included in the return I don't think the size argument is redundant though. The existing kernel_read_file functions always

[PATCH 06/13] fs/kernel_read_file: Remove redundant size argument

2020-07-17 Thread Kees Cook
In preparation for refactoring kernel_read_file*(), remove the redundant "size" argument which is not needed: it can be included in the return code, with callers adjusted. (VFS reads already cannot be larger than INT_MAX.) Signed-off-by: Kees Cook --- drivers/base/firmware_loader/main.c | 8 +++