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-next>] [day] [month] [year] [list]
Message-Id: <AB87C916-9CF9-4B8C-AFF5-74CA4151C4FC@svenpeter.dev>
Date: Thu, 28 Dec 2023 10:46:57 +0100
From: Sven Peter <sven@...npeter.dev>
To: Johan Hovold <johan@...nel.org>
Cc: Paul Menzel <pmenzel@...gen.mpg.de>, Felix Zhang <mrman@...an314.tech>,
 linux-bluetooth@...r.kernel.org, stable@...r.kernel.org,
 Johan Hovold <johan+linaro@...nel.org>, Hector Martin <marcan@...can.st>,
 Bagas Sanjaya <bagasdotme@...il.com>,
 Alyssa Rosenzweig <alyssa@...enzweig.io>,
 Marcel Holtmann <marcel@...tmann.org>,
 Johan Hedberg <johan.hedberg@...il.com>,
 Luiz Augusto von Dentz <luiz.dentz@...il.com>,
 Orlando Chamberlain <orlandoch.dev@...il.com>, kekrby@...il.com,
 admin@...eit.net, Janne Grunau <j@...nau.net>,
 Aditya Garg <gargaditya08@...e.com>, asahi@...ts.linux.dev,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] Bluetooth: Fix Bluetooth for BCM4377 on T2 Intel MacBooks

Sending this again because Apple mail decided to default to HTML
mails since the last update apparently *sigh*



Hi,


> On Dec 27, 2023, at 11:30, Johan Hovold <johan@...nel.org> wrote:
> 
> On Mon, Dec 25, 2023 at 09:26:05PM +0100, Paul Menzel wrote:
> 
>> Thank you very much for the patch. I am adding Johan to Cc field.
> 
> Thanks for the report. Guess I could use a break from the proverbial
> eggnog.
> 
>> Am 25.12.23 um 21:01 schrieb Felix Zhang:
>>> Starting v6.5, Bluetooth does not work at all on my T2 MacBookAir9,1
>>> with the BCM4377 chip.  When I boot up the computer, go into
>> Somehow a blank line snug in above.
>>> bluetoothctl, and then try to run commands like scan on, show, list,
>>> it returns "No default controller available."  I have tried reloading
>>> the
>> It’d be great if you reflowed for 75 characters per line (also below).
>>> kernel module, in which the log outputs "{Added,Removed} hci0
>>> (unconfigured)."  With this patch, I am able to use Bluetooth as
>>> normal
>>> without any errors regarding hci0 being unconfigured.  However, an
>>> issue is still present where sometimes hci_bcm4377 will have to be
>>> reloaded in order to get bluetooth to work.  I believe this was still
>>> present before the previously mentioned commit.
>>> Due to the bit HCI_QUIRK_USE_BDADDR_PROPERTY being always set in
>>> drivers/bluetooth/hci_bcm4377.c (line 2371), the chip would be left
>>> unconfigured on kernels compiled after commit 6945795bc81a
>>> ("Bluetooth:
>>> fix use-bdaddr-property quirk") due to a change in its logic.  On the
>>> M1 Macs, the device would be configured in the devicetree.  However,
>>> that is not the case on T2 Macs.  Because the bluetooth adapter is
>>> left
>>> unconfigured, it is not usable in the operating system.  In order to
>>> circumvent this issue, a flag is added to prevent the bit from being
>>> set on the BCM4377, while setting it on the other devices.
> 
> The commit you tracked this down to restored the original semantics for
> HCI_QUIRK_USE_BDADDR_PROPERTY, which means that it should only be set
> for devices with an invalid address.
> 
> The Broadcom BCM4377 driver has so far been setting this flag
> unconditionally which now potentially results in also valid addresses
> being marked as invalid.
> 
> I've just sent a patch that makes sure to only mark invalid addresses as
> invalid:
> 
> https://lore.kernel.org/lkml/20231227101003.10534-1-johan+linaro@kernel.org/
> 
> Note however that the flag still needs to be set in case your device
> lacks storage for a unique device address so you cannot simply drop it
> for some device classes as you do below (unless you are certain that
> these devices will always have a valid address).


We do know that though.

BCM4377 is present on Apple’s x86 Macs and always has internal storage
for the address. If the board comes up without an address there’s nothing
much we can do because the address isn’t provided by ACPI or anything
else and setting the invalid address quirk for that situation seems appropriate.

BCM4378/4387 is present on Apple’s ARM Macs and never has internal storage.
The address is always provided by our bootloader in the device tree.
These should always unconditionally set HCI_QUIRK_USE_BDADDR_PROPERTY
just like this patch does.


Best,


Sven

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ