diff options
author | Andrii Nakryiko <andriin@fb.com> | 2020-05-13 01:59:25 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-05-14 21:40:04 +0200 |
commit | 333291ce5055f2039afc907badaf5b66bc1adfdc (patch) | |
tree | 27c603d11355ab26e741a267cf52b112b70a91b5 /kernel/Kconfig.hz | |
parent | samples: bpf: Fix build error (diff) | |
download | linux-333291ce5055f2039afc907badaf5b66bc1adfdc.tar.xz linux-333291ce5055f2039afc907badaf5b66bc1adfdc.zip |
bpf: Fix bug in mmap() implementation for BPF array map
mmap() subsystem allows user-space application to memory-map region with
initial page offset. This wasn't taken into account in initial implementation
of BPF array memory-mapping. This would result in wrong pages, not taking into
account requested page shift, being memory-mmaped into user-space. This patch
fixes this gap and adds a test for such scenario.
Fixes: fc9702273e2e ("bpf: Add mmap() support for BPF_MAP_TYPE_ARRAY")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20200512235925.3817805-1-andriin@fb.com
Diffstat (limited to 'kernel/Kconfig.hz')
0 files changed, 0 insertions, 0 deletions