mbox series

[0/7] LE LL Priavcy support enabled

Message ID 20200312100754.3445-1-sathish.narasimman@intel.com (mailing list archive)
Headers show
Series LE LL Priavcy support enabled | expand

Message

Sathish Narasimman March 12, 2020, 10:07 a.m. UTC
With this LE LL Priavcy feature available if BT controller supports
LL Privacy when privacy is enabled.

The patches are verified in below case.
Pairing - where the IRK is added to device Resolving List after 
identity info & IRK is shared in SMP.
Unpair - Delete the resolving entry from the Device resolving list
Local IRK change - Whenever there is change in local IRK (privacy) the
resolving list entries in the device is updated.
Whitelist - filter policies for whitelist is updated based on LL_adress
resolution support.
Reload Resolving list - device reset/sysmte reboot the Resolving list
reloaded in to the device.

Sathish Narsimman (7):
  Bluetooth: LL Privacy Delete Store Resolving list
  Bluetooth: Add device to Resolving List
  Bluetooth: Update the Resolving list when Local IRK changed
  Bluetooth: LL_PRIVACY re-load resolving list
  Bluetooth: LL Privacy Check and Update the Resolving List
  Bluetooth: Enable LL Privacy
  Bluetooth LL Privacy update White list

 include/net/bluetooth/hci.h      |   3 +
 include/net/bluetooth/hci_core.h |   7 +
 net/bluetooth/hci_conn.c         |  32 ++++
 net/bluetooth/hci_core.c         |  20 ++-
 net/bluetooth/hci_event.c        |  32 +++-
 net/bluetooth/hci_request.c      | 251 ++++++++++++++++++++++++++++++-
 net/bluetooth/hci_request.h      |   2 +
 net/bluetooth/mgmt.c             |  10 +-
 net/bluetooth/smp.c              |  11 ++
 9 files changed, 354 insertions(+), 14 deletions(-)

Comments

Sathish Narasimman March 18, 2020, 8:56 a.m. UTC | #1
Hi

A gentle reminder to review the patches

On Thu, Mar 12, 2020 at 3:36 PM Sathish Narsimman <nsathish41@gmail.com> wrote:
>
> With this LE LL Priavcy feature available if BT controller supports
> LL Privacy when privacy is enabled.
>
> The patches are verified in below case.
> Pairing - where the IRK is added to device Resolving List after
> identity info & IRK is shared in SMP.
> Unpair - Delete the resolving entry from the Device resolving list
> Local IRK change - Whenever there is change in local IRK (privacy) the
> resolving list entries in the device is updated.
> Whitelist - filter policies for whitelist is updated based on LL_adress
> resolution support.
> Reload Resolving list - device reset/sysmte reboot the Resolving list
> reloaded in to the device.
>
> Sathish Narsimman (7):
>   Bluetooth: LL Privacy Delete Store Resolving list
>   Bluetooth: Add device to Resolving List
>   Bluetooth: Update the Resolving list when Local IRK changed
>   Bluetooth: LL_PRIVACY re-load resolving list
>   Bluetooth: LL Privacy Check and Update the Resolving List
>   Bluetooth: Enable LL Privacy
>   Bluetooth LL Privacy update White list
>
>  include/net/bluetooth/hci.h      |   3 +
>  include/net/bluetooth/hci_core.h |   7 +
>  net/bluetooth/hci_conn.c         |  32 ++++
>  net/bluetooth/hci_core.c         |  20 ++-
>  net/bluetooth/hci_event.c        |  32 +++-
>  net/bluetooth/hci_request.c      | 251 ++++++++++++++++++++++++++++++-
>  net/bluetooth/hci_request.h      |   2 +
>  net/bluetooth/mgmt.c             |  10 +-
>  net/bluetooth/smp.c              |  11 ++
>  9 files changed, 354 insertions(+), 14 deletions(-)
>
> --
> 2.17.1
>
Abhishek Pandit-Subedi April 1, 2020, 8:04 p.m. UTC | #2
Hi Satish,

Looking through the patches in this series, it looks like you are
adding the IRK for all connected devices and I'm not sure that's the
best method.
The resolv list seems to be useful in the same way as the le
whitelist: to filter incoming advertisements for devices we care
about.

Thus, to simplify your design, could we not do the same thing as the
le whitelist:
* Update the resolv list anytime passive/background scan is being enabled
* Only keep entries in the resolv list that are part of the
pend_le_conn or pend_le_report lists

Then, you would only need to update the resolv list in
hci_req_add_le_passive_scan and any IRK changes would just disable
passive scan, remove IRKs if existing and re-enable passive scan
(which would add it back with the new one).

Thanks,
Abhishek

On Wed, Mar 18, 2020 at 1:56 AM Sathish Narasimman <nsathish41@gmail.com> wrote:
>
> Hi
>
> A gentle reminder to review the patches
>
> On Thu, Mar 12, 2020 at 3:36 PM Sathish Narsimman <nsathish41@gmail.com> wrote:
> >
> > With this LE LL Priavcy feature available if BT controller supports
> > LL Privacy when privacy is enabled.
> >
> > The patches are verified in below case.
> > Pairing - where the IRK is added to device Resolving List after
> > identity info & IRK is shared in SMP.
> > Unpair - Delete the resolving entry from the Device resolving list
> > Local IRK change - Whenever there is change in local IRK (privacy) the
> > resolving list entries in the device is updated.
> > Whitelist - filter policies for whitelist is updated based on LL_adress
> > resolution support.
> > Reload Resolving list - device reset/sysmte reboot the Resolving list
> > reloaded in to the device.
> >
> > Sathish Narsimman (7):
> >   Bluetooth: LL Privacy Delete Store Resolving list
> >   Bluetooth: Add device to Resolving List
> >   Bluetooth: Update the Resolving list when Local IRK changed
> >   Bluetooth: LL_PRIVACY re-load resolving list
> >   Bluetooth: LL Privacy Check and Update the Resolving List
> >   Bluetooth: Enable LL Privacy
> >   Bluetooth LL Privacy update White list
> >
> >  include/net/bluetooth/hci.h      |   3 +
> >  include/net/bluetooth/hci_core.h |   7 +
> >  net/bluetooth/hci_conn.c         |  32 ++++
> >  net/bluetooth/hci_core.c         |  20 ++-
> >  net/bluetooth/hci_event.c        |  32 +++-
> >  net/bluetooth/hci_request.c      | 251 ++++++++++++++++++++++++++++++-
> >  net/bluetooth/hci_request.h      |   2 +
> >  net/bluetooth/mgmt.c             |  10 +-
> >  net/bluetooth/smp.c              |  11 ++
> >  9 files changed, 354 insertions(+), 14 deletions(-)
> >
> > --
> > 2.17.1
> >
Marcel Holtmann April 6, 2020, 4:34 p.m. UTC | #3
Hi Abhishek,

> Looking through the patches in this series, it looks like you are
> adding the IRK for all connected devices and I'm not sure that's the
> best method.
> The resolv list seems to be useful in the same way as the le
> whitelist: to filter incoming advertisements for devices we care
> about.
> 
> Thus, to simplify your design, could we not do the same thing as the
> le whitelist:
> * Update the resolv list anytime passive/background scan is being enabled
> * Only keep entries in the resolv list that are part of the
> pend_le_conn or pend_le_report lists
> 
> Then, you would only need to update the resolv list in
> hci_req_add_le_passive_scan and any IRK changes would just disable
> passive scan, remove IRKs if existing and re-enable passive scan
> (which would add it back with the new one).

so I have been looking at this again and yes, we should just put IRKs in the resolving list for devices that we also put in the whitelist. And we only use the whitelist for background scanning.

This means I would only focus on enabling background scanning. For everything else, we can just let the host do the resolving.

	Enable passive scanning
		-> Enable resolving list if privacy device in whitelist
		-> Set Scan Parameters
		-> Set Scan Enable

	Disable passive scanning
		-> Set Scan Disable
		-> Disable resolving list if enabled

And when updating the whitelist, also add update the resolving list with needed entries for the whitelist. This means if the privacy enabled device goes into the whitelist, add the IRK to the resolving list. Remove all no longer needed IRKs.

Regards

Marcel