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: <ZpTopJi7GJSLaF99@linaro.org>
Date: Mon, 15 Jul 2024 11:15:16 +0200
From: Stephan Gerhold <stephan.gerhold@...aro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Cc: Sebastian Reichel <sre@...nel.org>, linux-arm-msm@...r.kernel.org,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Bjorn Andersson <andersson@...nel.org>,
	Abel Vesa <abel.vesa@...aro.org>, Johan Hovold <johan@...nel.org>,
	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: Re: [PATCH] power: supply: qcom_battmgr: Ignore extra __le32 in info
 payload

On Sat, Jul 13, 2024 at 07:17:51PM +0300, Dmitry Baryshkov wrote:
> On Fri, Jul 12, 2024 at 12:00:03PM GMT, Stephan Gerhold wrote:
> > Some newer ADSP firmware versions on X1E80100 report an extra __le32 at the
> > end of the battery information request payload, causing qcom_battmgr to
> > fail to initialize. Adjust the check to ignore the extra field in the info
> > payload so we can support both old and newer firmware versions.
> > 
> > Tested-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> > Signed-off-by: Stephan Gerhold <stephan.gerhold@...aro.org>
> > ---
> >  drivers/power/supply/qcom_battmgr.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c
> > index 46f36dcb185c..a5b5f1251af1 100644
> > --- a/drivers/power/supply/qcom_battmgr.c
> > +++ b/drivers/power/supply/qcom_battmgr.c
> > @@ -1007,7 +1007,9 @@ static void qcom_battmgr_sc8280xp_callback(struct qcom_battmgr *battmgr,
> >  		battmgr->error = 0;
> >  		break;
> >  	case BATTMGR_BAT_INFO:
> > -		if (payload_len != sizeof(resp->info)) {
> > +		/* some firmware versions report an extra __le32 at the end of the payload */
> 
> Any useful information in that extra?
> 

No, I don't think so. I think we can just ignore it.

Thanks,
Stephan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ