Skip to content

net-timestamp: blinding

Willem de Bruijn netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesIn review
  2. v1 RFC5 patches 12 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net-timestamp: no-payload optionDocumentation/networking/timestamping.txt include/uapi/linux/net_tstamp.h net/core/skbuff.c +3 more+48 -120 replies
2/3net-timestamp: no-payload only sysctlDocumentation/sysctl/net.txt include/net/sock.h net/core/skbuff.c +2 more+41 -10 replies
3/3net-timestamp: no-payload option in txtimestamp testDocumentation/networking/timestamping/txtimestamp.c+24 -40 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRichard Cochran
SeriesA-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 0/3] net-timestamp: blinding

From: Willem de Bruijn <[email protected]>

Changes
(v2 -> v3)
- rebase only: v2 did not make it to patchwork / netdev (v1 -> v2)
- fix capability check in patch 2
this could be moved into net/core/sock.c as sk_capable_nouser()
(rfc -> v1)
- dropped patch 4: timestamp batching
due to complexity, as discussed
- dropped patch 5: default mode
because it does not really cover all use cases, as discussed
- added documentation
- minor fix, see patch 2

Two issues were raised during recent timestamping discussions:
1. looping full packets on the error queue exposes packet headers
2. TCP timestamping with retransmissions generates many timestamps

This RFC patchset is an attempt at addressing both without breaking legacy behavior.

Patch 1 reintroduces the "no payload" timestamp option, which loops timestamps onto an empty skb. This reduces the pressure on SO_RCVBUF from looping many timestamps. It does not reduce the number of recv() calls needed to process them. The timestamp cookie mechanism developed in http://patchwork.ozlabs.org/patch/427213/ did, but this is considerably simpler.

Patch 2 then gives administrators the power to block all timestamp requests that contain data by unprivileged users. I proposed this earlier as a backward compatible workaround in the discussion of

net-timestamp: pull headers for SOCK_STREAM
http://patchwork.ozlabs.org/patch/414810/

Patch 3 only updates the txtimestamp example to test this option. Verified that with option '-n', length is zero in all cases and option '-I' (PKTINFO) stops working.

Willem de Bruijn (3):
net-timestamp: no-payload option
net-timestamp: no-payload only sysctl
net-timestamp: no-payload option in txtimestamp test

 Documentation/networking/timestamping.txt          | 21 ++++++++++++
 .../networking/timestamping/txtimestamp.c          | 28 ++++++++++++---
 Documentation/sysctl/net.txt                       |  8 +++++
 include/net/sock.h                                 |  1 +
 include/uapi/linux/net_tstamp.h                    |  3 +-
 net/core/skbuff.c                                  | 40 ++++++++++++++++++----
 net/core/sock.c                                    |  3 ++
 net/core/sysctl_net_core.c                         |  9 +++++
 net/ipv4/ip_sockglue.c                             |  7 ++--
 net/ipv6/datagram.c                                |  5 ++-
 net/rxrpc/ar-error.c                               |  5 +++
 11 files changed, 113 insertions(+), 17 deletions(-)
Signature · 1 line
2.2.0.rc0.207.ga3a616c