diff options
| author | David S. Miller <davem@davemloft.net> | 2015-10-08 05:26:44 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-10-08 05:26:44 -0700 |
| commit | df718423250c000ca4323a767cedc2f3219b685c (patch) | |
| tree | 3afa13e8acbdf49a9f8c1a7993065c3836997a01 /kernel/bpf/helpers.c | |
| parent | 28335a7445202a3d118145a07d9138e9881ebe18 (diff) | |
| parent | 3ad0040573b0c00f88488bc31958acd07a55ee2e (diff) | |
Merge branch 'bpf_random32'
Daniel Borkmann says:
====================
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.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf/helpers.c')
| -rw-r--r-- | kernel/bpf/helpers.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index 1447ec09421e..4504ca66118d 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -93,13 +93,8 @@ const struct bpf_func_proto bpf_map_delete_elem_proto = { .arg2_type = ARG_PTR_TO_MAP_KEY, }; -static u64 bpf_get_prandom_u32(u64 r1, u64 r2, u64 r3, u64 r4, u64 r5) -{ - return prandom_u32(); -} - const struct bpf_func_proto bpf_get_prandom_u32_proto = { - .func = bpf_get_prandom_u32, + .func = bpf_user_rnd_u32, .gpl_only = false, .ret_type = RET_INTEGER, }; |
