summaryrefslogtreecommitdiffstats
path: root/net/qrtr
diff options
context:
space:
mode:
authorDavid Miller2017-04-20 21:20:16 +0200
committerDavid S. Miller2017-04-21 21:16:46 +0200
commit89087c456fb5cb5e534edf1c30568a8baae4c906 (patch)
treeed26db1aef0514d46d969bf21b45e0c52f7d7972 /net/qrtr
parentnet: ipv6: RTF_PCPU should not be settable from userspace (diff)
downloadkernel-qcow2-linux-89087c456fb5cb5e534edf1c30568a8baae4c906.tar.gz
kernel-qcow2-linux-89087c456fb5cb5e534edf1c30568a8baae4c906.tar.xz
kernel-qcow2-linux-89087c456fb5cb5e534edf1c30568a8baae4c906.zip
bpf: Fix values type used in test_maps
Maps of per-cpu type have their value element size adjusted to 8 if it is specified smaller during various map operations. This makes test_maps as a 32-bit binary fail, in fact the kernel writes past the end of the value's array on the user's stack. To be quite honest, I think the kernel should reject creation of a per-cpu map that doesn't have a value size of at least 8 if that's what the kernel is going to silently adjust to later. If the user passed something smaller, it is a sizeof() calcualtion based upon the type they will actually use (just like in this testcase code) in later calls to the map operations. Fixes: df570f577231 ("samples/bpf: unit test for BPF_MAP_TYPE_PERCPU_ARRAY") Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'net/qrtr')
0 files changed, 0 insertions, 0 deletions