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: <CAADnVQKjMp7EE1iArtYKVnr=iSaOuynnuB09mEb-KAWHwzaVQw@mail.gmail.com>
Date:   Mon, 24 May 2021 07:48:09 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Lorenz Bauer <lmb@...udflare.com>
Cc:     Toke Høiland-Jørgensen <toke@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>, Kernel Team <kernel-team@...com>
Subject: Re: [RFC PATCH bpf-next] bpf: Introduce bpf_timer

On Mon, May 24, 2021 at 1:42 AM Lorenz Bauer <lmb@...udflare.com> wrote:
>
> On Sun, 23 May 2021 at 16:58, Alexei Starovoitov
> <alexei.starovoitov@...il.com> wrote:
>
> ...
>
> >
> > msecs are used to avoid exposing jiffies to bpf prog, since msec_to_jiffies
> > isn't trivial to do in the bpf prog unlike the kernel.
>
> Isn't that already the case with bpf_jiffies64?

It's reading jiffies. To convert to time the prog needs HZ value.
The HZ is also accessible via kconfig special map type and libbpf magic,
but supplying jiffies as an end-time is an implementation detail.
Are you arguing that api should be exactly one-to-one to kernel
and force all progs to do bpf_jiffies64() + end_time/HZ ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ