<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/socket.c, branch v4.7</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=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-05-20T02:12:14Z</updated>
<entry>
<title>fs: poll/select/recvmmsg: use timespec64 for timeout events</title>
<updated>2016-05-20T02:12:14Z</updated>
<author>
<name>Deepa Dinamani</name>
<email>deepa.kernel@gmail.com</email>
</author>
<published>2016-05-20T00:09:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=766b9f928bd5b9b185d986d40355d1f143484136'/>
<id>urn:sha1:766b9f928bd5b9b185d986d40355d1f143484136</id>
<content type='text'>
struct timespec is not y2038 safe.  Even though timespec might be
sufficient to represent timeouts, use struct timespec64 here as the plan
is to get rid of all timespec reference in the kernel.

The patch transitions the common functions: poll_select_set_timeout()
and select_estimate_accuracy() to use timespec64.  And, all the syscalls
that use these functions are transitioned in the same patch.

The restart block parameters for poll uses monotonic time.  Use
timespec64 here as well to assign timeout value.  This parameter in the
restart block need not change because this only holds the monotonic
timestamp at which timeout should occur.  And, unsigned long data type
should be big enough for this timestamp.

The system call interfaces will be handled in a separate series.

Compat interfaces need not change as timespec64 is an alias to struct
timespec on a 64 bit system.

Link: http://lkml.kernel.org/r/1461947989-21926-3-git-send-email-deepa.kernel@gmail.com
Signed-off-by: Deepa Dinamani &lt;deepa.kernel@gmail.com&gt;
Acked-by: John Stultz &lt;john.stultz@linaro.org&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next</title>
<updated>2016-05-17T23:26:30Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-05-17T23:26:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7fd20d1c476af4563e66865213474a2f9f473a4'/>
<id>urn:sha1:a7fd20d1c476af4563e66865213474a2f9f473a4</id>
<content type='text'>
Pull networking updates from David Miller:
 "Highlights:

   1) Support SPI based w5100 devices, from Akinobu Mita.

   2) Partial Segmentation Offload, from Alexander Duyck.

   3) Add GMAC4 support to stmmac driver, from Alexandre TORGUE.

   4) Allow cls_flower stats offload, from Amir Vadai.

   5) Implement bpf blinding, from Daniel Borkmann.

   6) Optimize _ASYNC_ bit twiddling on sockets, unless the socket is
      actually using FASYNC these atomics are superfluous.  From Eric
      Dumazet.

   7) Run TCP more preemptibly, also from Eric Dumazet.

   8) Support LED blinking, EEPROM dumps, and rxvlan offloading in mlx5e
      driver, from Gal Pressman.

   9) Allow creating ppp devices via rtnetlink, from Guillaume Nault.

  10) Improve BPF usage documentation, from Jesper Dangaard Brouer.

  11) Support tunneling offloads in qed, from Manish Chopra.

  12) aRFS offloading in mlx5e, from Maor Gottlieb.

  13) Add RFS and RPS support to SCTP protocol, from Marcelo Ricardo
      Leitner.

  14) Add MSG_EOR support to TCP, this allows controlling packet
      coalescing on application record boundaries for more accurate
      socket timestamp sampling.  From Martin KaFai Lau.

  15) Fix alignment of 64-bit netlink attributes across the board, from
      Nicolas Dichtel.

  16) Per-vlan stats in bridging, from Nikolay Aleksandrov.

  17) Several conversions of drivers to ethtool ksettings, from Philippe
      Reynes.

  18) Checksum neutral ILA in ipv6, from Tom Herbert.

  19) Factorize all of the various marvell dsa drivers into one, from
      Vivien Didelot

  20) Add VF support to qed driver, from Yuval Mintz"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1649 commits)
  Revert "phy dp83867: Fix compilation with CONFIG_OF_MDIO=m"
  Revert "phy dp83867: Make rgmii parameters optional"
  r8169: default to 64-bit DMA on recent PCIe chips
  phy dp83867: Make rgmii parameters optional
  phy dp83867: Fix compilation with CONFIG_OF_MDIO=m
  bpf: arm64: remove callee-save registers use for tmp registers
  asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions
  switchdev: pass pointer to fib_info instead of copy
  net_sched: close another race condition in tcf_mirred_release()
  tipc: fix nametable publication field in nl compat
  drivers: net: Don't print unpopulated net_device name
  qed: add support for dcbx.
  ravb: Add missing free_irq() calls to ravb_close()
  qed: Remove a stray tab
  net: ethernet: fec-mpc52xx: use phy_ethtool_{get|set}_link_ksettings
  net: ethernet: fec-mpc52xx: use phydev from struct net_device
  bpf, doc: fix typo on bpf_asm descriptions
  stmmac: hardware TX COE doesn't work when force_thresh_dma_mode is set
  net: ethernet: fs-enet: use phy_ethtool_{get|set}_link_ksettings
  net: ethernet: fs-enet: use phydev from struct net_device
  ...
</content>
</entry>
<entry>
<title>tcp: remove SKBTX_ACK_TSTAMP since it is redundant</title>
<updated>2016-04-28T20:06:10Z</updated>
<author>
<name>Soheil Hassas Yeganeh</name>
<email>soheil@google.com</email>
</author>
<published>2016-04-28T03:39:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0a2cf20c3fb62ad4717276b5303bf831f7b29d54'/>
<id>urn:sha1:0a2cf20c3fb62ad4717276b5303bf831f7b29d54</id>
<content type='text'>
The SKBTX_ACK_TSTAMP flag is set in skb_shinfo-&gt;tx_flags when
the timestamp of the TCP acknowledgement should be reported on
error queue. Since accessing skb_shinfo is likely to incur a
cache-line miss at the time of receiving the ack, the
txstamp_ack bit was added in tcp_skb_cb, which is set iff
the SKBTX_ACK_TSTAMP flag is set for an skb. This makes
SKBTX_ACK_TSTAMP flag redundant.

Remove the SKBTX_ACK_TSTAMP and instead use the txstamp_ack bit
everywhere.

Note that this frees one bit in shinfo-&gt;tx_flags.

Signed-off-by: Soheil Hassas Yeganeh &lt;soheil@google.com&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Suggested-by: Willem de Bruijn &lt;willemb@google.com&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2016-04-14T04:39:15Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-04-14T04:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6c61403daea578dcfe84f187c204db1a3fa3d6ae'/>
<id>urn:sha1:6c61403daea578dcfe84f187c204db1a3fa3d6ae</id>
<content type='text'>
</content>
</entry>
<entry>
<title>-&gt;getxattr(): pass dentry and inode as separate arguments</title>
<updated>2016-04-11T04:48:00Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-04-11T04:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce23e640133484eebc20ca7b7668388213e11327'/>
<id>urn:sha1:ce23e640133484eebc20ca7b7668388213e11327</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>net: introduce lockdep_is_held and update various places to use it</title>
<updated>2016-04-07T20:44:14Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2016-04-05T15:10:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e1d04e678cf72442f57ce82803c7a407769135f'/>
<id>urn:sha1:1e1d04e678cf72442f57ce82803c7a407769135f</id>
<content type='text'>
The socket is either locked if we hold the slock spin_lock for
lock_sock_fast and unlock_sock_fast or we own the lock (sk_lock.owned
!= 0). Check for this and at the same time improve that the current
thread/cpu is really holding the lock.

Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sock: enable timestamping using control messages</title>
<updated>2016-04-04T19:50:30Z</updated>
<author>
<name>Soheil Hassas Yeganeh</name>
<email>soheil@google.com</email>
</author>
<published>2016-04-03T03:08:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c14ac9451c34832554db33386a4393be8bba3a7b'/>
<id>urn:sha1:c14ac9451c34832554db33386a4393be8bba3a7b</id>
<content type='text'>
Currently, SOL_TIMESTAMPING can only be enabled using setsockopt.
This is very costly when users want to sample writes to gather
tx timestamps.

Add support for enabling SO_TIMESTAMPING via control messages by
using tsflags added in `struct sockcm_cookie` (added in the previous
patches in this series) to set the tx_flags of the last skb created in
a sendmsg. With this patch, the timestamp recording bits in tx_flags
of the skbuff is overridden if SO_TIMESTAMPING is passed in a cmsg.

Please note that this is only effective for overriding the recording
timestamps flags. Users should enable timestamp reporting (e.g.,
SOF_TIMESTAMPING_SOFTWARE | SOF_TIMESTAMPING_OPT_ID) using
socket options and then should ask for SOF_TIMESTAMPING_TX_*
using control messages per sendmsg to sample timestamps for each
write.

Signed-off-by: Soheil Hassas Yeganeh &lt;soheil@google.com&gt;
Acked-by: Willem de Bruijn &lt;willemb@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[net] drop 'size' argument of sock_recvmsg()</title>
<updated>2016-03-28T17:57:51Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2015-03-15T01:13:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2da62906b1e298695e1bb725927041cd59942c98'/>
<id>urn:sha1:2da62906b1e298695e1bb725927041cd59942c98</id>
<content type='text'>
all callers have it equal to msg_data_left(msg).

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>net: Fix use after free in the recvmmsg exit path</title>
<updated>2016-03-14T16:41:49Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2016-03-14T12:56:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34b88a68f26a75e4fded796f1a49c40f82234b7d'/>
<id>urn:sha1:34b88a68f26a75e4fded796f1a49c40f82234b7d</id>
<content type='text'>
The syzkaller fuzzer hit the following use-after-free:

  Call Trace:
   [&lt;ffffffff8175ea0e&gt;] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:295
   [&lt;ffffffff851cc31a&gt;] __sys_recvmmsg+0x6fa/0x7f0 net/socket.c:2261
   [&lt;     inline     &gt;] SYSC_recvmmsg net/socket.c:2281
   [&lt;ffffffff851cc57f&gt;] SyS_recvmmsg+0x16f/0x180 net/socket.c:2270
   [&lt;ffffffff86332bb6&gt;] entry_SYSCALL_64_fastpath+0x16/0x7a
  arch/x86/entry/entry_64.S:185

And, as Dmitry rightly assessed, that is because we can drop the
reference and then touch it when the underlying recvmsg calls return
some packets and then hit an error, which will make recvmmsg to set
sock-&gt;sk-&gt;sk_err, oops, fix it.

Reported-and-Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Cc: Alexander Potapenko &lt;glider@google.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Kostya Serebryany &lt;kcc@google.com&gt;
Cc: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Fixes: a2e2725541fa ("net: Introduce recvmmsg socket syscall")
http://lkml.kernel.org/r/20160122211644.GC2470@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: socket: use pr_info_once to tip the obsolete usage of PF_PACKET</title>
<updated>2016-03-14T02:37:50Z</updated>
<author>
<name>liping.zhang</name>
<email>liping.zhang@spreadtrum.com</email>
</author>
<published>2016-03-11T15:08:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f3c986908cc3b369b57f75de306c635a0074b76b'/>
<id>urn:sha1:f3c986908cc3b369b57f75de306c635a0074b76b</id>
<content type='text'>
There is no need to use the static variable here, pr_info_once is more
concise.

Signed-off-by: Liping Zhang &lt;liping.zhang@spreadtrum.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
