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] [day] [month] [year] [list]
Message-ID: <f042fea0-3977-40cb-a3b1-129ceee5b3bd@prolan.hu>
Date: Sun, 8 Dec 2024 14:00:52 +0100
From: Csókás Bence <csokas.bence@...lan.hu>
To: Kees Bakker <kees@...erbout.nl>, <linux-pm@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
CC: Samuel Holland <samuel@...lland.org>, Sebastian Reichel <sre@...nel.org>
Subject: Re: [PATCH v5 3/8] power: ip5xxx_power: Allow for more parameters to
 be configured

Hi,

On 2024. 12. 06. 20:51, Kees Bakker wrote:
> Op 19-11-2024 om 19:07 schreef Csókás, Bence:
>> Other parts such as IP5306 may support other battery voltages and
>> have different constants for input voltage regulation. Allow these
>> to be passed from `struct ip5xxx_regfield_config`.
>>
>> Signed-off-by: Csókás, Bence <csokas.bence@...lan.hu>
>> ---
>>   drivers/power/supply/ip5xxx_power.c | 43 ++++++++++++++++++++++++++---
>>   1 file changed, 39 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/power/supply/ip5xxx_power.c 
>> b/drivers/power/supply/ip5xxx_power.c
>> index 41d91504eb32..a939dbfe8d23 100644
>> --- a/drivers/power/supply/ip5xxx_power.c
>> +++ b/drivers/power/supply/ip5xxx_power.c
>> [...]
>>   /*
>> @@ -328,6 +348,9 @@ static int ip5xxx_battery_get_voltage_max(struct 
>> ip5xxx *ip5xxx, int *val)
>>       if (ret)
>>           return ret;
>> +    if (*val > ip5xxx->vbat_max)
>> +        return -EINVAL;
> This is introducing the read of an uninitialized variable.
> You have to check all the callers of ip5xxx_battery_get_voltage_max()
> and what variable *val is pointing to. For example in
> ip5xxx_battery_get_property() the variable vmax is not initialized,
> while its address is passed to ip5xxx_battery_get_voltage_max()
> 
> But maybe the intention was to check rval instead of *val?
> [...]

That was supposed to go in set_voltage_max()... I'll send a fix shortly.

Bence


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ