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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m28r9ldm7d.fsf@gmail.com>
Date:   Tue, 05 Sep 2023 10:05:26 +0100
From:   Donald Hunter <donald.hunter@...il.com>
To:     David Wang <00107082@....com>
Cc:     fw@...len.de, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Song Liu <song@...nel.org>,
        Yonghong Song <yonghong.song@...ux.dev>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
        linux-kernel@...r.kernel.org, bpf@...r.kernel.org
Subject: Re: [PATCH] samples/bpf: Add sample usage for BPF_PROG_TYPE_NETFILTER

David Wang <00107082@....com> writes:

> This sample code implements a simple ipv4
> blacklist via the new bpf type BPF_PROG_TYPE_NETFILTER,
> which was introduced in 6.4.
>
> The bpf program drops package if destination ip address
> hits a match in the map of type BPF_MAP_TYPE_LPM_TRIE,
>
> The userspace code would load the bpf program,
> attach it to netfilter's FORWARD/OUTPUT hook,
> and then write ip patterns into the bpf map.
>
> Signed-off-by: David Wang <00107082@....com>
> ---
>  samples/bpf/Makefile                      |  3 +
>  samples/bpf/netfilter_ip4_blacklist.bpf.c | 62 +++++++++++++++
>  samples/bpf/netfilter_ip4_blacklist.c     | 96 +++++++++++++++++++++++
>  3 files changed, 161 insertions(+)
>  create mode 100644 samples/bpf/netfilter_ip4_blacklist.bpf.c
>  create mode 100644 samples/bpf/netfilter_ip4_blacklist.c

According to https://docs.kernel.org/process/coding-style.html#naming
you should avoid new use of blacklist. You should use somethink like
denylist or blocklist instead.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ