Skip to content

Fix collisions in socket cookie generation

Daniel Borkmann bpf netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Fix up commit description in patch #1, thanks Eric!

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2sock: make cookie generation global instead of per netnsinclude/net/net_namespace.h include/uapi/linux/bpf.h net/core/sock_diag.c+4 -40 replies
2/2bpf: sync bpf.h to tools infrastructuretools/include/uapi/linux/bpf.h+7 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH net v2 0/2] Fix collisions in socket cookie generation

This change makes the socket cookie generator as a global counter instead of per netns in order to fix cookie collisions for BPF use cases we ran into. See main patch #1 for more details.

Given the change is small/trivial and fixes an issue we're seeing my preference would be net tree (though it cleanly applies to net-next as well). Went for net tree instead of bpf tree here given the main change is in net/core/sock_diag.c, but either way would be fine with me.

Thanks a lot!

v1 -> v2:
- Fix up commit description in patch #1, thanks Eric!

Daniel Borkmann (2):
sock: make cookie generation global instead of per netns
bpf: sync bpf.h to tools infrastructure

 include/net/net_namespace.h    |  1 -
 include/uapi/linux/bpf.h       |  4 ++--
 net/core/sock_diag.c           |  3 ++-
 tools/include/uapi/linux/bpf.h | 11 +++++++----
 4 files changed, 11 insertions(+), 8 deletions(-)
Signature · 1 line
2.17.1