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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 12 Dec 2022 15:41:15 -0700
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     Amit Klein <aksecurity@...il.com>
Cc:     Yonghong Song <yhs@...a.com>, david.keisarschm@...l.huji.ac.il,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        John Fastabend <john.fastabend@...il.com>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Song Liu <song@...nel.org>, Yonghong Song <yhs@...com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, ilay.bahat1@...il.com,
        bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH 2/5] Replace invocation of weak PRNG in kernel/bpf/core.c

On Tue, Dec 13, 2022 at 12:35:24AM +0200, Amit Klein wrote:
> On Mon, Dec 12, 2022 at 8:03 PM Yonghong Song <yhs@...a.com> wrote:
> >
> >
> >
> > On 12/11/22 2:16 PM, david.keisarschm@...l.huji.ac.il wrote:
> > > From: David <david.keisarschm@...l.huji.ac.il>
> > >
> > > We changed the invocation of
> > >   prandom_u32_state to get_random_u32.
> > >   We deleted the maintained state,
> > >   which was a CPU-variable,
> > >   since get_random_u32 maintains its own CPU-variable.
> > >   We also deleted the state initializer,
> > >   since it is not needed anymore.
> > >
> > > Signed-off-by: David <david.keisarschm@...l.huji.ac.il>
> > > ---
> > >   include/linux/bpf.h   |  1 -
> > >   kernel/bpf/core.c     | 13 +------------
> > >   kernel/bpf/verifier.c |  2 --
> > >   net/core/filter.c     |  1 -
> > >   4 files changed, 1 insertion(+), 16 deletions(-)
> > >
> > > diff --git a/include/linux/bpf.h b/include/linux/bpf.h
> [...]
> > Please see the discussion here.
> > https://lore.kernel.org/bpf/87edtctz8t.fsf@toke.dk/
> > There is a performance concern with the above change.
> >
> 
> I see. How about using (in this instance only!) the SipHash-based
> solution which was the basis for prandom_u32() starting with commit
> c51f8f88d705 (v5.10-rc1) up until commit d4150779e60f (v5.19-rc1)?

Stop with this pseudo cryptographic garbage. Stop pushing this
everywhere. It was a hassle to undo this crap the first time around. The
last thing we need is to add it back.

Plus, there's no need for it either. I'll revisit the bpf patch if/when
it makes sense to do performance-wise.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ