lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <159c5fcf-709d-42ba-8d45-a70b109fe261@broadcom.com>
Date: Wed, 4 Sep 2024 09:55:48 -0700
From: florian.fainelli@...adcom.com
To: Riyan Dhiman <riyandhiman14@...il.com>, jim2101024@...il.com,
 nsaenz@...nel.org, lorian.fainelli@...adcom.com,
 bcm-kernel-feedback-list@...adcom.com, bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org, linux-rpi-kernel@...ts.infradead.org,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH next] PCI: brmstb: Fix type mismatch for num_inbound_wins
 in brcm_pcie_setup()

On 9/4/24 09:19, Riyan Dhiman wrote:
> Change num_inbound_wins from u8 to int in brcm_pcie_setup() function to correctly
> handle potential negative error codes returned by brcm_pcie_get_inbound_wins().
> The u8 type was inappropriate for capturing the function's return value,
> which can include error codes.
> 
> Signed-off-by: Riyan Dhiman <riyandhiman14@...il.com>

This looks fine, however it seems like we could either:

- update brcm_pcie_get_inbound_wins() to take a reference to an u8 and 
assign num_inbound_wins directly plus return a negative error code

or

- update brcm_pcie_get_inbound_wins() to return 0 when encountering an error

We should have at least 1 inbound window to operate this PCIe 
controller, so if we get 0, nothing useful is going to happen.

Deferring to Jim as to whether he prefers to take your patch or fix it 
in a different way. Thanks!
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ