<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/iucv, branch v5.12</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>net/af_iucv: build SG skbs for TRANS_HIPER sockets</title>
<updated>2021-01-29T04:36:22+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2021-01-28T11:41:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2c3b4456c812681f963ef67502c5b8e8f8e2933f'/>
<id>2c3b4456c812681f963ef67502c5b8e8f8e2933f</id>
<content type='text'>
The TX path no longer falls apart when some of its SG skbs are later
linearized by lower layers of the stack. So enable the use of SG skbs
in iucv_sock_sendmsg() again.

This effectively reverts
commit dc5367bcc556 ("net/af_iucv: don't use paged skbs for TX on HiperSockets").

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The TX path no longer falls apart when some of its SG skbs are later
linearized by lower layers of the stack. So enable the use of SG skbs
in iucv_sock_sendmsg() again.

This effectively reverts
commit dc5367bcc556 ("net/af_iucv: don't use paged skbs for TX on HiperSockets").

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/af_iucv: don't track individual TX skbs for TRANS_HIPER sockets</title>
<updated>2021-01-29T04:36:21+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2021-01-28T11:41:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=80bc97aa0aaab974bbbfb99a78d7515414004616'/>
<id>80bc97aa0aaab974bbbfb99a78d7515414004616</id>
<content type='text'>
Stop maintaining the skb_send_q list for TRANS_HIPER sockets.

Not only is it extra overhead, but keeping around a list of skb clones
means that we later also have to match the -&gt;sk_txnotify() calls
against these clones and free them accordingly.
The current matching logic (comparing the skbs' shinfo location) is
frustratingly fragile, and breaks if the skb's head is mangled in any
sort of way while passing from dev_queue_xmit() to the device's
HW queue.

Also adjust the interface for -&gt;sk_txnotify(), to make clear that we
don't actually care about any skb internals.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Stop maintaining the skb_send_q list for TRANS_HIPER sockets.

Not only is it extra overhead, but keeping around a list of skb clones
means that we later also have to match the -&gt;sk_txnotify() calls
against these clones and free them accordingly.
The current matching logic (comparing the skbs' shinfo location) is
frustratingly fragile, and breaks if the skb's head is mangled in any
sort of way while passing from dev_queue_xmit() to the device's
HW queue.

Also adjust the interface for -&gt;sk_txnotify(), to make clear that we
don't actually care about any skb internals.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/af_iucv: count packets in the xmit path</title>
<updated>2021-01-29T04:36:21+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2021-01-28T11:41:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ef6af7bdb9e6c14eae8dc5fe852aefe1e089c85c'/>
<id>ef6af7bdb9e6c14eae8dc5fe852aefe1e089c85c</id>
<content type='text'>
The TX code keeps track of all skbs that are in-flight but haven't
actually been sent out yet. For native IUCV sockets that's not a huge
deal, but with TRANS_HIPER sockets it would be much better if we
didn't need to maintain a list of skb clones.

Note that we actually only care about the _count_ of skbs in this stage
of the TX pipeline. So as prep work for removing the skb tracking on
TRANS_HIPER sockets, keep track of the skb count in a separate variable
and pair any list {enqueue, unlink} with a count {increment, decrement}.

Then replace all occurences where we currently look at the skb list's
fill level.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The TX code keeps track of all skbs that are in-flight but haven't
actually been sent out yet. For native IUCV sockets that's not a huge
deal, but with TRANS_HIPER sockets it would be much better if we
didn't need to maintain a list of skb clones.

Note that we actually only care about the _count_ of skbs in this stage
of the TX pipeline. So as prep work for removing the skb tracking on
TRANS_HIPER sockets, keep track of the skb count in a separate variable
and pair any list {enqueue, unlink} with a count {increment, decrement}.

Then replace all occurences where we currently look at the skb list's
fill level.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/af_iucv: don't lookup the socket on TX notification</title>
<updated>2021-01-29T04:36:21+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2021-01-28T11:41:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c464444fa2ca41255817e2bdcfc47a658ec20645'/>
<id>c464444fa2ca41255817e2bdcfc47a658ec20645</id>
<content type='text'>
Whoever called iucv_sk(sk)-&gt;sk_txnotify() must already know that they're
dealing with an af_iucv socket.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Whoever called iucv_sk(sk)-&gt;sk_txnotify() must already know that they're
dealing with an af_iucv socket.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/af_iucv: remove WARN_ONCE on malformed RX packets</title>
<updated>2021-01-29T04:36:21+00:00</updated>
<author>
<name>Alexander Egorenkov</name>
<email>egorenar@linux.ibm.com</email>
</author>
<published>2021-01-28T11:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=27e9c1de529919d8dd7d072415d3bcae77709300'/>
<id>27e9c1de529919d8dd7d072415d3bcae77709300</id>
<content type='text'>
syzbot reported the following finding:

AF_IUCV failed to receive skb, len=0
WARNING: CPU: 0 PID: 522 at net/iucv/af_iucv.c:2039 afiucv_hs_rcv+0x174/0x190 net/iucv/af_iucv.c:2039
CPU: 0 PID: 522 Comm: syz-executor091 Not tainted 5.10.0-rc1-syzkaller-07082-g55027a88ec9f #0
Hardware name: IBM 3906 M04 701 (KVM/Linux)
Call Trace:
 [&lt;00000000b87ea538&gt;] afiucv_hs_rcv+0x178/0x190 net/iucv/af_iucv.c:2039
([&lt;00000000b87ea534&gt;] afiucv_hs_rcv+0x174/0x190 net/iucv/af_iucv.c:2039)
 [&lt;00000000b796533e&gt;] __netif_receive_skb_one_core+0x13e/0x188 net/core/dev.c:5315
 [&lt;00000000b79653ce&gt;] __netif_receive_skb+0x46/0x1c0 net/core/dev.c:5429
 [&lt;00000000b79655fe&gt;] netif_receive_skb_internal+0xb6/0x220 net/core/dev.c:5534
 [&lt;00000000b796ac3a&gt;] netif_receive_skb+0x42/0x318 net/core/dev.c:5593
 [&lt;00000000b6fd45f4&gt;] tun_rx_batched.isra.0+0x6fc/0x860 drivers/net/tun.c:1485
 [&lt;00000000b6fddc4e&gt;] tun_get_user+0x1c26/0x27f0 drivers/net/tun.c:1939
 [&lt;00000000b6fe0f00&gt;] tun_chr_write_iter+0x158/0x248 drivers/net/tun.c:1968
 [&lt;00000000b4f22bfa&gt;] call_write_iter include/linux/fs.h:1887 [inline]
 [&lt;00000000b4f22bfa&gt;] new_sync_write+0x442/0x648 fs/read_write.c:518
 [&lt;00000000b4f238fe&gt;] vfs_write.part.0+0x36e/0x5d8 fs/read_write.c:605
 [&lt;00000000b4f2984e&gt;] vfs_write+0x10e/0x148 fs/read_write.c:615
 [&lt;00000000b4f29d0e&gt;] ksys_write+0x166/0x290 fs/read_write.c:658
 [&lt;00000000b8dc4ab4&gt;] system_call+0xe0/0x28c arch/s390/kernel/entry.S:415
Last Breaking-Event-Address:
 [&lt;00000000b8dc64d4&gt;] __s390_indirect_jump_r14+0x0/0xc

Malformed RX packets shouldn't generate any warnings because
debugging info already flows to dropmon via the kfree_skb().

Signed-off-by: Alexander Egorenkov &lt;egorenar@linux.ibm.com&gt;
Reviewed-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
syzbot reported the following finding:

AF_IUCV failed to receive skb, len=0
WARNING: CPU: 0 PID: 522 at net/iucv/af_iucv.c:2039 afiucv_hs_rcv+0x174/0x190 net/iucv/af_iucv.c:2039
CPU: 0 PID: 522 Comm: syz-executor091 Not tainted 5.10.0-rc1-syzkaller-07082-g55027a88ec9f #0
Hardware name: IBM 3906 M04 701 (KVM/Linux)
Call Trace:
 [&lt;00000000b87ea538&gt;] afiucv_hs_rcv+0x178/0x190 net/iucv/af_iucv.c:2039
([&lt;00000000b87ea534&gt;] afiucv_hs_rcv+0x174/0x190 net/iucv/af_iucv.c:2039)
 [&lt;00000000b796533e&gt;] __netif_receive_skb_one_core+0x13e/0x188 net/core/dev.c:5315
 [&lt;00000000b79653ce&gt;] __netif_receive_skb+0x46/0x1c0 net/core/dev.c:5429
 [&lt;00000000b79655fe&gt;] netif_receive_skb_internal+0xb6/0x220 net/core/dev.c:5534
 [&lt;00000000b796ac3a&gt;] netif_receive_skb+0x42/0x318 net/core/dev.c:5593
 [&lt;00000000b6fd45f4&gt;] tun_rx_batched.isra.0+0x6fc/0x860 drivers/net/tun.c:1485
 [&lt;00000000b6fddc4e&gt;] tun_get_user+0x1c26/0x27f0 drivers/net/tun.c:1939
 [&lt;00000000b6fe0f00&gt;] tun_chr_write_iter+0x158/0x248 drivers/net/tun.c:1968
 [&lt;00000000b4f22bfa&gt;] call_write_iter include/linux/fs.h:1887 [inline]
 [&lt;00000000b4f22bfa&gt;] new_sync_write+0x442/0x648 fs/read_write.c:518
 [&lt;00000000b4f238fe&gt;] vfs_write.part.0+0x36e/0x5d8 fs/read_write.c:605
 [&lt;00000000b4f2984e&gt;] vfs_write+0x10e/0x148 fs/read_write.c:615
 [&lt;00000000b4f29d0e&gt;] ksys_write+0x166/0x290 fs/read_write.c:658
 [&lt;00000000b8dc4ab4&gt;] system_call+0xe0/0x28c arch/s390/kernel/entry.S:415
Last Breaking-Event-Address:
 [&lt;00000000b8dc64d4&gt;] __s390_indirect_jump_r14+0x0/0xc

Malformed RX packets shouldn't generate any warnings because
debugging info already flows to dropmon via the kfree_skb().

Signed-off-by: Alexander Egorenkov &lt;egorenar@linux.ibm.com&gt;
Reviewed-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/af_iucv: use DECLARE_SOCKADDR to cast from sockaddr</title>
<updated>2020-12-08T23:56:53+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2020-12-07T12:53:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=97f8841e0492ee15710be8f0ec4c48ad513990f8'/>
<id>97f8841e0492ee15710be8f0ec4c48ad513990f8</id>
<content type='text'>
This gets us compile-time size checking.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This gets us compile-time size checking.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/af_iucv: set correct sk_protocol for child sockets</title>
<updated>2020-11-21T22:43:45+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2020-11-20T10:06:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c5dab0941fcdc9664eb0ec0d4d51433216d91336'/>
<id>c5dab0941fcdc9664eb0ec0d4d51433216d91336</id>
<content type='text'>
Child sockets erroneously inherit their parent's sk_type (ie. SOCK_*),
instead of the PF_IUCV protocol that the parent was created with in
iucv_sock_create().

We're currently not using sk-&gt;sk_protocol ourselves, so this shouldn't
have much impact (except eg. getting the output in skb_dump() right).

Fixes: eac3731bd04c ("[S390]: Add AF_IUCV socket support")
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20201120100657.34407-1-jwi@linux.ibm.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Child sockets erroneously inherit their parent's sk_type (ie. SOCK_*),
instead of the PF_IUCV protocol that the parent was created with in
iucv_sock_create().

We're currently not using sk-&gt;sk_protocol ourselves, so this shouldn't
have much impact (except eg. getting the output in skb_dump() right).

Fixes: eac3731bd04c ("[S390]: Add AF_IUCV socket support")
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20201120100657.34407-1-jwi@linux.ibm.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/af_iucv: fix null pointer dereference on shutdown</title>
<updated>2020-11-11T02:08:17+00:00</updated>
<author>
<name>Ursula Braun</name>
<email>ubraun@linux.ibm.com</email>
</author>
<published>2020-11-09T07:57:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4031eeafa71eaf22ae40a15606a134ae86345daf'/>
<id>4031eeafa71eaf22ae40a15606a134ae86345daf</id>
<content type='text'>
syzbot reported the following KASAN finding:

BUG: KASAN: nullptr-dereference in iucv_send_ctrl+0x390/0x3f0 net/iucv/af_iucv.c:385
Read of size 2 at addr 000000000000021e by task syz-executor907/519

CPU: 0 PID: 519 Comm: syz-executor907 Not tainted 5.9.0-syzkaller-07043-gbcf9877ad213 #0
Hardware name: IBM 3906 M04 701 (KVM/Linux)
Call Trace:
 [&lt;00000000c576af60&gt;] unwind_start arch/s390/include/asm/unwind.h:65 [inline]
 [&lt;00000000c576af60&gt;] show_stack+0x180/0x228 arch/s390/kernel/dumpstack.c:135
 [&lt;00000000c9dcd1f8&gt;] __dump_stack lib/dump_stack.c:77 [inline]
 [&lt;00000000c9dcd1f8&gt;] dump_stack+0x268/0x2f0 lib/dump_stack.c:118
 [&lt;00000000c5fed016&gt;] print_address_description.constprop.0+0x5e/0x218 mm/kasan/report.c:383
 [&lt;00000000c5fec82a&gt;] __kasan_report mm/kasan/report.c:517 [inline]
 [&lt;00000000c5fec82a&gt;] kasan_report+0x11a/0x168 mm/kasan/report.c:534
 [&lt;00000000c98b5b60&gt;] iucv_send_ctrl+0x390/0x3f0 net/iucv/af_iucv.c:385
 [&lt;00000000c98b6262&gt;] iucv_sock_shutdown+0x44a/0x4c0 net/iucv/af_iucv.c:1457
 [&lt;00000000c89d3a54&gt;] __sys_shutdown+0x12c/0x1c8 net/socket.c:2204
 [&lt;00000000c89d3b70&gt;] __do_sys_shutdown net/socket.c:2212 [inline]
 [&lt;00000000c89d3b70&gt;] __s390x_sys_shutdown+0x38/0x48 net/socket.c:2210
 [&lt;00000000c9e36eac&gt;] system_call+0xe0/0x28c arch/s390/kernel/entry.S:415

There is nothing to shutdown if a connection has never been established.
Besides that iucv-&gt;hs_dev is not yet initialized if a socket is in
IUCV_OPEN state and iucv-&gt;path is not yet initialized if socket is in
IUCV_BOUND state.
So, just skip the shutdown calls for a socket in these states.

Fixes: eac3731bd04c ("[S390]: Add AF_IUCV socket support")
Fixes: 82492a355fac ("af_iucv: add shutdown for HS transport")
Reviewed-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Ursula Braun &lt;ubraun@linux.ibm.com&gt;
[jwi: correct one Fixes tag]
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
syzbot reported the following KASAN finding:

BUG: KASAN: nullptr-dereference in iucv_send_ctrl+0x390/0x3f0 net/iucv/af_iucv.c:385
Read of size 2 at addr 000000000000021e by task syz-executor907/519

CPU: 0 PID: 519 Comm: syz-executor907 Not tainted 5.9.0-syzkaller-07043-gbcf9877ad213 #0
Hardware name: IBM 3906 M04 701 (KVM/Linux)
Call Trace:
 [&lt;00000000c576af60&gt;] unwind_start arch/s390/include/asm/unwind.h:65 [inline]
 [&lt;00000000c576af60&gt;] show_stack+0x180/0x228 arch/s390/kernel/dumpstack.c:135
 [&lt;00000000c9dcd1f8&gt;] __dump_stack lib/dump_stack.c:77 [inline]
 [&lt;00000000c9dcd1f8&gt;] dump_stack+0x268/0x2f0 lib/dump_stack.c:118
 [&lt;00000000c5fed016&gt;] print_address_description.constprop.0+0x5e/0x218 mm/kasan/report.c:383
 [&lt;00000000c5fec82a&gt;] __kasan_report mm/kasan/report.c:517 [inline]
 [&lt;00000000c5fec82a&gt;] kasan_report+0x11a/0x168 mm/kasan/report.c:534
 [&lt;00000000c98b5b60&gt;] iucv_send_ctrl+0x390/0x3f0 net/iucv/af_iucv.c:385
 [&lt;00000000c98b6262&gt;] iucv_sock_shutdown+0x44a/0x4c0 net/iucv/af_iucv.c:1457
 [&lt;00000000c89d3a54&gt;] __sys_shutdown+0x12c/0x1c8 net/socket.c:2204
 [&lt;00000000c89d3b70&gt;] __do_sys_shutdown net/socket.c:2212 [inline]
 [&lt;00000000c89d3b70&gt;] __s390x_sys_shutdown+0x38/0x48 net/socket.c:2210
 [&lt;00000000c9e36eac&gt;] system_call+0xe0/0x28c arch/s390/kernel/entry.S:415

There is nothing to shutdown if a connection has never been established.
Besides that iucv-&gt;hs_dev is not yet initialized if a socket is in
IUCV_OPEN state and iucv-&gt;path is not yet initialized if socket is in
IUCV_BOUND state.
So, just skip the shutdown calls for a socket in these states.

Fixes: eac3731bd04c ("[S390]: Add AF_IUCV socket support")
Fixes: 82492a355fac ("af_iucv: add shutdown for HS transport")
Reviewed-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Ursula Braun &lt;ubraun@linux.ibm.com&gt;
[jwi: correct one Fixes tag]
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/iucv: fix indentation in __iucv_message_receive()</title>
<updated>2020-10-03T23:51:07+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2020-10-01T17:21:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a29f245ec97f83f697c7442e0f1222f2ac7c9507'/>
<id>a29f245ec97f83f697c7442e0f1222f2ac7c9507</id>
<content type='text'>
smatch complains about
net/iucv/iucv.c:1119 __iucv_message_receive() warn: inconsistent indenting

While touching this line, also make the return logic consistent and thus
get rid of a goto label.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Reviewed-by: Karsten Graul &lt;kgraul@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
smatch complains about
net/iucv/iucv.c:1119 __iucv_message_receive() warn: inconsistent indenting

While touching this line, also make the return logic consistent and thus
get rid of a goto label.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Reviewed-by: Karsten Graul &lt;kgraul@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/af_iucv: right-size the uid variable in iucv_sock_bind()</title>
<updated>2020-10-03T23:51:07+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2020-10-01T17:21:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=398999bac6ea8842706d613630f907b817f47c6d'/>
<id>398999bac6ea8842706d613630f907b817f47c6d</id>
<content type='text'>
smatch complains about
net/iucv/af_iucv.c:624 iucv_sock_bind() error: memcpy() 'sa-&gt;siucv_user_id' too small (8 vs 9)

Which is absolutely correct - the memcpy() takes 9 bytes (sizeof(uid))
from an 8-byte field (sa-&gt;siucv_user_id).
Luckily the sockaddr_iucv struct contains more data after the
.siucv_user_id field, and we checked the size of the passed data earlier
on. So the memcpy() won't accidentally read from an invalid location.

Fix the warning by reducing the size of the uid variable to what's
actually needed, and thus reducing the amount of copied data.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Reviewed-by: Karsten Graul &lt;kgraul@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
smatch complains about
net/iucv/af_iucv.c:624 iucv_sock_bind() error: memcpy() 'sa-&gt;siucv_user_id' too small (8 vs 9)

Which is absolutely correct - the memcpy() takes 9 bytes (sizeof(uid))
from an 8-byte field (sa-&gt;siucv_user_id).
Luckily the sockaddr_iucv struct contains more data after the
.siucv_user_id field, and we checked the size of the passed data earlier
on. So the memcpy() won't accidentally read from an invalid location.

Fix the warning by reducing the size of the uid variable to what's
actually needed, and thus reducing the amount of copied data.

Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Reviewed-by: Karsten Graul &lt;kgraul@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
