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]
Date:	Sat, 14 Feb 2009 23:50:39 +0100
From:	Jan Scholz <scholz@...s.uni-frankfurt.de>
To:	Greg KH <gregkh@...e.de>
Cc:	linux-kernel@...r.kernel.org, stable@...nel.org,
	Justin Forbes <jmforbes@...uxtx.org>,
	Zwane Mwaikambo <zwane@....linux.org.uk>,
	Theodore Ts'o <tytso@....edu>,
	Randy Dunlap <rdunlap@...otime.net>,
	Dave Jones <davej@...hat.com>,
	Chuck Wolber <chuckw@...ntumlinux.com>,
	Chris Wedgwood <reviews@...cw.f00f.org>,
	Michael Krufky <mkrufky@...uxtv.org>,
	Chuck Ebbert <cebbert@...hat.com>,
	Domenico Andreoli <cavokz@...il.com>, Willy Tarreau <w@....eu>,
	Rodrigo Rubira Branco <rbranco@...checkpoint.com>,
	Jake Edge <jake@....net>, Eugene Teo <eteo@...hat.com>,
	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	alan@...rguk.ukuu.org.uk, Jiri Kosina <jkosina@...e.cz>,
	Jan Scholz <Scholz@...s.uni-frankfurt.de>,
	Torsten Rausche <torsten@...sche.net>,
	Paul Collins <paul@...ly.ondioline.org>
Subject: Re: [patch 41/47] bluetooth hid: enable quirk handling for Apple Wireless Keyboards in 2.6.27

Greg KH <gregkh@...e.de> writes:

> 2.6.27-stable review patch.  If anyone has any objections, please let us know.
>
> ------------------
>
> From: Torsten Rausche <torsten@...sche.net>
>
> This patch is basically a backport of
> commit ee8a1a0a1a5817accd03ced7e7ffde3a4430f485 upstream
> which was made after the big HID overhaul in 2.6.28.
>
> Kernel 2.6.27 fails to handle quirks for the aluminum Apple Wireless
> Keyboard because it is handled as USB device and not as Bluetooth
> device. This patch expands 'hidp_blacklist' to make the kernel handle
> the keyboard in the same way as the Apple wireless Mighty Mouse (also a
> Bluetooth device).
>
> Signed-off-by: Torsten Rausche <torsten@...sche.net>
> Cc: Jan Scholz <Scholz@...s.uni-frankfurt.de>
> Cc: Jiri Kosina <jkosina@...e.cz>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
>
> ---
> ---
>  net/bluetooth/hidp/core.c |    4 ++++
>  1 file changed, 4 insertions(+)
>
> --- a/net/bluetooth/hidp/core.c
> +++ b/net/bluetooth/hidp/core.c
> @@ -684,6 +684,10 @@ static const struct {
>  } hidp_blacklist[] = {
>  	/* Apple wireless Mighty Mouse */
>  	{ 0x05ac, 0x030c, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
> +	/* Apple Wireless Keyboard */
> +	{ 0x05ac, 0x022c, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN },
> +	{ 0x05ac, 0x022d, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD },
> +	{ 0x05ac, 0x022e, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN },
>  
>  	{ }	/* Terminating entry */
>  };
>
>

A very similar fix has been proposed by Paul Collins (see
http://lkml.org/lkml/2008/6/14/26 ) a while ago.

Here on my ppc32 G4 it works only if I apply the following as well.
I can't test it on x86, though.

Jan Scholz

--
    removed 2 calls to le16_to_cpu from the bluetooth hid quirks
    
    seems we're doing some endianness conversion one time to much

diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 28dc035..6b95a6d 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -699,8 +699,8 @@ static void hidp_setup_quirks(struct hid_device *hid)
        unsigned int n;
 
        for (n = 0; hidp_blacklist[n].idVendor; n++)
-               if (hidp_blacklist[n].idVendor == le16_to_cpu(hid->vendor) &&
-                               hidp_blacklist[n].idProduct == le16_to_cpu(hid->product))
+               if (hidp_blacklist[n].idVendor == hid->vendor &&
+                               hidp_blacklist[n].idProduct == hid->product)
                        hid->quirks = hidp_blacklist[n].quirks;
 }

--
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