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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 3 Mar 2016 19:46:32 +0100
From:	Michał Kępień <kernel@...pniu.pl>
To:	Darren Hart <dvhart@...radead.org>
Cc:	Pali Rohár <pali.rohar@...il.com>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	Darek Stojaczyk <darek.stojaczyk@...il.com>,
	platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 4/5] dell-wmi: properly process Dell Instant Launch
 hotkey

> Your description below helped explain why the KE_KEY change was necessary, the
> commit message didn't do that for me. Just explicitly stating "when there is no
> i8042 interrupt, the WMI even must generate a valid KE_KEY" or something along
> those lines would help.

I will do that in v5, then.

> > > > > > > > >  	{ KE_IGNORE, 0xe026, { KEY_RESERVED } },
> > > > > > > > >  	
> > > > > > > > >  	{ KE_IGNORE, 0xe02e, { KEY_VOLUMEDOWN } },
> > > > > > > > > 
> > > > > > > > > @@ -235,6 +235,9 @@ static void dell_wmi_process_key(int
> > > > > > > > > reported_key)
> > > > > > > > > 
> > > > > > > > >  	    acpi_video_handles_brightness_key_presses())
> > > > > > > > >  		
> > > > > > > > >  		return;
> > > > > > > > > 
> > > > > > > > > +	if (key->keycode == KEY_PROG4 &&
> > > > > > > > > !wmi_requires_smbios_request) +		return;
> > > > > > > > > +
> > > > > > > > 
> > > > > > > > Here I would rather test against reported_key, not keycode. If
> > > > > > > > somebody in future adds KEY_PROG4 for something else we will
> > > > > > > > have problem...
> 
> And ultimately, that is under our control. So let's just not do that :-)
> 
> A comment by the definition of KEY_PROG4 that notes it's meaning in this driver
> should prevent any future attempts at overloading it and breaking this.

As I'll be sending a v5 anyway, do you think Pali's idea is bad?
Personally, I'm leaning towards it.  IMHO comparing against reported_key
would emphasize the fact that only event 0xe025 is "special" and chances
are that there are no other WMI event codes which need to be handled
this way.

-- 
Best regards,
Michał Kępień

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ