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: <1df4816e-8d16-e894-e99e-ee16cd1c4cb8@rock-chips.com>
Date:   Mon, 15 Apr 2019 09:46:54 +0800
From:   Shawn Lin <shawn.lin@...k-chips.com>
To:     Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        Colin King <colin.king@...onical.com>
Cc:     shawn.lin@...k-chips.com, Bjorn Helgaas <bhelgaas@...gle.com>,
        Heiko Stuebner <heiko@...ech.de>, linux-pci@...r.kernel.org,
        linux-rockchip@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PCI: rockchip: fix bitwise operations on status and
 ROCKCHIP_PCIE_EP_CMD_STATUS_IS


On 2019/4/12 17:51, Lorenzo Pieralisi wrote:
> On Sat, Mar 30, 2019 at 03:09:10PM +0000, Colin King wrote:
>> From: Colin Ian King <colin.king@...onical.com>
>>
>> Currently the bitwise operations on the u16 variable 'status' with
>> the setting ROCKCHIP_PCIE_EP_CMD_STATUS_IS are incorrect because
>> ROCKCHIP_PCIE_EP_CMD_STATUS_IS is 1UL<<19 which is wider than the
>> u16 variable.  Fix this by making status a u32.  (Not tested).
>>
>> Fixes: cf590b078391 ("PCI: rockchip: Add EP driver for Rockchip PCIe controller")
>> Signed-off-by: Colin Ian King <colin.king@...onical.com>
>> ---
>>   drivers/pci/controller/pcie-rockchip-ep.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Shawn,
> 
> I need your ACK on this patch, thanks.

Acked-by: Shawn Lin <shawn.lin@...k-chips.com>

> 
> Lorenzo
> 
>> diff --git a/drivers/pci/controller/pcie-rockchip-ep.c b/drivers/pci/controller/pcie-rockchip-ep.c
>> index a5d799e2dff2..d743b0a48988 100644
>> --- a/drivers/pci/controller/pcie-rockchip-ep.c
>> +++ b/drivers/pci/controller/pcie-rockchip-ep.c
>> @@ -350,7 +350,7 @@ static void rockchip_pcie_ep_assert_intx(struct rockchip_pcie_ep *ep, u8 fn,
>>   	struct rockchip_pcie *rockchip = &ep->rockchip;
>>   	u32 r = ep->max_regions - 1;
>>   	u32 offset;
>> -	u16 status;
>> +	u32 status;
>>   	u8 msg_code;
>>   
>>   	if (unlikely(ep->irq_pci_addr != ROCKCHIP_PCIE_EP_PCI_LEGACY_IRQ_ADDR ||
>> -- 
>> 2.20.1
>>
> 
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ