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] [day] [month] [year] [list]
Date:   Mon, 8 Jun 2020 10:17:05 +0200
From:   Marcel Holtmann <marcel@...tmann.org>
To:     Abhishek Pandit-Subedi <abhishekpandit@...omium.org>
Cc:     Bluez mailing list <linux-bluetooth@...r.kernel.org>,
        len.brown@...el.com,
        ChromeOS Bluetooth Upstreaming 
        <chromeos-bluetooth-upstreaming@...omium.org>,
        linux-pm@...r.kernel.org, rafael@...nel.org,
        todd.e.brandt@...ux.intel.com, rui.zhang@...el.com,
        "David S. Miller" <davem@...emloft.net>,
        Johan Hedberg <johan.hedberg@...il.com>,
        netdev <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH v3] Bluetooth: Allow suspend even when preparation has
 failed

Hi Abhishek,

> It is preferable to allow suspend even when Bluetooth has problems
> preparing for sleep. When Bluetooth fails to finish preparing for
> suspend, log the error and allow the suspend notifier to continue
> instead.
> 
> To also make it clearer why suspend failed, change bt_dev_dbg to
> bt_dev_err when handling the suspend timeout.
> 
> Fixes: dd522a7429b07e ("Bluetooth: Handle LE devices during suspend")
> Reported-by: Len Brown <len.brown@...el.com>
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@...omium.org>
> ---
> To verify this is properly working, I added an additional change to
> hci_suspend_wait_event to always return -16. This validates that suspend
> continues even when an error has occurred during the suspend
> preparation.
> 
> Example on Chromebook:
> [   55.834524] PM: Syncing filesystems ... done.
> [   55.841930] PM: Preparing system for sleep (s2idle)
> [   55.940492] Bluetooth: hci_core.c:hci_suspend_notifier() hci0: Suspend notifier action (3) failed: -16
> [   55.940497] Freezing user space processes ... (elapsed 0.001 seconds) done.
> [   55.941692] OOM killer disabled.
> [   55.941693] Freezing remaining freezable tasks ... (elapsed 0.000 seconds) done.
> [   55.942632] PM: Suspending system (s2idle)
> 
> I ran this through a suspend_stress_test in the following scenarios:
> * Peer classic device connected: 50+ suspends
> * No devices connected: 100 suspends
> * With the above test case returning -EBUSY: 50 suspends
> 
> I also ran this through our automated testing for suspend and wake on
> BT from suspend continues to work.
> 
> 
> Changes in v3:
> - Changed printf format for unsigned long
> 
> Changes in v2:
> - Added fixes and reported-by tags
> 
> net/bluetooth/hci_core.c | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ