net: tcp: fix rx timestamp behavior for tcp_recvmsg
Kelly Littlepage authored
[ Upstream commit cc4de047 ]

The stated intent of the original commit is to is to "return the timestamp
corresponding to the highest sequence number data returned." The current
implementation returns the timestamp for the last byte of the last fully
read skb, which is not necessarily the last byte in the recv buffer. This
patch converts behavior to the original definition, and to the behavior of
the previous draft versions of commit 98aaa913 ("tcp: Extend
SOF_TIMESTAMPING_RX_SOFTWARE to TCP recvmsg") which also match this
behavior.

Fixes: 98aaa913

 ("tcp: Extend SOF_TIMESTAMPING_RX_SOFTWARE to TCP recvmsg")
Co-developed-by: default avatarIris Liu <iris@onechronos.com>
Signed-off-by: default avatarIris Liu <iris@onechronos.com>
Signed-off-by: default avatarKelly Littlepage <kelly@onechronos.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Signed-off-by...
8df010e4
Name Last commit Last update
..
6lowpan 6lowpan: Off by one handling ->nexthdr
802 License cleanup: add SPDX GPL-2.0 license identifier to files with no license
8021q vlan: fix memory leak in vlan_dev_set_egress_priority
9p 9p/virtio: Add cleanup path in p9_virtio_init
appletalk appletalk: Set error code if register_snap_client failed
atm net: use skb_queue_empty_lockless() in poll() handlers
ax25 ax25: enforce CAP_NET_RAW for raw sockets
batman-adv batman-adv: Fix refcnt leak in batadv_v_ogm_process
bluetooth Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
bpf bpf: Align packet data properly in program testing framework.
bridge netfilter: ebtables: CONFIG_COMPAT: reject trailing data after last rule
caif net: use skb_queue_empty_lockless() in poll() handlers
can can: af_can: Fix error path of can_init()
ceph libceph: fix PG split vs OSD (re)connect race
core netprio_cgroup: Fix unlimited memory leak of v2 cgroups
dcb net: dcb: For wild-card lookups, use priority -1, not 0
dccp net: ipv6: add net argument to ip6_dst_lookup_flow
decnet net: add bool confirm_neigh parameter for dst_ops.update_pmtu
dns_resolver KEYS: Don't write out to userspace while holding key semaphore
dsa net: dsa: Fix duplicate frames flooded by learning
ethernet net: add annotations on hh->hh_len lockless accesses
hsr hsr: check protocol version in hsr_newlink()
ieee802154 nl802154: add missing attribute validation for dev_type
ife net: sched: ife: check on metadata length
ipv4 net: tcp: fix rx timestamp behavior for tcp_recvmsg
ipv6
ipx
iucv
kcm
key
l2tp
l3mdev
lapb
llc
mac80211
mac802154
mpls
ncsi
netfilter
netlabel
netlink
netrom
nfc
nsh
openvswitch
packet
phonet
psample
qrtr
rds
rfkill
rose
rxrpc
sched
sctp
smc
strparser
sunrpc
switchdev
tipc
tls
unix
vmw_vsock
wimax
wireless
x25
xfrm
Kconfig
Makefile
compat.c
socket.c
sysctl_net.c