From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by sourceware.org (Postfix) with ESMTPS id 4DEA73858C50 for ; Thu, 31 Mar 2022 10:08:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4DEA73858C50 Received: by mail-wr1-f46.google.com with SMTP id r13so32983879wrr.9 for ; Thu, 31 Mar 2022 03:08:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FE8KFfJUKSD9OLV1tUBXQO/oq4xSBn4Ki9Ni+UqC0EQ=; b=4jQxTjIjBP4ElWlovPaKdyF49L33HiX41PjaktswZlNxlyyGi4EOFeQvFl9XWnrZ7y fWSDs3XRe8tO+oaOoVxaZ32cWndKsWu90pnwgXhIggWSNHJRA2UKaG7gEYmH3LIvRqLL RWj8x8sp3mXNsvS72fzt00UbY8Xayj8TpogANC1sxinN2qV2jWA+KJ7B6MEFusEExQfq w/uKwp6VoJ6BWQnFocz8geTA5fDDBN4sSrXF1ccKQ9ZLHbHb/PVdnIbdG03Gn2Xzdz/w D79itEuPxL9qqn/8sqfnrNCYjaM6yAh4YaGCHLhQcnV/hVD69uD+SxVY602jYG93nnRZ w3xQ== X-Gm-Message-State: AOAM531c8FXHqHivUhUBub2fiiPrclg7BmrqniUZ0KaGlqKbT5x5+upo UMdaAiW+/oAbhEC3rVC3iRuiyYdsUlnwfGBuqf66zA== X-Google-Smtp-Source: ABdhPJxKr+PEZ7Bo9+npl1MK7TgQsS0fFGcbcS/OuCDqS2gVVdiVfPdk17xFFuMuYPuexUws+cJNkmX00RM9+lzhokE= X-Received: by 2002:a5d:67cb:0:b0:204:674:fd12 with SMTP id n11-20020a5d67cb000000b002040674fd12mr3589811wrw.528.1648721300049; Thu, 31 Mar 2022 03:08:20 -0700 (PDT) MIME-Version: 1.0 References: <20220328220936.2724834-1-goldstein.w.n@gmail.com> <7b48ece6-392a-0850-c136-01ab751273ef@linaro.org> <72332228-093c-5186-789f-8616cfb93793@linaro.org> In-Reply-To: From: =?UTF-8?Q?Cristian_Rodr=C3=ADguez?= Date: Thu, 31 Mar 2022 07:08:08 -0300 Message-ID: Subject: Re: [PATCH v1 1/2] random-bits: Factor out entropy generating function To: "Jason A. Donenfeld" Cc: Noah Goldstein , Adhemerval Zanella , GNU C Library , Florian Weimer Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2022 10:08:23 -0000 On Thu, Mar 31, 2022 at 1:45 AM Jason A. Donenfeld wrote: > Can someone provide some context on this? I've actually looked into > having some megafast userspace RNG component in the vDSO, and I'm not > fundamentally opposed to the idea. I think there's interesting > potential there and something worth considering. But what's the > context of you asking for this now? Under what circumstances are you > finding that calling getrandom(0) or similar is too high overhead or > otherwise problematic? I'm not sure in what scenario the syscall overhead is too big, Maybe it is if called in a loop..but I guess the argument here is that getrandom(0) may block or that in a non-bleeding edge system it might be too slow. (Im aware of the recent massive speedups) I believe what is needed is a PRNG, no need to guarantee to be cryptographically secure, that can be used without having to seed it from userspace, mega fast, never blocks and can be used by the dynamic linker for example. Now it will be awesome if it is all of that and CSPRNG.