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:   Tue, 31 Mar 2020 08:05:18 +0200
From:   Marcel Holtmann <marcel@...tmann.org>
To:     Miao-chen Chou <mcchou@...omium.org>
Cc:     Bluetooth Kernel Mailing List <linux-bluetooth@...r.kernel.org>,
        Alain Michaud <alainm@...omium.org>,
        Luiz Augusto von Dentz <luiz.von.dentz@...el.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v4 1/2] Bluetooth: btusb: Indicate Microsoft vendor
 extension for Intel 9460/9560 and 9160/9260

Hi Miao-chen,

>>> This adds a bit mask of driver_info for Microsoft vendor extension and
>>> indicates the support for Intel 9460/9560 and 9160/9260. See
>>> https://docs.microsoft.com/en-us/windows-hardware/drivers/bluetooth/
>>> microsoft-defined-bluetooth-hci-commands-and-events for more information
>>> about the extension. This also add a kernel config, BT_MSFTEXT, and a
>>> source file to facilitate Microsoft vendor extension functions.
>>> This was verified with Intel ThunderPeak BT controller
>>> where msft_vnd_ext_opcode is 0xFC1E.
>>> 
>>> Signed-off-by: Marcel Holtmann <marcel@...tmann.org>
>>> 
>>> Signed-off-by: Miao-chen Chou <mcchou@...omium.org>
>>> ---
>>> 
>>> Changes in v4:
>>> - Introduce CONFIG_BT_MSFTEXT as a starting point of providing a
>>> framework to use Microsoft extension
>>> - Create include/net/bluetooth/msft.h and net/bluetooth/msft.c to
>>> facilitate functions of Microsoft extension.
>>> 
>>> Changes in v3:
>>> - Create net/bluetooth/msft.c with struct msft_vnd_ext defined internally
>>> and change the hdev->msft_ext field to void*.
>>> - Define and expose msft_vnd_ext_set_opcode() for btusb use.
>>> - Init hdev->msft_ext in hci_alloc_dev() and deinit it in hci_free_dev().
>>> 
>>> Changes in v2:
>>> - Define struct msft_vnd_ext and add a field of this type to struct
>>> hci_dev to facilitate the support of Microsoft vendor extension.
>>> 
>>> drivers/bluetooth/btusb.c        | 11 +++++++++--
>>> include/net/bluetooth/hci_core.h |  4 ++++
>> 
>> so I don’t like the intermixing of core features and drivers unless it is needed. In this case it is not needed since we can first introduce the core support and then enable the driver to use it.
> I will make btusb changes as a different commit in v5.

check the series that I posted. I tested them on ThunderPeak and if it also works, we use that as a base and then go from there.

>> 
>>> net/bluetooth/Kconfig            |  9 ++++++++-
>>> net/bluetooth/Makefile           |  1 +
>>> net/bluetooth/msft.c             | 16 ++++++++++++++++
>>> net/bluetooth/msft.h             | 19 +++++++++++++++++++
>>> 6 files changed, 57 insertions(+), 3 deletions(-)
>>> create mode 100644 net/bluetooth/msft.c
>>> create mode 100644 net/bluetooth/msft.h
>>> 
>>> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
>>> index 3bdec42c9612..0fe47708d3c8 100644
>>> --- a/drivers/bluetooth/btusb.c
>>> +++ b/drivers/bluetooth/btusb.c
>>> @@ -21,6 +21,7 @@
>>> #include <net/bluetooth/bluetooth.h>
>>> #include <net/bluetooth/hci_core.h>
>>> 
>>> +#include "../../net/bluetooth/msft.h"
>> 
>> This was my bad. I didn’t realized that drivers need to the set the opcode and not the core. I updated the patches to fix this.
> I will move it to include/net/bluetooth/.

I put it in hci_core.h since don’t want to add any extra needed include for driver. They are big enough already and adding more files doesn’t really help.

Regards

Marcel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ