<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/socket.c, branch v5.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-03-20T14:48:36Z</updated>
<entry>
<title>io_uring: make sure accept honor rlimit nofile</title>
<updated>2020-03-20T14:48:36Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2020-03-20T02:16:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09952e3e7826119ddd4357c453d54bcc7ef25156'/>
<id>urn:sha1:09952e3e7826119ddd4357c453d54bcc7ef25156</id>
<content type='text'>
Just like commit 4022e7af86be, this fixes the fact that
IORING_OP_ACCEPT ends up using get_unused_fd_flags(), which checks
current-&gt;signal-&gt;rlim[] for limits.

Add an extra argument to __sys_accept4_file() that allows us to pass
in the proper nofile limit, and grab it at request prep time.

Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>socket: fix unused-function warning</title>
<updated>2020-01-08T23:02:21Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2020-01-08T21:44:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=542d3065f2b1a60a0cfc259c9a36faa470761d78'/>
<id>urn:sha1:542d3065f2b1a60a0cfc259c9a36faa470761d78</id>
<content type='text'>
When procfs is disabled, the fdinfo code causes a harmless
warning:

net/socket.c:1000:13: error: 'sock_show_fdinfo' defined but not used [-Werror=unused-function]
 static void sock_show_fdinfo(struct seq_file *m, struct file *f)

Move the function definition up so we can use a single #ifdef
around it.

Fixes: b4653342b151 ("net: Allow to show socket-specific information in /proc/[pid]/fdinfo/[fd]")
Suggested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Acked-by: Kirill Tkhai &lt;ktkhai@virtuozzo.com&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2019-12-22T23:15:05Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2019-12-22T23:15:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac80010fc94eb0680d9a432b639583bd7ac29066'/>
<id>urn:sha1:ac80010fc94eb0680d9a432b639583bd7ac29066</id>
<content type='text'>
Mere overlapping changes in the conflicts here.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge tag 'io_uring-5.5-20191212' of git://git.kernel.dk/linux-block</title>
<updated>2019-12-13T22:24:54Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-12-13T22:24:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5bd831a469e0c8368fe02b21157ea5c731f84967'/>
<id>urn:sha1:5bd831a469e0c8368fe02b21157ea5c731f84967</id>
<content type='text'>
Pull io_uring fixes from Jens Axboe:

 - A tweak to IOSQE_IO_LINK (also marked for stable) to allow links that
   don't sever if the result is &lt; 0.

   This is mostly for linked timeouts, where if we ask for a pure
   timeout we always get -ETIME. This makes links useless for that case,
   hence allow a case where it works.

 - Five minor optimizations to fix and improve cases that regressed
   since v5.4.

 - An SQTHREAD locking fix.

 - A sendmsg/recvmsg iov assignment fix.

 - Net fix where read_iter/write_iter don't honor IOCB_NOWAIT, and
   subsequently ensuring that works for io_uring.

 - Fix a case where for an invalid opcode we might return -EBADF instead
   of -EINVAL, if the -&gt;fd of that sqe was set to an invalid fd value.

* tag 'io_uring-5.5-20191212' of git://git.kernel.dk/linux-block:
  io_uring: ensure we return -EINVAL on unknown opcode
  io_uring: add sockets to list of files that support non-blocking issue
  net: make socket read/write_iter() honor IOCB_NOWAIT
  io_uring: only hash regular files for async work execution
  io_uring: run next sqe inline if possible
  io_uring: don't dynamically allocate poll data
  io_uring: deferred send/recvmsg should assign iov
  io_uring: sqthread should grab ctx-&gt;uring_lock for submissions
  io-wq: briefly spin for new work after finishing work
  io-wq: remove worker-&gt;wait waitqueue
  io_uring: allow unbreakable links
</content>
</entry>
<entry>
<title>net: Allow to show socket-specific information in /proc/[pid]/fdinfo/[fd]</title>
<updated>2019-12-13T01:04:54Z</updated>
<author>
<name>Kirill Tkhai</name>
<email>ktkhai@virtuozzo.com</email>
</author>
<published>2019-12-09T10:03:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b4653342b1514cb11f25b727c689451aff02996d'/>
<id>urn:sha1:b4653342b1514cb11f25b727c689451aff02996d</id>
<content type='text'>
This adds .show_fdinfo to socket_file_ops, so protocols will be able
to print their specific data in fdinfo.

Signed-off-by: Kirill Tkhai &lt;ktkhai@virtuozzo.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: make socket read/write_iter() honor IOCB_NOWAIT</title>
<updated>2019-12-10T23:33:23Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2019-12-10T03:58:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ebfcd8955c0b52eb793bcbc9e71140e3d0cdb228'/>
<id>urn:sha1:ebfcd8955c0b52eb793bcbc9e71140e3d0cdb228</id>
<content type='text'>
The socket read/write helpers only look at the file O_NONBLOCK. not
the iocb IOCB_NOWAIT flag. This breaks users like preadv2/pwritev2
and io_uring that rely on not having the file itself marked nonblocking,
but rather the iocb itself.

Cc: netdev@vger.kernel.org
Acked-by: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2019-12-08T21:28:11Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-12-08T21:28:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=95e6ba5133163f8241c9ea2439369cec0452fec6'/>
<id>urn:sha1:95e6ba5133163f8241c9ea2439369cec0452fec6</id>
<content type='text'>
Pull networking fixes from David Miller:

 1) More jumbo frame fixes in r8169, from Heiner Kallweit.

 2) Fix bpf build in minimal configuration, from Alexei Starovoitov.

 3) Use after free in slcan driver, from Jouni Hogander.

 4) Flower classifier port ranges don't work properly in the HW offload
    case, from Yoshiki Komachi.

 5) Use after free in hns3_nic_maybe_stop_tx(), from Yunsheng Lin.

 6) Out of bounds access in mqprio_dump(), from Vladyslav Tarasiuk.

 7) Fix flow dissection in dsa TX path, from Alexander Lobakin.

 8) Stale syncookie timestampe fixes from Guillaume Nault.

[ Did an evil merge to silence a warning introduced by this pull - Linus ]

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (84 commits)
  r8169: fix rtl_hw_jumbo_disable for RTL8168evl
  net_sched: validate TCA_KIND attribute in tc_chain_tmplt_add()
  r8169: add missing RX enabling for WoL on RTL8125
  vhost/vsock: accept only packets with the right dst_cid
  net: phy: dp83867: fix hfs boot in rgmii mode
  net: ethernet: ti: cpsw: fix extra rx interrupt
  inet: protect against too small mtu values.
  gre: refetch erspan header from skb-&gt;data after pskb_may_pull()
  pppoe: remove redundant BUG_ON() check in pppoe_pernet
  tcp: Protect accesses to .ts_recent_stamp with {READ,WRITE}_ONCE()
  tcp: tighten acceptance of ACKs not matching a child socket
  tcp: fix rejected syncookies due to stale timestamps
  lpc_eth: kernel BUG on remove
  tcp: md5: fix potential overestimation of TCP option space
  net: sched: allow indirect blocks to bind to clsact in TC
  net: core: rename indirect block ingress cb function
  net-sysfs: Call dev_hold always in netdev_queue_add_kobject
  net: dsa: fix flow dissection on Tx path
  net/tls: Fix return values to avoid ENOTSUPP
  net: avoid an indirect call in ____sys_recvmsg()
  ...
</content>
</entry>
<entry>
<title>net: avoid an indirect call in ____sys_recvmsg()</title>
<updated>2019-12-06T20:06:44Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2019-12-06T17:38:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1af66221a66de080274540a5c481ddacbe3574d2'/>
<id>urn:sha1:1af66221a66de080274540a5c481ddacbe3574d2</id>
<content type='text'>
CONFIG_RETPOLINE=y made indirect calls expensive.

gcc seems to add an indirect call in ____sys_recvmsg().

Rewriting the code slightly makes sure to avoid this indirection.

Alternative would be to not call sock_recvmsg() and instead
use security_socket_recvmsg() and sock_recvmsg_nosec(),
but this is less readable IMO.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Cc: David Laight &lt;David.Laight@aculab.com&gt;
Acked-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>io_uring: ensure async punted connect requests copy data</title>
<updated>2019-12-03T14:04:30Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2019-12-02T23:28:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f499a021ea8c9f70321fce3d674d8eca5bbeee2c'/>
<id>urn:sha1:f499a021ea8c9f70321fce3d674d8eca5bbeee2c</id>
<content type='text'>
Just like commit f67676d160c6 for read/write requests, this one ensures
that the sockaddr data has been copied for IORING_OP_CONNECT if we need
to punt the request to async context.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: ensure async punted sendmsg/recvmsg requests copy data</title>
<updated>2019-12-03T14:03:35Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2019-12-03T01:50:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=03b1230ca12a12e045d83b0357792075bf94a1e0'/>
<id>urn:sha1:03b1230ca12a12e045d83b0357792075bf94a1e0</id>
<content type='text'>
Just like commit f67676d160c6 for read/write requests, this one ensures
that the msghdr data is fully copied if we need to punt a recvmsg or
sendmsg system call to async context.

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
