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: <551D5E69.4050704@iogearbox.net>
Date:	Thu, 02 Apr 2015 17:21:13 +0200
From:	Daniel Borkmann <daniel@...earbox.net>
To:	Jiri Pirko <jiri@...nulli.us>
CC:	Alexei Starovoitov <ast@...mgrid.com>,
	"David S. Miller" <davem@...emloft.net>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	linux-api@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] tc: bpf: add checksum helpers

On 04/02/2015 05:15 PM, Jiri Pirko wrote:
> Thu, Apr 02, 2015 at 05:00:47PM CEST, daniel@...earbox.net wrote:
>> On 04/02/2015 02:12 AM, Alexei Starovoitov wrote:
>>> Commit 608cd71a9c7c ("tc: bpf: generalize pedit action") has added the
>>> possibility to mangle packet data to BPF programs in the tc pipeline.
>>> This patch adds two helpers bpf_l3_csum_replace() and bpf_l4_csum_replace()
>>> for fixing up the protocol checksums after the packet mangling.
>>>
>>> It also adds 'flags' argument to bpf_skb_store_bytes() helper to avoid
>>> unnecessary checksum recomputations when BPF programs adjusting l3/l4
>>> checksums and documents all three helpers in uapi header.
>>>
>>> Moreover, a sample program is added to show how BPF programs can make use
>>> of the mangle and csum helpers.
>>>
>>> Signed-off-by: Alexei Starovoitov <ast@...mgrid.com>
>>
>> I think in future we need to find a better place for these helpers,
>> as they are for cls_bpf and act_bpf.
>
> Yeah, makes sense to now have it in net/core/filter.c. How about to
> create net/bpf dir for these?

I was thinking somewhere under net/sched/, f.e. net/sched/bpf.c
as probably kernel/bpf/ would end up in too much ifdef pasta. :/
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ