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: <20111228161644.GB23292@joana>
Date:	Wed, 28 Dec 2011 14:16:44 -0200
From:	Gustavo Padovan <padovan@...fusion.mobi>
To:	David Herrmann <dh.herrmann@...glemail.com>
Cc:	Rene Herman <rene.herman@...il.com>,
	Andre Guedes <andre.guedes@...nbossa.org>,
	linux-kernel@...r.kernel.org, linux-bluetooth@...r.kernel.org,
	Marcel Holtmann <marcel@...tmann.org>
Subject: Re: [bluetooth] linux-3.x regression (bisected)

Hi David,

* David Herrmann <dh.herrmann@...glemail.com> [2011-12-28 17:04:11 +0100]:

> On Wed, Dec 28, 2011 at 4:52 PM, Gustavo Padovan <padovan@...fusion.mobi> wrote:
> ..snip..
> > I think this patch can do handling, let's see what others think.
> >
> >        Gustavo
> >
> >
> > ---
> > Author: Gustavo F. Padovan <padovan@...fusion.mobi>
> > Date:   Wed Dec 28 13:40:02 2011 -0200
> >
> >    Bluetooth: Fix lmp_host_le_capable() check for broken devices
> >
> >    Some dongles reports a wrong Local Extended Features leading the kernel
> >    think that dongle support LE while it don't.
> >
> >    The fix here is just rely on a bit in Local Features (LE Capable) to tell
> >    us if the device really supports LE.
> >
> >    LE Host Capable is the only bit used from Local Extended Features in our
> >    kernel.
> >
> >    Signed-off-by: Gustavo F. Padovan <padovan@...fusion.mobi>
> >
> > diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
> > index 5e2e984..c693111 100644
> > --- a/include/net/bluetooth/hci_core.h
> > +++ b/include/net/bluetooth/hci_core.h
> > @@ -676,7 +676,11 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
> >  #define lmp_le_capable(dev)        ((dev)->features[4] & LMP_LE)
> >
> >  /* ----- Extended LMP capabilities ----- */
> > -#define lmp_host_le_capable(dev)   ((dev)->extfeatures[0] & LMP_HOST_LE)
> > +/* Some crap dongles does not report a proper Local Extended Features causing
> > + * the kernel to wrongly init it as a LE device. So first check if it is LE
> > + * capable (controller) which is a info from the Local Features */
> > +#define lmp_host_le_capable(dev)    ( lmp_le_capable(dev) && \
> > +                                       (dev)->extfeatures[0] & LMP_HOST_LE)
> >
> >  /* ----- HCI protocols ----- */
> >  static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr,
> 
> Next time we use the extfeatures for something else, we will break
> this device again. Can't we fix dev->extfeatures on initialization
> based on a blacklist/quirklist? Or is dev->extfeatures modified after
> initialzation of the device somewhere?

Sure, we will, but I don't see us using another bit of extfeatures in the near
future (after the next Core Spec release maybe) and I don't wanna got that far
in this fix right now.

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