lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat,  3 Oct 2020 16:55:02 +0800
From:   Hangbin Liu <>
Cc:     Alexei Starovoitov <>,
        Daniel Borkmann <>,
        Song Liu <>, Yonghong Song <>,
        Andrii Nakryiko <>,
        Andrii Nakryiko <>,,
        Toke Høiland-Jørgensen <>,
        Hangbin Liu <>
Subject: [PATCHv2 bpf 0/3] Fix pining maps after reuse map fd

When a user reuse map fd after creating a map manually and set the
pin_path, then load the object via libbpf. bpf_object__create_maps()
will skip pinning map if map fd exist. Fix it by add moving bpf creation
to else condition and go on checking map pin_path after that.

a) close map fd if init map slots failed
b) add bpf selftest for this scenario

Hangbin Liu (3):
  libbpf: close map fd if init map slots failed
  libbpf: check if pin_path was set even map fd exist
  selftest/bpf: test pinning map with reused map fd

 tools/lib/bpf/libbpf.c                        | 80 +++++++++++--------
 .../selftests/bpf/prog_tests/pinning.c        | 46 ++++++++++-
 2 files changed, 91 insertions(+), 35 deletions(-)


Powered by blists - more mailing lists