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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABBYNZKdmy_vfJk_jL=Z0u31FcPAks84qNii7P28pOC2DGD_3A@mail.gmail.com>
Date:   Wed, 3 Aug 2022 14:32:36 -0700
From:   Luiz Augusto von Dentz <luiz.dentz@...il.com>
To:     Manish Mandlik <mmandlik@...gle.com>,
        "Gix, Brian" <brian.gix@...el.com>
Cc:     Marcel Holtmann <marcel@...tmann.org>,
        ChromeOS Bluetooth Upstreaming 
        <chromeos-bluetooth-upstreaming@...omium.org>,
        "linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
        Miao-chen Chou <mcchou@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Johan Hedberg <johan.hedberg@...il.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>
Subject: Re: [PATCH 2/2] Bluetooth: hci_sync: Cancel AdvMonitor interleave
 scan when suspend

Hi Manish,

On Wed, Aug 3, 2022 at 1:24 PM Manish Mandlik <mmandlik@...gle.com> wrote:
>
> Cancel interleaved scanning for advertisement monitor when suspend.
>
> Fixes: 182ee45da083 ("Bluetooth: hci_sync: Rework hci_suspend_notifier")
>
> Signed-off-by: Manish Mandlik <mmandlik@...gle.com>
> Reviewed-by: Miao-chen Chou <mcchou@...gle.com>
> ---
>
>  net/bluetooth/hci_sync.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
> index cb0c219ebe1c..33d2221b2bc4 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -1721,6 +1721,9 @@ static bool is_interleave_scanning(struct hci_dev *hdev)
>
>  static void cancel_interleave_scan(struct hci_dev *hdev)
>  {
> +       if (!is_interleave_scanning(hdev))
> +               return;
> +
>         bt_dev_dbg(hdev, "cancelling interleave scan");
>
>         cancel_delayed_work_sync(&hdev->interleave_scan);
> @@ -5288,6 +5291,9 @@ int hci_suspend_sync(struct hci_dev *hdev)
>         /* Pause other advertisements */
>         hci_pause_advertising_sync(hdev);
>
> +       /* Cancel interleaved scan */
> +       cancel_interleave_scan(hdev);
> +
>         /* Suspend monitor filters */
>         hci_suspend_monitor_sync(hdev);
>
> --
> 2.37.1.455.g008518b4e5-goog

This will likely conflict with the following changes:

https://patchwork.kernel.org/project/bluetooth/patch/20220801171505.1271059-6-brian.gix@intel.com/

Also I think this code shall be part of hci_scan_disable_sync so
scanning_paused apply to all scanning including interleave_scanning
and we most likely need a mgmt-tester that exercise this since
apparently that is not being tested, @Gix, Brian can you take a look
at adding a tests for it?

-- 
Luiz Augusto von Dentz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ