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:	Thu, 5 May 2016 15:27:42 +0000
From:	Amitkumar Karwar <akarwar@...vell.com>
To:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
CC:	"linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Ganapathi Bhat <gbhat@...vell.com>,
	Cathy Luo <cluo@...vell.com>
Subject: RE: [PATCH v10 1/3] Bluetooth: hci_uart: add prepare callbacks to
 hci_uart_proto structure.

Hi Alan,

> From: linux-bluetooth-owner@...r.kernel.org [mailto:linux-bluetooth-
> owner@...r.kernel.org] On Behalf Of One Thousand Gnomes
> Sent: Thursday, May 05, 2016 8:49 PM
> To: Amitkumar Karwar
> Cc: linux-bluetooth@...r.kernel.org; linux-kernel@...r.kernel.org;
> Ganapathi Bhat
> Subject: Re: [PATCH v10 1/3] Bluetooth: hci_uart: add prepare callbacks
> to hci_uart_proto structure.
> 
> On Thu, 5 May 2016 08:08:20 -0700
> Amitkumar Karwar <akarwar@...vell.com> wrote:
> 
> > From: Ganapathi Bhat <gbhat@...vell.com>
> >
> > The new callback is used to prepare the device before HCI becomes
> > ready. One can use this to download firmware if the download process
> > doesn't use HCI commands. Also recv_for_prepare callback is introduced
> > for receiving data from devices during prepare phase.
> 
> If your device is not speaking HCI protocol then instead of hackig up
> the HCI ldisc would it not make more sense to have a tiny ldisc for your
> firmware loader instead of adding crap to the fast paths of what is
> currently a clean properly separated out interface ?
> 

Below is the code change. It won't add any overhead for existing receive path. 

-       if (!test_bit(HCI_UART_PROTO_READY, &hu->flags))
+       if (!test_bit(HCI_UART_PROTO_READY, &hu->flags)) {
+               if (hu->proto->recv_for_prepare)
+                       hu->proto->recv_for_prepare(hu, data, count);
                return;
+       }

Regards,
Amitkumar

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ