<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/bluetooth/iso.c, branch linux-6.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-06-28T18:30:46Z</updated>
<entry>
<title>Bluetooth: ISO: Check socket flag instead of hcon</title>
<updated>2024-06-28T18:30:46Z</updated>
<author>
<name>Iulia Tanasescu</name>
</author>
<published>2024-06-18T10:33:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=596b6f081336e77764ca35cfeab66d0fcdbe544e'/>
<id>urn:sha1:596b6f081336e77764ca35cfeab66d0fcdbe544e</id>
<content type='text'>
This fixes the following Smatch static checker warning:

net/bluetooth/iso.c:1364 iso_sock_recvmsg()
error: we previously assumed 'pi-&gt;conn-&gt;hcon' could be null (line 1359)

net/bluetooth/iso.c
1347 static int iso_sock_recvmsg(struct socket *sock, struct msghdr *msg,
1348                             size_t len, int flags)
1349 {
1350         struct sock *sk = sock-&gt;sk;
1351         struct iso_pinfo *pi = iso_pi(sk);
1352
1353         BT_DBG("sk %p", sk);
1354
1355         if (test_and_clear_bit(BT_SK_DEFER_SETUP,
                                      &amp;bt_sk(sk)-&gt;flags)) {
1356                 lock_sock(sk);
1357                 switch (sk-&gt;sk_state) {
1358                 case BT_CONNECT2:
1359                         if (pi-&gt;conn-&gt;hcon &amp;&amp;
                                     ^^^^^^^^^^^^^^ If -&gt;hcon is NULL

1360                             test_bit(HCI_CONN_PA_SYNC,
                                         &amp;pi-&gt;conn-&gt;hcon-&gt;flags)) {
1361                                 iso_conn_big_sync(sk);
1362                                 sk-&gt;sk_state = BT_LISTEN;
1363                         } else {
--&gt; 1364                         iso_conn_defer_accept(pi-&gt;conn-&gt;hcon);
                                                       ^^^^^^^^^^^^^^
                                                       then we're toast

1365                                 sk-&gt;sk_state = BT_CONFIG;
1366                         }
1367                         release_sock(sk);
1368                         return 0;
1369                 case BT_CONNECTED:
1370                         if (test_bit(BT_SK_PA_SYNC,

Fixes: fbdc4bc47268 ("Bluetooth: ISO: Use defer setup to separate PA sync and BIG sync")
Signed-off-by: Iulia Tanasescu &lt;iulia.tanasescu@nxp.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'net-accept-more-20240515' of git://git.kernel.dk/linux</title>
<updated>2024-05-18T17:32:39Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2024-05-18T17:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=89721e3038d181bacbd6be54354b513fdf1b4f10'/>
<id>urn:sha1:89721e3038d181bacbd6be54354b513fdf1b4f10</id>
<content type='text'>
Pull more io_uring updates from Jens Axboe:
 "This adds support for IORING_CQE_F_SOCK_NONEMPTY for io_uring accept
  requests.

  This is very similar to previous work that enabled the same hint for
  doing receives on sockets. By far the majority of the work here is
  refactoring to enable the networking side to pass back whether or not
  the socket had more pending requests after accepting the current one,
  the last patch just wires it up for io_uring.

  Not only does this enable applications to know whether there are more
  connections to accept right now, it also enables smarter logic for
  io_uring multishot accept on whether to retry immediately or wait for
  a poll trigger"

* tag 'net-accept-more-20240515' of git://git.kernel.dk/linux:
  io_uring/net: wire up IORING_CQE_F_SOCK_NONEMPTY for accept
  net: pass back whether socket was empty post accept
  net: have do_accept() take a struct proto_accept_arg argument
  net: change proto and proto_ops accept type
</content>
</entry>
<entry>
<title>Bluetooth: L2CAP: Fix div-by-zero in l2cap_le_flowctl_init()</title>
<updated>2024-05-14T14:51:09Z</updated>
<author>
<name>Sungwoo Kim</name>
</author>
<published>2024-05-04T19:23:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5b862c6a221459d54e494e88965b48dcfa6cc44'/>
<id>urn:sha1:a5b862c6a221459d54e494e88965b48dcfa6cc44</id>
<content type='text'>
l2cap_le_flowctl_init() can cause both div-by-zero and an integer
overflow since hdev-&gt;le_mtu may not fall in the valid range.

Move MTU from hci_dev to hci_conn to validate MTU and stop the connection
process earlier if MTU is invalid.
Also, add a missing validation in read_buffer_size() and make it return
an error value if the validation fails.
Now hci_conn_add() returns ERR_PTR() as it can fail due to the both a
kzalloc failure and invalid MTU value.

divide error: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 PID: 67 Comm: kworker/u5:0 Tainted: G        W          6.9.0-rc5+ #20
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
Workqueue: hci0 hci_rx_work
RIP: 0010:l2cap_le_flowctl_init+0x19e/0x3f0 net/bluetooth/l2cap_core.c:547
Code: e8 17 17 0c 00 66 41 89 9f 84 00 00 00 bf 01 00 00 00 41 b8 02 00 00 00 4c
89 fe 4c 89 e2 89 d9 e8 27 17 0c 00 44 89 f0 31 d2 &lt;66&gt; f7 f3 89 c3 ff c3 4d 8d
b7 88 00 00 00 4c 89 f0 48 c1 e8 03 42
RSP: 0018:ffff88810bc0f858 EFLAGS: 00010246
RAX: 00000000000002a0 RBX: 0000000000000000 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffff88810bc0f7c0 RDI: ffffc90002dcb66f
RBP: ffff88810bc0f880 R08: aa69db2dda70ff01 R09: 0000ffaaaaaaaaaa
R10: 0084000000ffaaaa R11: 0000000000000000 R12: ffff88810d65a084
R13: dffffc0000000000 R14: 00000000000002a0 R15: ffff88810d65a000
FS:  0000000000000000(0000) GS:ffff88811ac00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000100 CR3: 0000000103268003 CR4: 0000000000770ef0
PKRU: 55555554
Call Trace:
 &lt;TASK&gt;
 l2cap_le_connect_req net/bluetooth/l2cap_core.c:4902 [inline]
 l2cap_le_sig_cmd net/bluetooth/l2cap_core.c:5420 [inline]
 l2cap_le_sig_channel net/bluetooth/l2cap_core.c:5486 [inline]
 l2cap_recv_frame+0xe59d/0x11710 net/bluetooth/l2cap_core.c:6809
 l2cap_recv_acldata+0x544/0x10a0 net/bluetooth/l2cap_core.c:7506
 hci_acldata_packet net/bluetooth/hci_core.c:3939 [inline]
 hci_rx_work+0x5e5/0xb20 net/bluetooth/hci_core.c:4176
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0x90f/0x1530 kernel/workqueue.c:3335
 worker_thread+0x926/0xe70 kernel/workqueue.c:3416
 kthread+0x2e3/0x380 kernel/kthread.c:388
 ret_from_fork+0x5c/0x90 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 &lt;/TASK&gt;
Modules linked in:
---[ end trace 0000000000000000 ]---

Fixes: 6ed58ec520ad ("Bluetooth: Use LE buffers for LE traffic")
Suggested-by: Luiz Augusto von Dentz &lt;luiz.dentz@gmail.com&gt;
Signed-off-by: Sungwoo Kim &lt;iam@sung-woo.kim&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: ISO: Handle PA sync when no BIGInfo reports are generated</title>
<updated>2024-05-14T14:51:04Z</updated>
<author>
<name>Iulia Tanasescu</name>
</author>
<published>2024-04-02T11:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d356c924e7a3adbea1e3e4ff4e098bcd9b99a82d'/>
<id>urn:sha1:d356c924e7a3adbea1e3e4ff4e098bcd9b99a82d</id>
<content type='text'>
In case of a Broadcast Source that has PA enabled but no active BIG,
a Broadcast Sink needs to establish PA sync and parse BASE from PA
reports.

This commit moves the allocation of a PA sync hcon from the BIGInfo
advertising report event to the PA sync established event. After the
first complete PA report, the hcon is notified to the ISO layer. A
child socket is allocated and enqueued in the parent's accept queue.

BIGInfo reports also need to be processed, to extract the encryption
field and inform userspace. After the first BIGInfo report is received,
the PA sync hcon is notified again to the ISO layer. Since a socket will
be found this time, the socket state will transition to BT_CONNECTED and
the userspace will be woken up using sk_state_change.

Signed-off-by: Iulia Tanasescu &lt;iulia.tanasescu@nxp.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: ISO: Make iso_get_sock_listen generic</title>
<updated>2024-05-14T14:51:04Z</updated>
<author>
<name>Iulia Tanasescu</name>
</author>
<published>2024-04-02T11:39:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=311527e9dafdcae0c5a20d62f4f84ad01b33b5f4'/>
<id>urn:sha1:311527e9dafdcae0c5a20d62f4f84ad01b33b5f4</id>
<content type='text'>
This makes iso_get_sock_listen more generic, to return matching socket
in the state provided as argument.

Signed-off-by: Iulia Tanasescu &lt;iulia.tanasescu@nxp.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>net: change proto and proto_ops accept type</title>
<updated>2024-05-14T00:19:09Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2024-05-09T15:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92ef0fd55ac80dfc2e4654edfe5d1ddfa6e070fe'/>
<id>urn:sha1:92ef0fd55ac80dfc2e4654edfe5d1ddfa6e070fe</id>
<content type='text'>
Rather than pass in flags, error pointer, and whether this is a kernel
invocation or not, add a struct proto_accept_arg struct as the argument.
This then holds all of these arguments, and prepares accept for being
able to pass back more information.

No functional changes in this patch.

Acked-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Bluetooth: ISO: Fix not validating setsockopt user input</title>
<updated>2024-04-10T19:03:50Z</updated>
<author>
<name>Luiz Augusto von Dentz</name>
</author>
<published>2024-04-05T19:56:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e8742cdfc4b0e65266bb4a901a19462bda9285e'/>
<id>urn:sha1:9e8742cdfc4b0e65266bb4a901a19462bda9285e</id>
<content type='text'>
Check user input length before copying data.

Fixes: ccf74f2390d6 ("Bluetooth: Add BTPROTO_ISO socket type")
Fixes: 0731c5ab4d51 ("Bluetooth: ISO: Add support for BT_PKT_STATUS")
Fixes: f764a6c2c1e4 ("Bluetooth: ISO: Add broadcast support")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: ISO: Don't reject BT_ISO_QOS if parameters are unset</title>
<updated>2024-04-10T19:03:42Z</updated>
<author>
<name>Luiz Augusto von Dentz</name>
</author>
<published>2024-03-13T19:43:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b37cab587aa3c9ab29c6b10aa55627dad713011f'/>
<id>urn:sha1:b37cab587aa3c9ab29c6b10aa55627dad713011f</id>
<content type='text'>
Consider certain values (0x00) as unset and load proper default if
an application has not set them properly.

Fixes: 0fe8c8d07134 ("Bluetooth: Split bt_iso_qos into dedicated structures")
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: ISO: Align broadcast sync_timeout with connection timeout</title>
<updated>2024-03-07T16:58:17Z</updated>
<author>
<name>Luiz Augusto von Dentz</name>
</author>
<published>2024-03-07T16:58:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42ed95de82c01184a88945d3ca274be6a7ea607d'/>
<id>urn:sha1:42ed95de82c01184a88945d3ca274be6a7ea607d</id>
<content type='text'>
This aligns broadcast sync_timeout with existing connection timeouts
which are 20 seconds long.

Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: ISO: Clean up returns values in iso_connect_ind()</title>
<updated>2024-03-06T22:27:09Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2024-03-02T08:30:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18d88f0fd8c0fade7ae08c2778d6c6447b11f16a'/>
<id>urn:sha1:18d88f0fd8c0fade7ae08c2778d6c6447b11f16a</id>
<content type='text'>
This function either returns 0 or HCI_LM_ACCEPT.  Make it clearer which
returns are which and delete the "lm" variable because it is no longer
required.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Luiz Augusto von Dentz &lt;luiz.von.dentz@intel.com&gt;
</content>
</entry>
</feed>
