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]
Date:   Thu, 28 Jan 2021 22:21:36 -0800
From:   Yonghong Song <yhs@...com>
To:     Cong Wang <xiyou.wangcong@...il.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>
CC:     Daniel Borkmann <daniel@...earbox.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>, Jamal Hadi Salim <jhs@...atatu.com>,
        Andrii Nakryiko <andrii@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Cong Wang <cong.wang@...edance.com>,
        Andrii Nakryiko <andrii.nakryiko@...il.com>,
        Dongdong Wang <wangdongdong.6@...edance.com>
Subject: Re: [Patch bpf-next v5 1/3] bpf: introduce timeout hash map



On 1/28/21 9:57 PM, Cong Wang wrote:
> On Thu, Jan 28, 2021 at 6:54 PM Alexei Starovoitov
> <alexei.starovoitov@...il.com> wrote:
>>
>> I meant it would look like:
>>
>> noinline per_elem_callback(map, key, value, ...)
>> {
>>    if (value->foo > ...)
>>      bpf_delete_map_elem(map, key);
>> }
>>
>> noinline timer_callback(timer, ctx)
>> {
>>    map = ctx->map;
>>    bpf_for_each_map_elem(map, per_elem_callback, ...);
>> }
>>
>> int main_bpf_prog(skb)
>> {
>>    bpf_timer_setup(my_timer, timer_callback, ...);
>>    bpf_mod_timer(my_timer, HZ);
>> }
>>
>> The bpf_for_each_map_elem() work is already in progress. Expect patches to hit
>> mailing list soon.
> 
> We don't want a per-element timer, we want a per-map timer but that
> requires a way to iterate the whole map. If you or other can provide
> bpf_for_each_map_elem(), we can certainly build our timeout map
> on top of it.

I am working on this. Still need a few weeks to post RFC. Will share
as soon as it is in reasonable shape. Thanks!

> 
>> If you can work on patches for bpf_timer_*() it would be awesome.
> 
> Yeah, I will work on this, not only for timeout map, but also possibly for
> the ebpf qdisc I plan to add soon.
> 
> Thanks.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ