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: <b8e9239fd2a74c1187aea671f89cd854@ausx13mpc120.AMER.DELL.COM>
Date:   Mon, 9 Jul 2018 04:14:50 +0000
From:   <Mario.Limonciello@...l.com>
To:     <pali.rohar@...il.com>, <damien@...o.net>
CC:     <mjg59@...f.ucam.org>, <dvhart@...radead.org>,
        <andy@...radead.org>, <platform-driver-x86@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] dell-laptop: Fix backlight detection

> -----Original Message-----
> From: Pali Rohár [mailto:pali.rohar@...il.com]
> Sent: Sunday, July 8, 2018 8:09 AM
> To: Damien Thébault
> Cc: Matthew Garrett; Darren Hart; Andy Shevchenko; Limonciello, Mario; platform-
> driver-x86@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH] dell-laptop: Fix backlight detection
> 
> On Sunday 08 July 2018 17:02:20 Damien Thébault wrote:
> > Fix return code check for "max brightness" ACPI call.
> >
> > The dell laptop ACPI video brightness control is not present on dell
> > laptops anymore, but was present in older kernel versions.
> >
> > The code that checks the return value is incorrect since the SMM
> > refactoring.
> >
> > The old code was:
> >   if (buffer->output[0] == 0)
> >
> > Which was changed to:
> >   ret = dell_send_request(...)
> >   if (ret)
> >
> > However, dell_send_request() will return 0 if buffer->output[0] == 0,
> > so we must change the check to:
> >   if (ret == 0)
> 
> You are right, dell_send_request() return non-zero value on error.
> 
> > This issue was found on a Dell M4800 laptop, and the fix tested on it
> > as well.
> >
> > Fixes: 549b4930f057 ("dell-smbios: Introduce dispatcher for SMM calls")
> > Signed-off-by: Damien Thébault <damien@...o.net>
> > Tested-by: Damien Thébault <damien@...o.net>
> > ---
> >  drivers/platform/x86/dell-laptop.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/platform/x86/dell-laptop.c
> > b/drivers/platform/x86/dell-laptop.c index f1fa8612db40..06978c14c83b
> > 100644 --- a/drivers/platform/x86/dell-laptop.c
> > +++ b/drivers/platform/x86/dell-laptop.c
> > @@ -2185,7 +2185,7 @@ static int __init dell_init(void)
> >  		dell_fill_request(&buffer, token->location, 0, 0, 0);
> >  		ret = dell_send_request(&buffer,
> >  					CLASS_TOKEN_READ,
> > SELECT_TOKEN_AC);
> > -		if (ret)
> > +		if (ret == 0)
> >  			max_intensity = buffer.output[3];
> >  	}
> >
> 
> Reviewed-by: Pali Rohár <pali.rohar@...il.com>
> 

Thanks for this catch.

Reviewed-by: Mario Limonciello <mario.limonciello@...l.com>

This should probably go to stable as well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ