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: <4278344.duCujNBB8t@xps13>
Date:	Thu, 25 Dec 2014 22:55:57 +0100
From:	Gabriele Mazzotta <gabriele.mzt@...il.com>
To:	Pali Rohár <pali.rohar@...il.com>
Cc:	Alex Hung <alex.hung@...onical.com>,
	Darren Hart <dvhart@...radead.org>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	"platform-driver-x86@...r.kernel.org" 
	<platform-driver-x86@...r.kernel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] Dell Airplane Mode Switch driver

On Thursday 25 December 2014 21:11:05 Pali Rohár wrote:
> I will try to recap all information which we have...
> 
> *) We should not send wireless key press to userspace when BIOS 
> already handles wireless state (and enable/disable wifi): 
> http://www.spinics.net/lists/platform-driver-x86/msg05922.html
> 
> *) some tested dell machines does not implement GRBT method (or 
> report constant value) which could return state of wireless 
> (enabled/disabled) -- e.g. Inspiron 7447
> 
> *) dell-wireless driver is doing nothing on devices which have 
> wireless slider switch (except calling CRBT/ARBT methods)
> 
> *) all tested machines emit key with keycode 240 (scancode is 
> probably 136 = 0x88) to userspace via i8042 bus/AT keyboard when 
> wireless button/slider is pressed/switched
> 
> *) both drivers dell-wireless and dell-rbtn do not implement 
> setting soft rfkill state (or change wifi state)
> 
> So in my opinion: if we decide to use driver for acpi DELLABCE 
> device we should use dell-rbnt for devices with hw slider switch 
> and dell-wireless for devices with fn button. I think it does not 
> make sense to use dell-wireless for devices with hw slider 
> because it do nothing and dell-rbtn for devices with fn key 
> button as GRBT does not working properly.

Here the problem. We are determining which laptop has an hardware
slider and which doesn't calling CRBT. If the returned value is 2
or 3, then the laptop has an hardware slider. However, it cannot be
assumed the opposite if the returned value is 0 or 1.

See the acpidumps Alex uploaded. The Inspiron 3543 returns 0 when
CRBT is called and so does the Inspiron 7447. However, the former
doesn't have a working ARBT method and, if I'm not wrong, its BIOS
doesn't handle radio devices. The BIOS of the latter can handle
radio and has a working ARBT method to make it stop from doing that.

Since we determine when the BIOS might not be able to control radio
devices through CRBT and we can't say it for sure (in the example
above, CRBT returned the same value), we make sure that the BIOS
doesn't handle radio devices by calling ARBT. We can ensure this
(e.g. Inspirong 7447), but we can't ensure the opposite (e.g.
Inspiron 3453).

If there was a way to determine which laptop really needs
dell-wireless, calling ARBT wouldn't have been necessary, but that's
not the case. Users can always blacklist the module if they know
their laptop can work as expected without it, but we have to ensure
that everything always works.

This is what I understood by looking at the acpidumps, so I could
be wrong.

> And second note: Do we need some driver for acpi DELLABCE device? 
> Which problem is trying acpi DELLABCE device to solve? Is not 
> everything working fine without driver for DELLABCE device?

As I wrote above, DELLABCE is for those systems whose BIOS doesn't
handle radio devices and expects the OS do everything when Fn keys
are pressed.
(Well, it actually seems that something is done by the keyboard
controller, but this is not certain yet)

> My dell-rbtn approach is trying to export rfkill interface from 
> DELLABCE device and eliminate using i8042 hook function in smbios 
> dell-laptop driver.
> 
> Alex, can you check if scancode of wireless change generated by 
> BIOS is on all machines same: 136 (0x88)? And is send by keyboard 
> controller (not acpi/wmi)?

I can say that on my XPS13 the scancode is 0x88 and it is sent by
the keyboard controller.

Gabriele
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ