<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux-stable.git/net/iucv, branch linux-5.14.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=linux-5.14.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/atom?h=linux-5.14.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/'/>
<updated>2021-07-01T22:54:01+00:00</updated>
<entry>
<title>s390: iucv: Avoid field over-reading memcpy()</title>
<updated>2021-07-01T22:54:01+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2021-07-01T15:44:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=5140aaa4604ba96685dc04b4d2dde3384bbaecef'/>
<id>urn:sha1:5140aaa4604ba96685dc04b4d2dde3384bbaecef</id>
<content type='text'>
In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memcpy(), memmove(), and memset(), avoid
intentionally reading across neighboring array fields.

Add a wrapping struct to serve as the memcpy() source so the compiler
can perform appropriate bounds checking, avoiding this future warning:

In function '__fortify_memcpy',
    inlined from 'iucv_message_pending' at net/iucv/iucv.c:1663:4:
./include/linux/fortify-string.h:246:4: error: call to '__read_overflow2_field' declared with attribute error: detected read beyond size of field (2nd parameter)

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Karsten Graul &lt;kgraul@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/af_iucv: clean up some forward declarations</title>
<updated>2021-06-12T20:06:33+00:00</updated>
<author>
<name>Julian Wiedmann</name>
<email>jwi@linux.ibm.com</email>
</author>
<published>2021-06-11T07:45:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=87c272c618c7197b24fd3acf2d337315bd93b4fa'/>
<id>urn:sha1:87c272c618c7197b24fd3acf2d337315bd93b4fa</id>
<content type='text'>
The forward declarations for the iucv_handler callbacks are causing
various compile warnings with gcc-11. Reshuffle the code to get rid
of these prototypes.

Reported-by: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Signed-off-by: Julian Wiedmann &lt;jwi@linux.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>iucv: af_iucv.c: Couple of typo fixes</title>
<updated>2021-03-29T00:31:13+00:00</updated>
<author>
<name>Bhaskar Chowdhury</name>
<email>unixbhaskar@gmail.com</email>
</author>
<published>2021-03-26T23:12:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=bf05d48dbda80d864dbdb46c6641954df3bf45d3'/>
<id>urn:sha1:bf05d48dbda80d864dbdb46c6641954df3bf45d3</id>
<content type='text'>
s/unitialized/uninitialized/
s/notifcations/notifications/

Signed-off-by: Bhaskar Chowdhury &lt;unixbhaskar@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<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.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=2c3b4456c812681f963ef67502c5b8e8f8e2933f'/>
<id>urn:sha1: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>
</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.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=80bc97aa0aaab974bbbfb99a78d7515414004616'/>
<id>urn:sha1: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>
</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.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=ef6af7bdb9e6c14eae8dc5fe852aefe1e089c85c'/>
<id>urn:sha1: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>
</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.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=c464444fa2ca41255817e2bdcfc47a658ec20645'/>
<id>urn:sha1: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>
</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.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=27e9c1de529919d8dd7d072415d3bcae77709300'/>
<id>urn:sha1: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>
</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.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=97f8841e0492ee15710be8f0ec4c48ad513990f8'/>
<id>urn:sha1: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>
</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.rulkc.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=c5dab0941fcdc9664eb0ec0d4d51433216d91336'/>
<id>urn:sha1: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>
</entry>
</feed>
