Re: [PATCH 0/3] fs: reduce export usage of kerne_read*() calls

2020-05-22 Thread Scott Branden
Hi Kees, On 2020-05-22 4:04 p.m., Kees Cook wrote: On Fri, May 22, 2020 at 03:24:32PM -0700, Scott Branden wrote: On 2020-05-18 5:37 a.m., Mimi Zohar wrote: On Sun, 2020-05-17 at 23:22 -0700, Christoph Hellwig wrote: On Fri, May 15, 2020 at 09:29:33PM +, Luis Chamberlain wrote: On Wed

Re: [PATCH v5 0/7] firmware: add partial read support in request_firmware_into_buf

2020-05-15 Thread Scott Branden
Hi Luis, On 2020-05-15 1:47 p.m., Luis Chamberlain wrote: On Wed, May 13, 2020 at 12:23:59PM -0400, Mimi Zohar wrote: Hi Scott, On Thu, 2020-05-07 at 17:27 -0700, Scott Branden wrote: Please consider this version series ready for upstream acceptance. This patch series adds partial read

[PATCH v6 7/8] MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver

2020-06-05 Thread Scott Branden
Add maintainer entry for new Broadcom VK Driver Signed-off-by: Scott Branden --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b045b70e54df..9fbf255fe093 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3656,6 +3656,13 @@ L: net

[PATCH v6 4/8] firmware: test partial file reads of request_firmware_into_buf

2020-06-05 Thread Scott Branden
Add firmware tests for partial file reads of request_firmware_into_buf. Signed-off-by: Scott Branden --- .../selftests/firmware/fw_filesystem.sh | 80 +++ 1 file changed, 80 insertions(+) diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing

[PATCH v6 2/8] firmware: add offset to request_firmware_into_buf

2020-06-05 Thread Scott Branden
Add offset to request_firmware_into_buf to allow for portions of firmware file to be read into a buffer. Necessary where firmware needs to be loaded in portions from file in memory constrained systems. Signed-off-by: Scott Branden --- drivers/base/firmware_loader/firmware.h | 5 +++ drivers

[PATCH v6 0/8] firmware: add partial read support in request_firmware_into_buf

2020-06-05 Thread Scott Branden
VK_IOCTL_ACCESS_BAR support from driver and use pci sysfs instead - remove bitfields - remove Kconfig default m - adjust formatting and some naming based on feedback - fix error handling conditions - use appropriate return codes - use memcpy_toio instead of direct access to PCIE bar Scott Branden (8

[PATCH v6 3/8] test_firmware: add partial read support for request_firmware_into_buf

2020-06-05 Thread Scott Branden
Add additional hooks to test_firmware to pass in support for partial file read using request_firmware_into_buf. buf_size: size of buffer to request firmware into partial: indicates that a partial file request is being made file_offset: to indicate offset into file to request Signed-off-by: Scott

[PATCH v6 6/8] misc: bcm-vk: add Broadcom VK driver

2020-06-05 Thread Scott Branden
updated and messages can then be sent to the card. Such messages contain scatter gather list of addresses to pull data from the host to perform operations on. Signed-off-by: Scott Branden Signed-off-by: Desmond Yan Signed-off-by: James Hu --- drivers/misc/Kconfig |1 + drivers/misc

[PATCH v6 1/8] fs: introduce kernel_pread_file* support

2020-06-05 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 opt=KERNEL_PREAD_WHOLE. Signed-off-by: Scott Branden --- fs/exec.c | 95

[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 + security/integrity/ima

[PATCH v6 5/8] bcm-vk: add bcm_vk UAPI

2020-06-05 Thread Scott Branden
Add user space api for bcm-vk driver. Signed-off-by: Scott Branden --- include/uapi/linux/misc/bcm_vk.h | 99 1 file changed, 99 insertions(+) create mode 100644 include/uapi/linux/misc/bcm_vk.h diff --git a/include/uapi/linux/misc/bcm_vk.h b/include/uapi

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 &&

Re: [PATCH v6 1/8] fs: introduce kernel_pread_file* support

2020-06-05 Thread Scott Branden
Hi Matthew, On 2020-06-05 8:20 p.m., Matthew Wilcox wrote: On Fri, Jun 05, 2020 at 03:59:52PM -0700, Scott Branden wrote: -int kernel_read_file(struct file *file, void **buf, loff_t *size, -loff_t max_size, enum kernel_read_file_id id) -{ - loff_t i_size, pos; +int

[PATCH v7 0/8] firmware: add partial read support in request_firmware_into_buf

2020-06-05 Thread Scott Branden
some naming based on feedback - fix error handling conditions - use appropriate return codes - use memcpy_toio instead of direct access to PCIE bar Scott Branden (8): fs: introduce kernel_pread_file* support firmware: add offset to request_firmware_into_buf test_firmware: add partial read

[PATCH v7 1/8] fs: introduce kernel_pread_file* support

2020-06-05 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 opt=KERNEL_PREAD_WHOLE. Signed-off-by: Scott Branden --- fs/exec.c | 95

[PATCH v7 5/8] bcm-vk: add bcm_vk UAPI

2020-06-05 Thread Scott Branden
Add user space api for bcm-vk driver. Signed-off-by: Scott Branden --- include/uapi/linux/misc/bcm_vk.h | 99 1 file changed, 99 insertions(+) create mode 100644 include/uapi/linux/misc/bcm_vk.h diff --git a/include/uapi/linux/misc/bcm_vk.h b/include/uapi

[PATCH v7 2/8] firmware: add offset to request_firmware_into_buf

2020-06-05 Thread Scott Branden
Add offset to request_firmware_into_buf to allow for portions of firmware file to be read into a buffer. Necessary where firmware needs to be loaded in portions from file in memory constrained systems. Signed-off-by: Scott Branden --- drivers/base/firmware_loader/firmware.h | 5 +++ drivers

[PATCH v7 4/8] firmware: test partial file reads of request_firmware_into_buf

2020-06-05 Thread Scott Branden
Add firmware tests for partial file reads of request_firmware_into_buf. Signed-off-by: Scott Branden --- .../selftests/firmware/fw_filesystem.sh | 80 +++ 1 file changed, 80 insertions(+) diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing

[PATCH v7 3/8] test_firmware: add partial read support for request_firmware_into_buf

2020-06-05 Thread Scott Branden
Add additional hooks to test_firmware to pass in support for partial file read using request_firmware_into_buf. buf_size: size of buffer to request firmware into partial: indicates that a partial file request is being made file_offset: to indicate offset into file to request Signed-off-by: Scott

[PATCH v7 6/8] misc: bcm-vk: add Broadcom VK driver

2020-06-05 Thread Scott Branden
updated and messages can then be sent to the card. Such messages contain scatter gather list of addresses to pull data from the host to perform operations on. Signed-off-by: Scott Branden Signed-off-by: Desmond Yan Signed-off-by: James Hu --- drivers/misc/Kconfig |1 + drivers/misc

[PATCH v7 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 + security/integrity/ima

[PATCH v7 7/8] MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver

2020-06-05 Thread Scott Branden
Add maintainer entry for new Broadcom VK Driver Signed-off-by: Scott Branden --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 411cd97bb485..ced084c526df 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3656,6 +3656,13 @@ L: net

Re: [PATCH v7 1/8] fs: introduce kernel_pread_file* support

2020-06-08 Thread Scott Branden
-06 8:52 a.m., Matthew Wilcox wrote: On Fri, Jun 05, 2020 at 10:04:51PM -0700, Scott Branden wrote: -int kernel_read_file(struct file *file, void **buf, loff_t *size, -loff_t max_size, enum kernel_read_file_id id) -{ - loff_t i_size, pos; Please note that how checkpatch

Re: [PATCH 0/5] qspi binding and DTS fixes

2020-08-27 Thread Scott Branden
Patch series looks good. Acked-by: Scott Branden On 2020-08-27 11:18 a.m., Florian Fainelli wrote: > Hi all, > > This patch series fixes incorrectly defined compatible strings for the > Broadcom QSPI controller which resulted in the strings not being > ordered from most to l

Re: [PATCH v3 00/19] Introduce partial kernel_read_file() support

2020-07-24 Thread Scott Branden
Scott's firmware and IMA patches ported and everything tests cleanly for me (even with CONFIG_IMA_APPRAISE=y). I think the intention is for this to go via Greg's tree since Scott's driver code will depend on it? v3 of this patch series looks good and passes all of my tests. Remaining

Re: [PATCH] i2c: iproc: fix race between client unreg and isr

2020-07-20 Thread Scott Branden
ve mode") Signed-off-by: Dhananjay Phadke Acked-by: Scott Branden --- drivers/i2c/busses/i2c-bcm-iproc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index b58224b7b..37d2a79e7 100644 ---

[PATCH] pwm: bcm-iproc: handle clk_get_rate() return

2020-07-17 Thread Scott Branden
From: Rayagonda Kokatanur Handle clk_get_rate() returning <= 0 condition to avoid possible division by zero. Fixes: daa5abc41c80 ("pwm: Add support for Broadcom iProc PWM controller") Signed-off-by: Rayagonda Kokatanur Signed-off-by: Scott Branden --- drivers/pwm/pwm-bcm-iproc.c

Re: [PATCH] pwm: bcm-iproc: handle clk_get_rate() return

2020-07-17 Thread Scott Branden
On 2020-07-17 10:22 a.m., Ray Jui wrote: On 7/17/2020 10:07 AM, Scott Branden wrote: From: Rayagonda Kokatanur Handle clk_get_rate() returning <= 0 condition to avoid possible division by zero. Fixes: daa5abc41c80 ("pwm: Add support for Broadcom iProc PWM controller")

[PATCH v2] pwm: bcm-iproc: handle clk_get_rate() return

2020-07-17 Thread Scott Branden
From: Rayagonda Kokatanur Handle clk_get_rate() returning <= 0 condition to avoid possible division by zero. Fixes: daa5abc41c80 ("pwm: Add support for Broadcom iProc PWM controller") Signed-off-by: Rayagonda Kokatanur Signed-off-by: Scott Branden --- Changes from v1: ensure &

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

Re: [PATCH 01/13] firmware_loader: EFI firmware loader must handle pre-allocated buffer

2020-07-17 Thread Scott Branden
mware: Add new platform fallback mechanism and firm ware_request_platform()") Cc: sta...@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Scott Branden --- To aid in backporting, this change is made before moving kernel_read_file() to separate header/source files. --- drivers/base/firmw

Re: [PATCH 02/13] fs/kernel_read_file: Remove FIRMWARE_PREALLOC_BUFFER enum

2020-07-17 Thread Scott Branden
7d ("firmware: support loading into a pre-allocated buffer") Fixes: fd90bc559bfb ("ima: based on policy verify firmware signatures (pre-allocated buffer)") Fixes: 4f0496d8ffa3 ("ima: based on policy warn about loading firmware (pre-allocated buffer)") Cc: sta..

Re: [PATCH 03/13] fs/kernel_read_file: Remove FIRMWARE_EFI_EMBEDDED enum

2020-07-17 Thread Scott Branden
tual validation of the firmware contents happening. Fixes: e4c2c0ff00ec ("firmware: Add new platform fallback mechanism and firmware_request_platform()") Cc: sta...@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Scott Branden --- To aid in backporting, this change is made before m

Re: [PATCH 05/13] fs/kernel_read_file: Split into separate source file

2020-07-17 Thread Scott Branden
On 2020-07-17 10:43 a.m., Kees Cook wrote: These routines are used in places outside of exec(2), so in preparation for refactoring them, move them into a separate source file, fs/kernel_read_file.c. Signed-off-by: Kees Cook Acked-by: Scott Branden --- fs/Makefile | 3

Re: [PATCH 00/13] Introduce partial kernel_read_file() support

2020-07-17 Thread Scott Branden
a() module: Call security_kernel_post_load_data() LSM: Add "contents" flag to kernel_read_file hook fs/kernel_file_read: Add "offset" arg for partial reads Scott Branden (1): fs/kernel_read_file: Split into separate include file drivers/base/firmware_loader/fallback.

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 argume

Re: [PATCH v2] pwm: bcm-iproc: handle clk_get_rate() return

2020-07-17 Thread Scott Branden
On 2020-07-17 4:04 p.m., Uwe Kleine-König wrote: On Fri, Jul 17, 2020 at 11:25:12AM -0700, Scott Branden wrote: From: Rayagonda Kokatanur Handle clk_get_rate() returning <= 0 condition to avoid possible division by zero. You advertise handling <= 0, but in the code only == 0 is c

[PATCH v3] pwm: bcm-iproc: handle clk_get_rate() return

2020-07-17 Thread Scott Branden
From: Rayagonda Kokatanur Handle clk_get_rate() returning 0 to avoid possible division by zero. Fixes: daa5abc41c80 ("pwm: Add support for Broadcom iProc PWM controller") Signed-off-by: Rayagonda Kokatanur Signed-off-by: Scott Branden Reviewed-off-by: Ray Jui --- Changes from

[PATCH v4] pwm: bcm-iproc: handle clk_get_rate() return

2020-07-17 Thread Scott Branden
From: Rayagonda Kokatanur Handle clk_get_rate() returning 0 to avoid possible division by zero. Fixes: daa5abc41c80 ("pwm: Add support for Broadcom iProc PWM controller") Signed-off-by: Rayagonda Kokatanur Signed-off-by: Scott Branden Reviewed-by: Ray Jui --- Changes from v3: fix

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 inclu

Kernel panic - not syncing: IO-APIC + timer doesn't work!

2020-07-27 Thread Scott Branden
Occasionally I get the following Kernel panic on boot.  This is running on the latest kernel but have seen it previously as well. "Kernel panic - not syncing: IO-APIC + timer doesn't work!  Boot with apic=debug and send a report." I don't know who I am support to send a report to.  But here is t

Re: [PATCH v3 00/19] Introduce partial kernel_read_file() support

2020-07-27 Thread Scott Branden
Hi Mimi/Kees, On 2020-07-27 4:16 a.m., Mimi Zohar wrote: > On Fri, 2020-07-24 at 14:36 -0700, Kees Cook wrote: >> v3: >> - add reviews/acks >> - add "IMA: Add support for file reads without contents" patch >> - trim CC list, in case that's why vger ignored v2 >> v2: [missing from lkml archives! (C

Re: Kernel panic - not syncing: IO-APIC + timer doesn't work!

2020-07-27 Thread Scott Branden
Bios now updated to latest.  Same kernel panic issue.  Log below. I think it is related to power cycling quickly. Should APIC work if PC power cycled in a few seconds or is that the problem? On 2020-07-27 1:51 p.m., Thomas Gleixner wrote: > Scott, > > Scott Branden writes: > >&

Re: Kernel panic - not syncing: IO-APIC + timer doesn't work!

2020-07-28 Thread Scott Branden
Hi Thomas, On 2020-07-28 1:22 a.m., Thomas Gleixner wrote: > Scott, > > Scott Branden writes: >> Bios now updated to latest.  Same kernel panic issue.  Log below. >> >> I think it is related to power cycling quickly. >> Should APIC work if PC power cycle

Re: [PATCH v3 00/19] Introduce partial kernel_read_file() support

2020-07-28 Thread Scott Branden
Hi Mimi, On 2020-07-28 11:48 a.m., Mimi Zohar wrote: > On Mon, 2020-07-27 at 12:18 -0700, Scott Branden wrote: >> Hi Mimi/Kees, >> >> On 2020-07-27 4:16 a.m., Mimi Zohar wrote: >>> On Fri, 2020-07-24 at 14:36 -0700, Kees Cook wrote: >>>> v3: >>&g

[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

[PATCH v10 4/9] test_firmware: add partial read support for request_firmware_into_buf

2020-07-06 Thread Scott Branden
Add additional hooks to test_firmware to pass in support for partial file read using request_firmware_into_buf. buf_size: size of buffer to request firmware into partial: indicates that a partial file request is being made file_offset: to indicate offset into file to request Signed-off-by: Scott

[PATCH v10 5/9] firmware: test partial file reads of request_partial_firmware_into_buf

2020-07-06 Thread Scott Branden
Add firmware tests for partial file reads of request_partial_firmware_into_buf. Signed-off-by: Scott Branden --- .../selftests/firmware/fw_filesystem.sh | 80 +++ 1 file changed, 80 insertions(+) diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools

[PATCH v10 3/9] firmware: add request_partial_firmware_into_buf

2020-07-06 Thread Scott Branden
Add request_partial_firmware_into_buf to allow for portions of firmware file to be read into a buffer. Necessary where firmware needs to be loaded in portions from file in memory constrained systems. Signed-off-by: Scott Branden --- drivers/base/firmware_loader/firmware.h | 5 ++ drivers/base

[PATCH v10 0/9] firmware: add request_partial_firmware_into_buf

2020-07-06 Thread Scott Branden
- remove Kconfig default m - adjust formatting and some naming based on feedback - fix error handling conditions - use appropriate return codes - use memcpy_toio instead of direct access to PCIE bar Scott Branden (9): fs: move kernel_read_file* to its own include file fs: introduce

[PATCH v10 1/9] fs: move kernel_read_file* to its own include file

2020-07-06 Thread Scott Branden
Move kernel_read_file* out of linux/fs.h to its own linux/kernel_read_file.h include file. That header gets pulled in just about everywhere and doesn't really need functions not related to the general fs interface. Suggested-by: Christoph Hellwig Signed-off-by: Scott Branden Review

[PATCH v10 9/9] ima: add FIRMWARE_PARTIAL_READ support

2020-07-06 Thread Scott Branden
Add FIRMWARE_PARTIAL_READ support for integrity measurement on partial reads of firmware files. Signed-off-by: Scott Branden --- security/integrity/ima/ima_main.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/security/integrity/ima/ima_main.c b

[PATCH v10 7/9] misc: bcm-vk: add Broadcom VK driver

2020-07-06 Thread Scott Branden
updated and messages can then be sent to the card. Such messages contain scatter gather list of addresses to pull data from the host to perform operations on. Signed-off-by: Scott Branden Signed-off-by: Desmond Yan Signed-off-by: James Hu --- drivers/misc/Kconfig |1 + drivers/misc

[PATCH v10 6/9] bcm-vk: add bcm_vk UAPI

2020-07-06 Thread Scott Branden
Add user space api for bcm-vk driver. Signed-off-by: Scott Branden --- include/uapi/linux/misc/bcm_vk.h | 99 1 file changed, 99 insertions(+) create mode 100644 include/uapi/linux/misc/bcm_vk.h diff --git a/include/uapi/linux/misc/bcm_vk.h b/include/uapi

[PATCH v10 8/9] MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver

2020-07-06 Thread Scott Branden
Add maintainer entry for new Broadcom VK Driver Signed-off-by: Scott Branden --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fb5fa302d05b..996e06f78f27 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3662,6 +3662,13 @@ L: net

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 2/4] fs: Remove FIRMWARE_PREALLOC_BUFFER from kernel_read_file() enums

2020-07-10 Thread Scott Branden
Hi Kees, This patch fails during booting of my system - see below. On 2020-07-07 1:19 a.m., Kees Cook wrote: FIRMWARE_PREALLOC_BUFFER is a "how", not a "what", and confuses the LSMs that are interested in filtering between types of things. The "how" should be an internal detail made uninteresti

Re: [PATCH 2/4] fs: Remove FIRMWARE_PREALLOC_BUFFER from kernel_read_file() enums

2020-07-10 Thread Scott Branden
On 2020-07-10 3:04 p.m., Matthew Wilcox wrote: On Fri, Jul 10, 2020 at 02:00:32PM -0700, Scott Branden wrote: @@ -950,8 +951,8 @@ int kernel_read_file(struct file *file, void **buf, loff_t *size, goto out; } - if (id != READING_FIRMWARE_PREALLOC_BUFFER

Re: [PATCH 2/4] fs: Remove FIRMWARE_PREALLOC_BUFFER from kernel_read_file() enums

2020-07-10 Thread Scott Branden
Hi Kees, On 2020-07-10 3:44 p.m., Kees Cook wrote: On Fri, Jul 10, 2020 at 03:10:25PM -0700, Scott Branden wrote: On 2020-07-10 3:04 p.m., Matthew Wilcox wrote: On Fri, Jul 10, 2020 at 02:00:32PM -0700, Scott Branden wrote: @@ -950,8 +951,8 @@ int kernel_read_file(struct file *file, void

Re: [PATCH 2/4] fs: Remove FIRMWARE_PREALLOC_BUFFER from kernel_read_file() enums

2020-07-16 Thread Scott Branden
Hi Kees On 2020-07-10 3:44 p.m., Kees Cook wrote: On Fri, Jul 10, 2020 at 03:10:25PM -0700, Scott Branden wrote: On 2020-07-10 3:04 p.m., Matthew Wilcox wrote: On Fri, Jul 10, 2020 at 02:00:32PM -0700, Scott Branden wrote: @@ -950,8 +951,8 @@ int kernel_read_file(struct file *file, void

Re: [PATCH] PCI: Don't use Printk in raw_spinlocks

2020-09-10 Thread Scott Branden
On 2020-09-10 7:21 a.m., Rob Herring wrote: > On Wed, Sep 9, 2020 at 8:07 PM Bjorn Helgaas wrote: >> [+cc Mark, Florian, Rob, Scott] >> >> On Sat, Aug 01, 2020 at 09:25:49AM +0800, Xingxing Su wrote: >>> Do not use printk in raw_spinlocks, >>> it will cause BUG: Invalid wait context. >>> >>> Th

Re: [PATCH v3 1/3] bcm-vk: add bcm_vk UAPI

2020-09-23 Thread Scott Branden
Hi Greg, On 2020-09-07 5:35 a.m., Greg Kroah-Hartman wrote: > On Tue, Aug 25, 2020 at 12:43:58PM -0700, Scott Branden wrote: >> Add user space api for bcm-vk driver. >> >> Signed-off-by: Scott Branden >> --- >> include/uapi/linux/misc/bcm_vk.h | 99 ++

Re: [PATCH v3 2/3] misc: bcm-vk: add Broadcom VK driver

2020-09-24 Thread Scott Branden
Hi Greg, Responses below.  I'll send out the split up patches hopefully today/tomorrow which may make it a bit easier to understand/comment on. On 2020-09-23 10:08 p.m., Greg Kroah-Hartman wrote: > On Wed, Sep 23, 2020 at 09:43:55PM -0700, Scott Branden wrote: >>>>

Re: [PATCH v3 1/1] fs: move kernel_read_file* to its own include file

2020-06-30 Thread Scott Branden
Hi Al (Viro), Are you able to take this patch into your tree or does someone else? On 2020-06-24 12:55 a.m., Christoph Hellwig wrote: Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] fs: move kernel_read_file* to its own include file

2020-06-16 Thread Scott Branden
Hi Greg, On 2020-06-16 10:26 p.m., Greg Kroah-Hartman wrote: On Tue, Jun 16, 2020 at 08:31:52PM -0700, Scott Branden wrote: Move kernel_read_file* to it own kernel_read_file.h include file. That says what you did, but not _why_ you are doing it :( I have no real opinion as to where these

[PATCH v2 1/1] fs: move kernel_read_file* to its own include file

2020-06-17 Thread Scott Branden
Move kernel_read_file* out of linux/fs.h to its own linux/kernel_read_file.h include file. That header gets pulled in just about everywhere and doesn't really need functions not related to the general fs interface. Suggested-by: Christoph Hellwig Signed-off-by: Scott Branden --- drivers

[PATCH v3 1/1] fs: move kernel_read_file* to its own include file

2020-06-17 Thread Scott Branden
Move kernel_read_file* out of linux/fs.h to its own linux/kernel_read_file.h include file. That header gets pulled in just about everywhere and doesn't really need functions not related to the general fs interface. Suggested-by: Christoph Hellwig Signed-off-by: Scott Branden --- Changes

Re: [PATCH] ARM: dts: bcm: Align L2 cache-controller nodename with dtschema

2020-06-26 Thread Scott Branden
Thanks for cleanup. On 2020-06-26 1:06 a.m., Krzysztof Kozlowski wrote: Fix dtschema validator warnings like: l2-cache@22000: $nodename:0: 'l2-cache@22000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Ack

Re: [PATCH 1/4] pwm: bcm-iproc: Remove impossible comparison when validating duty cycle

2020-06-29 Thread Scott Branden
ed expression < 0 is always false [-Wtype-limits] Cc: Ray Jui Cc: Scott Branden Cc: Yendapally Reddy Dhananjaya Reddy Cc: bcm-kernel-feedback-l...@broadcom.com Cc: linux-...@vger.kernel.org Signed-off-by: Lee Jones And IPROC_PWM_DUTY_CYCLE_MIN is unused after remove this single use of the def

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

Re: [PATCH v5 6/7] misc: bcm-vk: add Broadcom VK driver

2020-05-12 Thread Scott Branden
Hi Luis, On 2020-05-12 5:38 p.m., Luis Chamberlain wrote: On Thu, May 07, 2020 at 05:27:38PM -0700, Scott Branden wrote: +#if defined(CONFIG_REQ_FW_INTO_BUF_PRIV) + +#define KERNEL_PREAD_FLAG_PART 0x0001 /* Allow reading part of file */ +#define REQUEST_FIRMWARE_INTO_BUF

[PATCH v9 1/8] fs: introduce kernel_pread_file* support

2020-06-15 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/fs.h | 15 2 files changed, 85 insertions(+), 23 deletions

[PATCH v9 2/8] firmware: add request_partial_firmware_into_buf

2020-06-15 Thread Scott Branden
Add request_partial_firmware_into_buf to allow for portions of firmware file to be read into a buffer. Necessary where firmware needs to be loaded in portions from file in memory constrained systems. Signed-off-by: Scott Branden --- drivers/base/firmware_loader/firmware.h | 5 ++ drivers/base

[PATCH v9 3/8] test_firmware: add partial read support for request_firmware_into_buf

2020-06-15 Thread Scott Branden
Add additional hooks to test_firmware to pass in support for partial file read using request_firmware_into_buf. buf_size: size of buffer to request firmware into partial: indicates that a partial file request is being made file_offset: to indicate offset into file to request Signed-off-by: Scott

[PATCH v9 6/8] misc: bcm-vk: add Broadcom VK driver

2020-06-15 Thread Scott Branden
updated and messages can then be sent to the card. Such messages contain scatter gather list of addresses to pull data from the host to perform operations on. Signed-off-by: Scott Branden Signed-off-by: Desmond Yan Signed-off-by: James Hu --- drivers/misc/Kconfig |1 + drivers/misc

[PATCH v9 5/8] bcm-vk: add bcm_vk UAPI

2020-06-15 Thread Scott Branden
Add user space api for bcm-vk driver. Signed-off-by: Scott Branden --- include/uapi/linux/misc/bcm_vk.h | 99 1 file changed, 99 insertions(+) create mode 100644 include/uapi/linux/misc/bcm_vk.h diff --git a/include/uapi/linux/misc/bcm_vk.h b/include/uapi

[PATCH v9 4/8] firmware: test partial file reads of request_partial_firmware_into_buf

2020-06-15 Thread Scott Branden
Add firmware tests for partial file reads of request_partial_firmware_into_buf. Signed-off-by: Scott Branden --- .../selftests/firmware/fw_filesystem.sh | 80 +++ 1 file changed, 80 insertions(+) diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools

[PATCH v9 0/8] firmware: add request_partial_firmware_into_buf

2020-06-15 Thread Scott Branden
PCIE bar Scott Branden (8): fs: introduce kernel_pread_file* support firmware: add request_partial_firmware_into_buf test_firmware: add partial read support for request_firmware_into_buf firmware: test partial file reads of request_partial_firmware_into_buf bcm-vk: add bcm_vk UAPI misc

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

2020-06-15 Thread Scott Branden
Add FIRMWARE_PARTIAL_READ support for integrity measurement on partial reads of firmware files. Signed-off-by: Scott Branden --- security/integrity/ima/ima_main.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/security/integrity/ima/ima_main.c b

[PATCH v9 7/8] MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver

2020-06-15 Thread Scott Branden
Add maintainer entry for new Broadcom VK Driver Signed-off-by: Scott Branden --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 83078661cd2b..ce29c7d0b228 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3657,6 +3657,13 @@ L: net

Re: [PATCH v9 1/8] fs: introduce kernel_pread_file* support

2020-06-16 Thread Scott Branden
Hi Christoph, On 2020-06-16 12:34 a.m., Christoph Hellwig wrote: Seriously, no more additions to fs.h for this interface please. As requested before as the very first thing move it out of this header used by just about every file in the kernel. That is in addition to all the other issues with

[PATCH] fs: move kernel_read_file* to its own include file

2020-06-16 Thread Scott Branden
Move kernel_read_file* to it own kernel_read_file.h include file. Suggested-by: Christoph Hellwig Signed-off-by: Scott Branden --- drivers/base/firmware_loader/main.c | 1 + fs/exec.c | 1 + include/linux/fs.h | 39 -- include

Re: [PATCH v7 1/8] fs: introduce kernel_pread_file* support

2020-06-09 Thread Scott Branden
Hi Matthew, On 2020-06-09 6:21 a.m., Matthew Wilcox wrote: On Mon, Jun 08, 2020 at 03:29:22PM -0700, Scott Branden wrote: Hi Matthew, I am requesting the experts in the filesystem subsystem to come to a consensus here. This is not my area of expertise at all but every time I have addressed

[PATCH v8 0/8] firmware: add request_partial_firmware_into_buf

2020-06-09 Thread Scott Branden
instead - remove bitfields - remove Kconfig default m - adjust formatting and some naming based on feedback - fix error handling conditions - use appropriate return codes - use memcpy_toio instead of direct access to PCIE bar Scott Branden (8): fs: introduce kernel_pread_file* support firmware

[PATCH v8 1/8] fs: introduce kernel_pread_file* support

2020-06-09 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/fs.h | 15 2 files changed, 85 insertions(+), 23 deletions

[PATCH v8 5/8] bcm-vk: add bcm_vk UAPI

2020-06-09 Thread Scott Branden
Add user space api for bcm-vk driver. Signed-off-by: Scott Branden --- include/uapi/linux/misc/bcm_vk.h | 99 1 file changed, 99 insertions(+) create mode 100644 include/uapi/linux/misc/bcm_vk.h diff --git a/include/uapi/linux/misc/bcm_vk.h b/include/uapi

[PATCH v8 2/8] firmware: add offset to request_firmware_into_buf

2020-06-09 Thread Scott Branden
Add offset to request_firmware_into_buf to allow for portions of firmware file to be read into a buffer. Necessary where firmware needs to be loaded in portions from file in memory constrained systems. Signed-off-by: Scott Branden --- drivers/base/firmware_loader/firmware.h | 5 ++ drivers

[PATCH v8 7/8] MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver

2020-06-09 Thread Scott Branden
Add maintainer entry for new Broadcom VK Driver Signed-off-by: Scott Branden --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5985a7847316..28e3dc1d3244 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3656,6 +3656,13 @@ L: net

[PATCH v8 6/8] misc: bcm-vk: add Broadcom VK driver

2020-06-09 Thread Scott Branden
updated and messages can then be sent to the card. Such messages contain scatter gather list of addresses to pull data from the host to perform operations on. Signed-off-by: Scott Branden Signed-off-by: Desmond Yan Signed-off-by: James Hu --- drivers/misc/Kconfig |1 + drivers/misc

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

2020-06-09 Thread Scott Branden
Add FIRMWARE_PARTIAL_READ support for integrity measurement on partial reads of firmware files. Signed-off-by: Scott Branden --- security/integrity/ima/ima_main.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/security/integrity/ima/ima_main.c b

[PATCH v8 3/8] test_firmware: add partial read support for request_firmware_into_buf

2020-06-09 Thread Scott Branden
Add additional hooks to test_firmware to pass in support for partial file read using request_firmware_into_buf. buf_size: size of buffer to request firmware into partial: indicates that a partial file request is being made file_offset: to indicate offset into file to request Signed-off-by: Scott

[PATCH v8 4/8] firmware: test partial file reads of request_firmware_into_buf

2020-06-09 Thread Scott Branden
Add firmware tests for partial file reads of request_firmware_into_buf. Signed-off-by: Scott Branden --- .../selftests/firmware/fw_filesystem.sh | 80 +++ 1 file changed, 80 insertions(+) diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing

[PATCH v5 2/7] firmware: add offset to request_firmware_into_buf

2020-05-07 Thread Scott Branden
Add offset to request_firmware_into_buf to allow for portions of firmware file to be read into a buffer. Necessary where firmware needs to be loaded in portions from file in memory constrained systems. Signed-off-by: Scott Branden --- drivers/base/firmware_loader/firmware.h | 5 +++ drivers

[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

[PATCH v5 5/7] bcm-vk: add bcm_vk UAPI

2020-05-07 Thread Scott Branden
Add user space api for bcm-vk driver. Signed-off-by: Scott Branden --- include/uapi/linux/misc/bcm_vk.h | 99 1 file changed, 99 insertions(+) create mode 100644 include/uapi/linux/misc/bcm_vk.h diff --git a/include/uapi/linux/misc/bcm_vk.h b/include/uapi

[PATCH v5 4/7] firmware: test partial file reads of request_firmware_into_buf

2020-05-07 Thread Scott Branden
Add firmware tests for partial file reads of request_firmware_into_buf. Signed-off-by: Scott Branden --- .../selftests/firmware/fw_filesystem.sh | 80 +++ 1 file changed, 80 insertions(+) diff --git a/tools/testing/selftests/firmware/fw_filesystem.sh b/tools/testing

[PATCH v5 0/7] firmware: add partial read support in request_firmware_into_buf

2020-05-07 Thread Scott Branden
appropriate return codes - use memcpy_toio instead of direct access to PCIE bar Scott Branden (7): fs: introduce kernel_pread_file* support firmware: add offset to request_firmware_into_buf test_firmware: add partial read support for request_firmware_into_buf firmware: test partial file

[PATCH v5 3/7] test_firmware: add partial read support for request_firmware_into_buf

2020-05-07 Thread Scott Branden
Add additional hooks to test_firmware to pass in support for partial file read using request_firmware_into_buf. buf_size: size of buffer to request firmware into partial: indicates that a partial file request is being made file_offset: to indicate offset into file to request Signed-off-by: Scott

[PATCH v5 7/7] MAINTAINERS: bcm-vk: add maintainer for Broadcom VK Driver

2020-05-07 Thread Scott Branden
Add maintainer entry for new Broadcom VK Driver Signed-off-by: Scott Branden --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 88bf36ab2b22..63eec54250f0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3612,6 +3612,13 @@ L: net

[PATCH v5 6/7] misc: bcm-vk: add Broadcom VK driver

2020-05-07 Thread Scott Branden
updated and messages can then be sent to the card. Such messages contain scatter gather list of addresses to pull data from the host to perform operations on. Signed-off-by: Scott Branden Signed-off-by: Desmond Yan Signed-off-by: James Hu --- drivers/misc/Kconfig|1 + drivers

<    3   4   5   6   7   8   9   >