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]
Date:   Wed, 11 Aug 2021 13:29:40 +0200
From:   Michal Simek <michal.simek@...inx.com>
To:     Michael Tretter <m.tretter@...gutronix.de>,
        Michal Simek <michal.simek@...inx.com>
CC:     <linux-kernel@...r.kernel.org>, <monstr@...str.eu>,
        <git@...inx.com>,
        "Sai Krishna Potthuri" <lakshmi.sai.krishna.potthuri@...inx.com>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        <linux-arm-kernel@...ts.infradead.org>, <kernel@...gutronix.de>
Subject: Re: [PATCH] reset: reset-zynqmp: Fixed the argument data type



On 8/11/21 12:36 PM, Michael Tretter wrote:
> On Wed, 23 Jun 2021 13:46:20 +0200, Michal Simek wrote:
>> From: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@...inx.com>
>>
>> This patch changes the data type of the variable 'val' from
>> int to u32.
>>
>> Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@...inx.com>
>> Signed-off-by: Michal Simek <michal.simek@...inx.com>
>> Addresses-Coverity: argument of type "int *" is incompatible with parameter of type "u32 *"
>> ---
>>
>>  drivers/reset/reset-zynqmp.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/reset/reset-zynqmp.c b/drivers/reset/reset-zynqmp.c
>> index daa425e74c96..59dc0ff9af9e 100644
>> --- a/drivers/reset/reset-zynqmp.c
>> +++ b/drivers/reset/reset-zynqmp.c
>> @@ -53,7 +53,8 @@ static int zynqmp_reset_status(struct reset_controller_dev *rcdev,
>>  			       unsigned long id)
>>  {
>>  	struct zynqmp_reset_data *priv = to_zynqmp_reset_data(rcdev);
>> -	int val, err;
>> +	int err;
>> +	u32 val;
> 
> The function returns val as int instead of u32. While this shouldn't be a
> problem in this case, maybe there should be an additional check just to be
> sure?

As far as I can tell coverity is not reporting any issue around it.
And when I look at internal of that function in firmware this function
in case of success returns only 0 or 1 that's why I don't think we need
to do anything with it.

Thanks,
Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ