Skip to content

BPF/random32 updates

Daniel Borkmann netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 6 repliesIn review
  2. v15 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Make DO_ONCE() type-safe, remove the kvec helper. Credits go to Alexei Starovoitov for the __VA_ARGS__ hint, thanks!
- Add a comment to the DO_ONCE() helper as suggested by Alexei.
- Rework prandom_init_once() helper to the new API.
- Keep Alexei's Acked-by on the last patch.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5net: move net_get_random_once to libinclude/linux/net.h include/linux/once.h lib/Makefile +2 more+84 -672 replies
2/5once: make helper generic for calling functions onceinclude/linux/once.h lib/once.c+76 -351 reply
3/5random32: add prandom_seed_full_state helperlib/random32.c+21 -161 reply
4/5random32: add prandom_init_once helper for own rngsinclude/linux/random.h lib/random32.c+7 -11 reply
5/5bpf: split state from prandom_u32() and consolidate {c,e}BPF prngsinclude/linux/bpf.h kernel/bpf/core.c kernel/bpf/helpers.c +2 more+35 -130 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchHannes Frederic SowaAlexei Starovoitov
1/5A-b
2/5A-b
3/5A-b A-b
4/5A-b A-b
5/5A-b A-b

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

Read the v2 thread

Cover letter [PATCH net-next v2 0/5] BPF/random32 updates

BPF update to split the prandom state apart, and to move the *once helpers to the core. For details, please see individual patches. Given the changes and since it's in the tree for quite some time, net-next is a better choice in our opinion.

v1 -> v2:
- Make DO_ONCE() type-safe, remove the kvec helper. Credits go to Alexei Starovoitov for the __VA_ARGS__ hint, thanks!
- Add a comment to the DO_ONCE() helper as suggested by Alexei.
- Rework prandom_init_once() helper to the new API.
- Keep Alexei's Acked-by on the last patch.

Thanks!

Daniel Borkmann (3):
random32: add prandom_seed_full_state helper
random32: add prandom_init_once helper for own rngs
bpf: split state from prandom_u32() and consolidate {c,e}BPF prngs

Hannes Frederic Sowa (2):
net: move net_get_random_once to lib
once: make helper generic for calling function once

 include/linux/bpf.h    |  4 ++++
 include/linux/net.h    | 21 ++++-------------
 include/linux/once.h   | 57 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/random.h |  6 +++++
 kernel/bpf/core.c      | 26 +++++++++++++++++++++
 kernel/bpf/helpers.c   |  7 +-----
 kernel/bpf/syscall.c   |  2 ++
 lib/Makefile           |  3 ++-
 lib/once.c             | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/random32.c         | 37 +++++++++++++++++-------------
 net/core/filter.c      |  9 ++------
 net/core/utils.c       | 49 ---------------------------------------
 12 files changed, 187 insertions(+), 96 deletions(-)
 create mode 100644 include/linux/once.h
 create mode 100644 lib/once.c
Signature · 1 line
1.9.3