Re: [PATCH bpf] bpf: fix bug in mmap() implementation for BPF array map

2020-05-14 Thread Alexei Starovoitov
On Tue, May 12, 2020 at 8:21 PM Yonghong Song wrote: > > > > On 5/12/20 4:59 PM, Andrii Nakryiko wrote: > > 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-mappin

Re: [PATCH bpf] bpf: fix bug in mmap() implementation for BPF array map

2020-05-12 Thread Yonghong Song
On 5/12/20 4:59 PM, Andrii Nakryiko wrote: 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 pag

[PATCH bpf] bpf: fix bug in mmap() implementation for BPF array map

2020-05-12 Thread Andrii Nakryiko
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. Th