Re: [PATCH v2 15/18] fs/kernel_file_read: Add "offset" arg for partial reads

2020-07-27 Thread Kees Cook
On Wed, Jul 22, 2020 at 03:29:26PM -0700, Scott Branden wrote: > These changes don't pass the kernel-selftest for partial reads I added > (which are at the end of this patch v2 series). Oh, interesting. Is there any feedback in dmesg? I wonder if I have the LSMs configured differently than you? >

Re: [PATCH v2 15/18] fs/kernel_file_read: Add "offset" arg for partial reads

2020-07-27 Thread Scott Branden
On 2020-07-23 12:17 p.m., Kees Cook wrote: On Wed, Jul 22, 2020 at 11:23:43PM -0700, Scott Branden wrote: I made an adjustment in the logic of the driver with use of request_partial_firmware_into_buf and now everything is working. Excellent! Was there something wrong with how I ported the req

Re: [PATCH v2 15/18] fs/kernel_file_read: Add "offset" arg for partial reads

2020-07-27 Thread Scott Branden
On 2020-07-22 3:29 p.m., Scott Branden wrote: Hi Kees, These changes don't pass the kernel-selftest for partial reads I added (which are at the end of this patch v2 series). See change below added for temp workaround for issue. Even with such change real request_partial_firmware_into_buf doesn

Re: [PATCH v2 15/18] fs/kernel_file_read: Add "offset" arg for partial reads

2020-07-27 Thread Kees Cook
On Thu, Jul 23, 2020 at 10:41:07PM -0700, Scott Branden wrote: > > > On 2020-07-23 12:15 p.m., Kees Cook wrote: > > On Wed, Jul 22, 2020 at 03:29:26PM -0700, Scott Branden wrote: > > > These changes don't pass the kernel-selftest for partial reads I added > > > (which are at the end of this patch

Re: [PATCH v2 15/18] fs/kernel_file_read: Add "offset" arg for partial reads

2020-07-27 Thread Kees Cook
On Fri, Jul 24, 2020 at 11:23:37AM -0700, Kees Cook wrote: > On Thu, Jul 23, 2020 at 10:41:07PM -0700, Scott Branden wrote: > > > > > > On 2020-07-23 12:15 p.m., Kees Cook wrote: > > > On Wed, Jul 22, 2020 at 03:29:26PM -0700, Scott Branden wrote: > > > > These changes don't pass the kernel-selft

Re: [PATCH v2 15/18] fs/kernel_file_read: Add "offset" arg for partial reads

2020-07-27 Thread Scott Branden
Hi Kees, These changes don't pass the kernel-selftest for partial reads I added (which are at the end of this patch v2 series). See change below added for temp workaround for issue. Even with such change real request_partial_firmware_into_buf doesn't work fully with my bcm-vk driver.  I'm trying

Re: [PATCH v2 15/18] fs/kernel_file_read: Add "offset" arg for partial reads

2020-07-27 Thread Kees Cook
On Wed, Jul 22, 2020 at 11:23:43PM -0700, Scott Branden wrote: > I made an adjustment in the logic of the driver with use of > request_partial_firmware_into_buf and now everything is working. Excellent! Was there something wrong with how I ported the request_partial_firmware_into_buf() changes? (S

Re: [PATCH v2 15/18] fs/kernel_file_read: Add "offset" arg for partial reads

2020-07-27 Thread Kees Cook
On Fri, Jul 24, 2020 at 12:03:36PM -0700, Scott Branden wrote: > Now I'm confused.  The original patch series I made with IMA additions under > Mimi's direction > passed the kernel selftests with partial read.  And > request_partial_firmware_into_buf therefore worked. > Your changes don't work with

Re: [PATCH v2 15/18] fs/kernel_file_read: Add "offset" arg for partial reads

2020-07-27 Thread Scott Branden
Hi Kees, On 2020-07-24 11:39 a.m., Kees Cook wrote: On Fri, Jul 24, 2020 at 11:23:37AM -0700, Kees Cook wrote: On Thu, Jul 23, 2020 at 10:41:07PM -0700, Scott Branden wrote: On 2020-07-23 12:15 p.m., Kees Cook wrote: On Wed, Jul 22, 2020 at 03:29:26PM -0700, Scott Branden wrote: These chang

[PATCH v2 15/18] fs/kernel_file_read: Add "offset" arg for partial reads

2020-07-22 Thread Kees Cook
To perform partial reads, callers of kernel_read_file*() must have a non-NULL file_size argument and a preallocated buffer. The new "offset" argument can then be used to seek to specific locations in the file to fill the buffer to, at most, "buf_size" per call. Where possible, the LSM hooks can re