* [PATCH v1] Bluetooth: Fix not notifying when connection encryption changes
@ 2023-10-23 23:38 Luiz Augusto von Dentz
2023-10-24 1:09 ` [v1] " bluez.test.bot
2023-10-24 18:10 ` [PATCH v1] " patchwork-bot+bluetooth
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2023-10-23 23:38 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Some layer such as SMP depend on getting notified about encryption
changes immediately as they only allow certain PDU to be transmitted
over an encrypted link which may cause SMP implementation to reject
valid PDUs received thus causing pairing to fail when it shouldn't.
Fixes: 7aca0ac4792e ("Bluetooth: Wait for HCI_OP_WRITE_AUTH_PAYLOAD_TO to complete")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
net/bluetooth/hci_event.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 0849e0dafa95..5b6fd625fc09 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -820,8 +820,6 @@ static u8 hci_cc_write_auth_payload_timeout(struct hci_dev *hdev, void *data,
if (!rp->status)
conn->auth_payload_timeout = get_unaligned_le16(sent + 2);
- hci_encrypt_cfm(conn, 0);
-
unlock:
hci_dev_unlock(hdev);
@@ -3683,12 +3681,8 @@ static void hci_encrypt_change_evt(struct hci_dev *hdev, void *data,
cp.handle = cpu_to_le16(conn->handle);
cp.timeout = cpu_to_le16(hdev->auth_payload_timeout);
if (hci_send_cmd(conn->hdev, HCI_OP_WRITE_AUTH_PAYLOAD_TO,
- sizeof(cp), &cp)) {
+ sizeof(cp), &cp))
bt_dev_err(hdev, "write auth payload timeout failed");
- goto notify;
- }
-
- goto unlock;
}
notify:
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [v1] Bluetooth: Fix not notifying when connection encryption changes
2023-10-23 23:38 [PATCH v1] Bluetooth: Fix not notifying when connection encryption changes Luiz Augusto von Dentz
@ 2023-10-24 1:09 ` bluez.test.bot
2023-10-24 18:10 ` [PATCH v1] " patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-10-24 1:09 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 1831 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=795840
---Test result---
Test Summary:
CheckPatch PASS 0.70 seconds
GitLint PASS 0.33 seconds
SubjectPrefix PASS 0.12 seconds
BuildKernel PASS 34.62 seconds
CheckAllWarning PASS 37.38 seconds
CheckSparse WARNING 43.43 seconds
CheckSmatch WARNING 115.98 seconds
BuildKernel32 PASS 33.60 seconds
TestRunnerSetup PASS 521.86 seconds
TestRunner_l2cap-tester PASS 31.27 seconds
TestRunner_iso-tester PASS 51.63 seconds
TestRunner_bnep-tester PASS 10.69 seconds
TestRunner_mgmt-tester PASS 217.66 seconds
TestRunner_rfcomm-tester PASS 16.05 seconds
TestRunner_sco-tester PASS 19.51 seconds
TestRunner_ioctl-tester PASS 18.44 seconds
TestRunner_mesh-tester PASS 13.62 seconds
TestRunner_smp-tester PASS 14.60 seconds
TestRunner_userchan-tester PASS 11.22 seconds
IncrementalBuild PASS 31.63 seconds
Details
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
net/bluetooth/hci_event.c: note: in included file (through include/net/bluetooth/hci_core.h):
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] Bluetooth: Fix not notifying when connection encryption changes
2023-10-23 23:38 [PATCH v1] Bluetooth: Fix not notifying when connection encryption changes Luiz Augusto von Dentz
2023-10-24 1:09 ` [v1] " bluez.test.bot
@ 2023-10-24 18:10 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2023-10-24 18:10 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Mon, 23 Oct 2023 16:38:39 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> Some layer such as SMP depend on getting notified about encryption
> changes immediately as they only allow certain PDU to be transmitted
> over an encrypted link which may cause SMP implementation to reject
> valid PDUs received thus causing pairing to fail when it shouldn't.
>
> [...]
Here is the summary with links:
- [v1] Bluetooth: Fix not notifying when connection encryption changes
https://git.kernel.org/bluetooth/bluetooth-next/c/3fa702baa02c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-24 18:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-23 23:38 [PATCH v1] Bluetooth: Fix not notifying when connection encryption changes Luiz Augusto von Dentz
2023-10-24 1:09 ` [v1] " bluez.test.bot
2023-10-24 18:10 ` [PATCH v1] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).