* RE: Bluetooth: ISO: Allow binding a PA sync socket
2023-10-16 15:45 [PATCH 1/1] " Iulia Tanasescu
@ 2023-10-16 16:40 ` bluez.test.bot
0 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2023-10-16 16:40 UTC (permalink / raw)
To: linux-bluetooth, iulia.tanasescu
[-- Attachment #1: Type: text/plain, Size: 1426 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=793605
---Test result---
Test Summary:
CheckPatch PASS 0.72 seconds
GitLint PASS 0.34 seconds
SubjectPrefix PASS 0.12 seconds
BuildKernel PASS 34.15 seconds
CheckAllWarning PASS 37.29 seconds
CheckSparse PASS 43.06 seconds
CheckSmatch PASS 118.74 seconds
BuildKernel32 PASS 32.85 seconds
TestRunnerSetup PASS 514.29 seconds
TestRunner_l2cap-tester PASS 29.83 seconds
TestRunner_iso-tester PASS 52.79 seconds
TestRunner_bnep-tester PASS 9.81 seconds
TestRunner_mgmt-tester PASS 212.32 seconds
TestRunner_rfcomm-tester PASS 15.15 seconds
TestRunner_sco-tester PASS 18.70 seconds
TestRunner_ioctl-tester PASS 16.92 seconds
TestRunner_mesh-tester PASS 12.56 seconds
TestRunner_smp-tester PASS 13.44 seconds
TestRunner_userchan-tester PASS 10.31 seconds
IncrementalBuild PASS 30.85 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 0/1] Bluetooth: ISO: Allow binding a PA sync socket
@ 2023-10-18 14:34 Iulia Tanasescu
2023-10-18 14:34 ` [PATCH v2 1/1] " Iulia Tanasescu
0 siblings, 1 reply; 7+ messages in thread
From: Iulia Tanasescu @ 2023-10-18 14:34 UTC (permalink / raw)
To: linux-bluetooth
Cc: claudia.rosu, mihai-octavian.urzica, silviu.barbulescu,
vlad.pruteanu, andrei.istodorescu, luiz.dentz, Iulia Tanasescu
A Broadcast Sink has no way to know how many BISes are available for
sync or their indexes, before establishing PA sync and reading the base
struct.
PA sync is established by calling listen with DEFER_SETUP and accepting
a PA sync socket.
This patch makes it possible to bind a PA sync socket to a number of
BISes before issuing the BIG Create Sync command.
This patch version fixes review comments.
Iulia Tanasescu (1):
Bluetooth: ISO: Allow binding a PA sync socket
net/bluetooth/iso.c | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
base-commit: 2fddfadb0478a11952d4a3d543273f28d2c23c03
--
2.39.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/1] Bluetooth: ISO: Allow binding a PA sync socket
2023-10-18 14:34 [PATCH v2 0/1] Bluetooth: ISO: Allow binding a PA sync socket Iulia Tanasescu
@ 2023-10-18 14:34 ` Iulia Tanasescu
2023-10-18 15:41 ` bluez.test.bot
2023-10-18 17:05 ` [PATCH v2 1/1] " Pauli Virtanen
0 siblings, 2 replies; 7+ messages in thread
From: Iulia Tanasescu @ 2023-10-18 14:34 UTC (permalink / raw)
To: linux-bluetooth
Cc: claudia.rosu, mihai-octavian.urzica, silviu.barbulescu,
vlad.pruteanu, andrei.istodorescu, luiz.dentz, Iulia Tanasescu
This makes it possible to bind a PA sync socket to a number of BISes
before issuing the BIG Create Sync command.
Signed-off-by: Iulia Tanasescu <iulia.tanasescu@nxp.com>
---
net/bluetooth/iso.c | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 07b80e97aead..f20238c4702f 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -813,6 +813,37 @@ static int iso_sock_bind_bc(struct socket *sock, struct sockaddr *addr,
return 0;
}
+static int iso_sock_bind_pa_sk(struct sock *sk, struct sockaddr_iso *sa,
+ int addr_len)
+{
+ int err = 0;
+
+ if (sk->sk_type != SOCK_SEQPACKET) {
+ err = -EINVAL;
+ goto done;
+ }
+
+ if (addr_len <= sizeof(*sa)) {
+ err = -EINVAL;
+ goto done;
+ }
+
+ iso_pi(sk)->bc_num_bis = sa->iso_bc->bc_num_bis;
+
+ for (int i = 0; i < iso_pi(sk)->bc_num_bis; i++)
+ if (sa->iso_bc->bc_bis[i] < 0x01 ||
+ sa->iso_bc->bc_bis[i] > 0x1f) {
+ err = -EINVAL;
+ goto done;
+ }
+
+ memcpy(iso_pi(sk)->bc_bis, sa->iso_bc->bc_bis,
+ iso_pi(sk)->bc_num_bis);
+
+done:
+ return err;
+}
+
static int iso_sock_bind(struct socket *sock, struct sockaddr *addr,
int addr_len)
{
@@ -828,6 +859,15 @@ static int iso_sock_bind(struct socket *sock, struct sockaddr *addr,
lock_sock(sk);
+ /* Allow the user to bind a PA sync socket to a number
+ * of BISes to sync to.
+ */
+ if (sk->sk_state == BT_CONNECT2 &&
+ test_bit(BT_SK_PA_SYNC, &iso_pi(sk)->flags)) {
+ err = iso_sock_bind_pa_sk(sk, sa, addr_len);
+ goto done;
+ }
+
if (sk->sk_state != BT_OPEN) {
err = -EBADFD;
goto done;
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: Bluetooth: ISO: Allow binding a PA sync socket
2023-10-18 14:34 ` [PATCH v2 1/1] " Iulia Tanasescu
@ 2023-10-18 15:41 ` bluez.test.bot
2023-10-18 17:05 ` [PATCH v2 1/1] " Pauli Virtanen
1 sibling, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2023-10-18 15:41 UTC (permalink / raw)
To: linux-bluetooth, iulia.tanasescu
[-- Attachment #1: Type: text/plain, Size: 1427 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=794361
---Test result---
Test Summary:
CheckPatch PASS 0.82 seconds
GitLint PASS 0.38 seconds
SubjectPrefix PASS 0.12 seconds
BuildKernel PASS 40.93 seconds
CheckAllWarning PASS 43.41 seconds
CheckSparse PASS 49.51 seconds
CheckSmatch PASS 133.25 seconds
BuildKernel32 PASS 38.14 seconds
TestRunnerSetup PASS 598.77 seconds
TestRunner_l2cap-tester PASS 36.39 seconds
TestRunner_iso-tester PASS 66.55 seconds
TestRunner_bnep-tester PASS 12.14 seconds
TestRunner_mgmt-tester PASS 242.58 seconds
TestRunner_rfcomm-tester PASS 18.27 seconds
TestRunner_sco-tester PASS 21.46 seconds
TestRunner_ioctl-tester PASS 20.88 seconds
TestRunner_mesh-tester PASS 15.47 seconds
TestRunner_smp-tester PASS 16.65 seconds
TestRunner_userchan-tester PASS 12.91 seconds
IncrementalBuild PASS 36.39 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/1] Bluetooth: ISO: Allow binding a PA sync socket
2023-10-18 14:34 ` [PATCH v2 1/1] " Iulia Tanasescu
2023-10-18 15:41 ` bluez.test.bot
@ 2023-10-18 17:05 ` Pauli Virtanen
1 sibling, 0 replies; 7+ messages in thread
From: Pauli Virtanen @ 2023-10-18 17:05 UTC (permalink / raw)
To: Iulia Tanasescu, linux-bluetooth
Hi,
ke, 2023-10-18 kello 17:34 +0300, Iulia Tanasescu kirjoitti:
> This makes it possible to bind a PA sync socket to a number of BISes
> before issuing the BIG Create Sync command.
>
> Signed-off-by: Iulia Tanasescu <iulia.tanasescu@nxp.com>
> ---
> net/bluetooth/iso.c | 40 ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
> index 07b80e97aead..f20238c4702f 100644
> --- a/net/bluetooth/iso.c
> +++ b/net/bluetooth/iso.c
> @@ -813,6 +813,37 @@ static int iso_sock_bind_bc(struct socket *sock, struct sockaddr *addr,
> return 0;
> }
>
> +static int iso_sock_bind_pa_sk(struct sock *sk, struct sockaddr_iso *sa,
> + int addr_len)
> +{
> + int err = 0;
> +
> + if (sk->sk_type != SOCK_SEQPACKET) {
> + err = -EINVAL;
> + goto done;
> + }
> +
> + if (addr_len <= sizeof(*sa)) {
> + err = -EINVAL;
> + goto done;
> + }
> +
This does not seem to check addr_len is big enough, sizeof(*sa) won't
count the sa->iso_bc flexible array member.
That sa->iso_bc->bc_num_bis <= ISO_MAX_NUM_BIS is not checked, so
memcpy may write out of bounds.
The values in sa come from user, so may be invalid.
iso_sock_bind_bc seems to have similar issue.
Sorry for second round comments.
> + iso_pi(sk)->bc_num_bis = sa->iso_bc->bc_num_bis;
> +
> + for (int i = 0; i < iso_pi(sk)->bc_num_bis; i++)
> + if (sa->iso_bc->bc_bis[i] < 0x01 ||
> + sa->iso_bc->bc_bis[i] > 0x1f) {
> + err = -EINVAL;
> + goto done;
> + }
> +
> + memcpy(iso_pi(sk)->bc_bis, sa->iso_bc->bc_bis,
> + iso_pi(sk)->bc_num_bis);
> +
> +done:
> + return err;
> +}
> +
> static int iso_sock_bind(struct socket *sock, struct sockaddr *addr,
> int addr_len)
> {
> @@ -828,6 +859,15 @@ static int iso_sock_bind(struct socket *sock, struct sockaddr *addr,
>
> lock_sock(sk);
>
> + /* Allow the user to bind a PA sync socket to a number
> + * of BISes to sync to.
> + */
> + if (sk->sk_state == BT_CONNECT2 &&
> + test_bit(BT_SK_PA_SYNC, &iso_pi(sk)->flags)) {
> + err = iso_sock_bind_pa_sk(sk, sa, addr_len);
> + goto done;
> + }
> +
> if (sk->sk_state != BT_OPEN) {
> err = -EBADFD;
> goto done;
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Bluetooth: ISO: Allow binding a PA sync socket
2023-10-19 14:49 [PATCH v3 1/1] " Iulia Tanasescu
@ 2023-10-19 15:37 ` bluez.test.bot
0 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2023-10-19 15:37 UTC (permalink / raw)
To: linux-bluetooth, iulia.tanasescu
[-- Attachment #1: Type: text/plain, Size: 1427 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=794778
---Test result---
Test Summary:
CheckPatch PASS 0.76 seconds
GitLint PASS 0.34 seconds
SubjectPrefix PASS 0.12 seconds
BuildKernel PASS 34.62 seconds
CheckAllWarning PASS 38.43 seconds
CheckSparse PASS 44.01 seconds
CheckSmatch PASS 117.28 seconds
BuildKernel32 PASS 33.64 seconds
TestRunnerSetup PASS 529.91 seconds
TestRunner_l2cap-tester PASS 31.65 seconds
TestRunner_iso-tester PASS 50.77 seconds
TestRunner_bnep-tester PASS 10.62 seconds
TestRunner_mgmt-tester PASS 221.58 seconds
TestRunner_rfcomm-tester PASS 16.36 seconds
TestRunner_sco-tester PASS 19.67 seconds
TestRunner_ioctl-tester PASS 18.61 seconds
TestRunner_mesh-tester PASS 13.52 seconds
TestRunner_smp-tester PASS 14.47 seconds
TestRunner_userchan-tester PASS 11.31 seconds
IncrementalBuild PASS 31.74 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Bluetooth: ISO: Allow binding a PA sync socket
2023-10-24 10:57 [PATCH v3 " Iulia Tanasescu
@ 2023-10-24 11:36 ` bluez.test.bot
0 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2023-10-24 11:36 UTC (permalink / raw)
To: linux-bluetooth, iulia.tanasescu
[-- Attachment #1: Type: text/plain, Size: 1427 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=795975
---Test result---
Test Summary:
CheckPatch PASS 0.72 seconds
GitLint PASS 0.32 seconds
SubjectPrefix PASS 0.11 seconds
BuildKernel PASS 34.16 seconds
CheckAllWarning PASS 37.40 seconds
CheckSparse PASS 43.43 seconds
CheckSmatch PASS 115.73 seconds
BuildKernel32 PASS 32.94 seconds
TestRunnerSetup PASS 515.77 seconds
TestRunner_l2cap-tester PASS 31.09 seconds
TestRunner_iso-tester PASS 51.02 seconds
TestRunner_bnep-tester PASS 10.45 seconds
TestRunner_mgmt-tester PASS 213.20 seconds
TestRunner_rfcomm-tester PASS 16.04 seconds
TestRunner_sco-tester PASS 19.47 seconds
TestRunner_ioctl-tester PASS 18.69 seconds
TestRunner_mesh-tester PASS 13.23 seconds
TestRunner_smp-tester PASS 14.29 seconds
TestRunner_userchan-tester PASS 11.09 seconds
IncrementalBuild PASS 31.23 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-10-24 11:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-18 14:34 [PATCH v2 0/1] Bluetooth: ISO: Allow binding a PA sync socket Iulia Tanasescu
2023-10-18 14:34 ` [PATCH v2 1/1] " Iulia Tanasescu
2023-10-18 15:41 ` bluez.test.bot
2023-10-18 17:05 ` [PATCH v2 1/1] " Pauli Virtanen
-- strict thread matches above, loose matches on Subject: below --
2023-10-24 10:57 [PATCH v3 " Iulia Tanasescu
2023-10-24 11:36 ` bluez.test.bot
2023-10-19 14:49 [PATCH v3 1/1] " Iulia Tanasescu
2023-10-19 15:37 ` bluez.test.bot
2023-10-16 15:45 [PATCH 1/1] " Iulia Tanasescu
2023-10-16 16:40 ` bluez.test.bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.