lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 27 Jun 2023 13:58:37 +0200
From: Florian Westphal <fw@...len.de>
To: <bpf@...r.kernel.org>
Cc: dxu@...uu.xyz,
	qde@...cy.de,
	netdev@...r.kernel.org,
	andrii.nakryiko@...il.com,
	Florian Westphal <fw@...len.de>
Subject: [PATCH bpf-next v3 0/2] libbpf: add netfilter link attach helper

v3: address comments from Andrii:
  - prune verbose error message in 1/2
  - use bpf_link_create internally in 1/2
  - use subtests in patch 2/2

When initial netfilter bpf program type support got added one
suggestion was to extend libbpf with a helper to ease attachment
of nf programs to the hook locations.

Add such a helper and a demo test case that attaches a dummy
program to various combinations.

I tested that the selftest fails when changing the expected
outcome (i.e., set 'success' when it should fail and v.v.).

Florian Westphal (2):
  tools: libbpf: add netfilter link attach helper
  selftests/bpf: Add bpf_program__attach_netfilter helper test

 tools/lib/bpf/bpf.c                           |  6 ++
 tools/lib/bpf/bpf.h                           |  6 ++
 tools/lib/bpf/libbpf.c                        | 42 +++++++++
 tools/lib/bpf/libbpf.h                        | 15 ++++
 tools/lib/bpf/libbpf.map                      |  1 +
 .../bpf/prog_tests/netfilter_link_attach.c    | 88 +++++++++++++++++++
 .../bpf/progs/test_netfilter_link_attach.c    | 14 +++
 7 files changed, 172 insertions(+)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/netfilter_link_attach.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_netfilter_link_attach.c

-- 
2.39.3


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ