2021-08-18 17:34:46

by Kees Cook

[permalink] [raw]
Subject: [PATCH v2 0/2] USB: EHCI: Add register array bounds to HCS ports

Hi,

This is cleaning up some of the remaining things to be able to apply
-Warray-bounds and -Wzero-length-bounds globally. Only after doing my
own version of the port_status patch did I find Arnd's earlier
patches, including for the weird Broadcom stuff[1].

No binary differences.

v2:
- use 0x80 as base for brcm registers (stern)
- switch HCS_N_PORTS_MAX to decimal (stern)
- update various comments (stern)
v1: https://lore.kernel.org/lkml/[email protected]

Thanks!

-Kees

[1] https://lore.kernel.org/lkml/[email protected]/#t

Kees Cook (2):
USB: EHCI: Add register array bounds to HCS ports
USB: EHCI: Add alias for Broadcom INSNREG

drivers/usb/host/ehci-brcm.c | 11 ++++-------
include/linux/usb/ehci_def.h | 33 +++++++++++++++++++++------------
2 files changed, 25 insertions(+), 19 deletions(-)

--
2.30.2


2021-08-18 17:52:14

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] USB: EHCI: Add register array bounds to HCS ports

On Wed, Aug 18, 2021 at 10:30:16AM -0700, Kees Cook wrote:
> Hi,
>
> This is cleaning up some of the remaining things to be able to apply
> -Warray-bounds and -Wzero-length-bounds globally. Only after doing my
> own version of the port_status patch did I find Arnd's earlier
> patches, including for the weird Broadcom stuff[1].
>
> No binary differences.
>
> v2:
> - use 0x80 as base for brcm registers (stern)
> - switch HCS_N_PORTS_MAX to decimal (stern)
> - update various comments (stern)
> v1: https://lore.kernel.org/lkml/[email protected]
>
> Thanks!
>
> -Kees
>
> [1] https://lore.kernel.org/lkml/[email protected]/#t
>
> Kees Cook (2):
> USB: EHCI: Add register array bounds to HCS ports
> USB: EHCI: Add alias for Broadcom INSNREG
>
> drivers/usb/host/ehci-brcm.c | 11 ++++-------
> include/linux/usb/ehci_def.h | 33 +++++++++++++++++++++------------
> 2 files changed, 25 insertions(+), 19 deletions(-)

For both patches:

Acked-by: Alan Stern <[email protected]>