]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: use LFS (_FILE_OFFSET_BITS) instead of direct mmap2 syscall
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Thu, 15 Aug 2019 12:13:54 +0000 (15:13 +0300)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 21 Aug 2019 12:31:17 +0000 (14:31 +0200)
commit72237ed1a4ce8677ee21a02eea60f2e94084e9c2
tree49c78f1d277c6cba8cf008e3829bfc3ad2da8b4d
parentc460c54ce1da4a632954af6d661e49d4c660747d
libbpf: use LFS (_FILE_OFFSET_BITS) instead of direct mmap2 syscall

Drop __NR_mmap2 fork in flavor of LFS, that is _FILE_OFFSET_BITS=64
(glibc & bionic) / LARGEFILE64_SOURCE (for musl) decision. It allows
mmap() to use 64bit offset that is passed to mmap2 syscall. As result
pgoff is not truncated and no need to use direct access to mmap2 for
32 bits systems.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/Makefile
tools/lib/bpf/xsk.c