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] [day] [month] [year] [list]
Message-Id: <20170411.150048.966246483547817859.davem@davemloft.net>
Date:   Tue, 11 Apr 2017 15:00:48 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     kubakici@...pl
Cc:     daniel@...earbox.net, ecree@...arflare.com, tom@...bertland.com,
        netdev@...r.kernel.org, ast@...nel.org
Subject: Re: RFC: Checksum offload and XDP

From: Jakub Kicinski <kubakici@...pl>
Date: Tue, 11 Apr 2017 11:34:25 -0700

> On Tue, 11 Apr 2017 18:43:47 +0200, Daniel Borkmann wrote:
>> cls_bpf has a couple of helpers like bpf_l3_csum_replace(), bpf_l4_csum_replace()
>> bpf_csum_diff(), bpf_csum_update(), where we (cilium at least) use checksum
>> diffs extensively. You can then also leave the option to the user to feed
>> pre-computed diffs from a map, etc, or, to just not care at all when not
>> necessary. Pushing this via return code seems a bit odd, perhaps a xdp->csum
>> member could be populated before calling into the program and the resulting
>> xdp->csum processed further upon exit.
> 
> +1 on exposing xdp->csum.  I think having the csum complete available
> in the eBPF program (rather than diff) may be useful for apps doing
> encap to a csumed tunnel (e.g. UDP).  If the header is pre-calculated
> in the map, having csum complete makes calculating the outer csum
> extremely easy, right?

The outer checksum is constant because when the inner checksum is
installed the inner frame checksums to zero.

I really want to see how people are actually changing fields in XDP
that requires special checksum facilities, that isn't already handled
using the csum helpers Daniel mentioned.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ