diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2020-05-14 12:51:35 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-05-14 21:21:56 -0700 |
commit | bc56c919fce782f616823b76fb70a788f4762cf5 (patch) | |
tree | eaeac8cc29065dac36ceda034db0a102dfd4605b /crypto/algif_rng.c | |
parent | ddb47d518ca10948d1f64a983cb9274720f691cd (diff) | |
download | linux-bc56c919fce782f616823b76fb70a788f4762cf5.tar.gz |
bpf: Add xdp.frame_sz in bpf_prog_test_run_xdp().
Update the memory requirements, when adding xdp.frame_sz in BPF test_run
function bpf_prog_test_run_xdp() which e.g. is used by XDP selftests.
Specifically add the expected reserved tailroom, but also allocated a
larger memory area to reflect that XDP frames usually comes in this
format. Limit the provided packet data size to 4096 minus headroom +
tailroom, as this also reflect a common 3520 bytes MTU limit with XDP.
Note that bpf_test_init already use a memory allocation method that clears
memory. Thus, this already guards against leaking uninit kernel memory.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/158945349549.97035.15316291762482444006.stgit@firesoul
Diffstat (limited to 'crypto/algif_rng.c')
0 files changed, 0 insertions, 0 deletions