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>] [day] [month] [year] [list]
Message-ID: <CAADnVQJnD8=mJpkqr4_jr-EumLrfT0HtxBCzXRN1n4Lr27PTiA@mail.gmail.com>
Date:   Wed, 4 Apr 2018 22:10:05 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Mathieu Xhonneux <m.xhonneux@...il.com>
Cc:     David Lebrun <dav.lebrun@...il.com>,
        Network Development <netdev@...r.kernel.org>,
        David Lebrun <dlebrun@...gle.com>,
        Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH net-next RFC 0/5] ipv6: sr: introduce seg6local End.BPF action

On Wed, Apr 4, 2018 at 2:34 AM, Mathieu Xhonneux <m.xhonneux@...il.com> wrote:
> 2018-04-03 16:25 GMT+02:00 David Lebrun <dav.lebrun@...il.com>:
>> Actually I'm wrong here. dst_input() will call either ip6_input() or
>> ip6_forward(), not ipv6_rcv(). Both functions expect IP6CB() to be set,
>> so using skb->cb here will interfere with them.
>>
>> What about saving and restoring the IPv6 CB, similarly to what TCP does with
>> tcp_v6_restore_cb() ?
>
>
> Yes. I can change the call to bpf_prog_run_save_cb to bpf_prog_run_clear_cb,
> and then manually save/restore the IPv6 CB in input_action_end_bpf.
>
> Or is there maybe a better solution to share some state between the bpf caller
> and helpers, that does not need access to skb->cb ?

I think per-cpu scratch buffer approach can work for this
situation. Similar to one used by do_redirect and sockmap.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ