linux-stable/net
Christian Eggers 4e3bbb33e6 socket: don't clear SOCK_TSTAMP_NEW when SO_TIMESTAMPNS is disabled
SOCK_TSTAMP_NEW (timespec64 instead of timespec) is also used for
hardware time stamps (configured via SO_TIMESTAMPING_NEW).

User space (ptp4l) first configures hardware time stamping via
SO_TIMESTAMPING_NEW which sets SOCK_TSTAMP_NEW. In the next step, ptp4l
disables SO_TIMESTAMPNS(_NEW) (software time stamps), but this must not
switch hardware time stamps back to "32 bit mode".

This problem happens on 32 bit platforms were the libc has already
switched to struct timespec64 (from SO_TIMExxx_OLD to SO_TIMExxx_NEW
socket options). ptp4l complains with "missing timestamp on transmitted
peer delay request" because the wrong format is received (and
discarded).

Fixes: 887feae36a ("socket: Add SO_TIMESTAMP[NS]_NEW")
Fixes: 783da70e83 ("net: add sock_enable_timestamps")
Signed-off-by: Christian Eggers <ceggers@arri.de>
Acked-by: Willem de Bruijn <willemb@google.com>
Acked-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-10-13 17:18:18 -07:00
..
6lowpan
9p treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
802
8021q treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
appletalk appletalk: Fix atalk_proc_init() return path 2020-08-03 15:48:32 -07:00
atm treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ax25 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-07-25 17:49:04 -07:00
batman-adv batman-adv: mcast: fix duplicate mcast packets from BLA backbone to mesh 2020-09-15 10:05:24 +02:00
bluetooth mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
bpf treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
bpfilter Merge branch 'exec-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2020-08-04 14:27:25 -07:00
bridge bridge: Netlink interface fix. 2020-10-08 12:05:07 -07:00
caif net: caif: fix error code handling 2020-08-25 07:50:25 -07:00
can net: j1939: j1939_session_fresh_new(): fix missing initialization of skbcnt 2020-10-08 23:28:09 +02:00
ceph libceph: use sendpage_ok() in ceph_tcp_sendpage() 2020-10-02 15:27:08 -07:00
core socket: don't clear SOCK_TSTAMP_NEW when SO_TIMESTAMPNS is disabled 2020-10-13 17:18:18 -07:00
dcb net: DCB: Validate DCB_ATTR_DCB_BUFFER argument 2020-09-10 15:09:08 -07:00
dccp treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
decnet treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dns_resolver
dsa net: mscc: ocelot: add locking for the port TX timestamp ID 2020-09-18 13:52:33 -07:00
ethernet
ethtool ethtool: mark netlink family as __ro_after_init 2020-09-28 18:52:50 -07:00
hsr hsr: avoid newline at end of message in NL_SET_ERR_MSG_MOD 2020-09-09 11:15:26 -07:00
ieee802154 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ife
ipv4 ipv4: Restore flowi4_oif update before call to xfrm_lookup_route 2020-10-10 11:38:59 -07:00
ipv6 net: ipv6: Discard next-hop MTU less than minimum link MTU 2020-10-09 16:22:59 -07:00
iucv treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
kcm net: pass a sockptr_t into ->setsockopt 2020-07-24 15:41:54 -07:00
key Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-08-02 01:02:12 -07:00
l2tp l2tp: improve API documentation in l2tp_core.h 2020-07-30 16:45:31 -07:00
l3mdev net: Fix some comments 2020-08-27 07:55:59 -07:00
lapb
llc net: pass a sockptr_t into ->setsockopt 2020-07-24 15:41:54 -07:00
mac80211 mac80211: fix 80 MHz association to 160/80+80 AP on 6 GHz 2020-09-18 14:01:24 +02:00
mac802154 Merge tag 'ieee802154-for-davem-2020-09-08' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan 2020-09-08 20:12:58 -07:00
mpls treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
mptcp mptcp: subflows garbage collection 2020-10-10 11:04:53 -07:00
ncsi treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
netfilter netfilter: nft_meta: use socket user_ns to retrieve skuid and skgid 2020-09-08 13:04:56 +02:00
netlabel netlabel: fix problems with mapping removal 2020-08-24 16:08:00 -07:00
netlink netlink: fix policy dump leak 2020-10-02 13:00:38 -07:00
netrom treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
nfc net/nfc/rawsock.c: add CAP_NET_RAW check. 2020-08-11 10:34:30 -07:00
nsh
openvswitch openvswitch: handle DNAT tuple collision 2020-10-08 12:20:35 -07:00
packet net/packet: fix overflow in tpacket_rcv 2020-09-04 11:56:02 -07:00
phonet treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
psample
qrtr net: qrtr: ns: Fix the incorrect usage of rcu_read_lock() 2020-10-06 06:01:35 -07:00
rds treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rfkill
rose treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
rxrpc rxrpc: Fix server keyring leak 2020-10-05 17:09:22 +01:00
sched net_sched: check error pointer in tcf_dump_walker() 2020-10-04 14:53:06 -07:00
sctp sctp: fix sctp_auth_init_hmacs() error path 2020-10-08 12:19:51 -07:00
smc net: smc: fix missing brace warning for old compilers 2020-10-10 10:38:40 -07:00
strparser
sunrpc SUNRPC: Fix svc_flush_dcache() 2020-09-21 10:13:25 -04:00
switchdev net: switchdev: Fixed kerneldoc warning 2020-09-23 17:46:31 -07:00
tipc tipc: fix NULL pointer dereference in tipc_named_rcv 2020-10-09 18:29:06 -07:00
tls net/tls: sendfile fails with ktls offload 2020-10-09 16:42:02 -07:00
unix treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
vmw_vsock vsock: fix potential null pointer dereference in vsock_poll() 2020-08-12 12:56:06 -07:00
wimax
wireless net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key() 2020-10-08 12:37:25 +02:00
x25 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
xdp xsk: Do not discard packet when NETDEV_TX_BUSY 2020-09-16 23:36:58 +02:00
xfrm Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec 2020-09-28 12:25:42 -07:00
compat.c net/scm: Fix typo in SCM_RIGHTS compat refactoring 2020-08-07 12:43:25 -07:00
devres.c
Kconfig
Makefile
socket.c net: add WARN_ONCE in kernel_sendpage() for improper zero-copy send 2020-10-02 15:27:08 -07:00
sysctl_net.c