From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by sourceware.org (Postfix) with ESMTPS id E8DAA3858439 for ; Wed, 3 Aug 2022 13:50:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E8DAA3858439 Received: by mail-wm1-f53.google.com with SMTP id r67-20020a1c4446000000b003a34ac64bdfso594258wma.1 for ; Wed, 03 Aug 2022 06:50:46 -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=pCo2MnjnFoJitvDCiwhb+pdaA00Wk/xSjX7gGv6XIGs=; b=AcZElIc1KNgA0+OUmoFnpIlef4P1cxnoW+bBOy3mNIbMMgid/tyFcaxxeGmfpQNDx4 MQz/YSHMe2tHQx90ri+QxXXHbuW5LlRA3U6cBNuIM1TLTVx2E5Z/FzEaZ9qHkP0kiH5f 2JFjH3thHvUeb4bVeC1+0QxdX1yy2IPZFhjke36llRSZirVJL2ykGVhUocm0Ljm/T0Oa Y40R0xnZw2EGonyuGyqHWVj1qWbVNLDHRtyNlQzScAO38wJbwFLtlgBpZQzgVECzWgUS eSKsGXCUG2nvAb+JfCPrnaB3B0k89gLrBrd89zhsaDhN4FGwBDdqtbllTGHMm2YQTHb5 /HxA== X-Gm-Message-State: ACgBeo1FkYCH65FoUAG8OTayfnDtSPoOlwhXudnZbBdWhGilpjcFMFRo MaTYG1B0yXpp1aDBQ+x7HvMBZHhSEsc6wWCdiXkjDQ== X-Google-Smtp-Source: AA6agR6OPzt8n52YgscfPJPPgXB9OYZKgefFkddRrt6jqLJtlu9FRuPji4xT/5Uz/nfOhn+CzPHL+tWgjuiOV798F90= X-Received: by 2002:a05:600c:4e4d:b0:3a3:1fe6:6b20 with SMTP id e13-20020a05600c4e4d00b003a31fe66b20mr2941092wmq.197.1659534645922; Wed, 03 Aug 2022 06:50:45 -0700 (PDT) MIME-Version: 1.0 References: <87fsigp7y9.fsf@oldenburg.str.redhat.com> <2cce82a8-5a6c-f555-4592-1fae54dc2d0e@opteya.com> <87r11z6kup.fsf@oldenburg.str.redhat.com> In-Reply-To: <87r11z6kup.fsf@oldenburg.str.redhat.com> From: =?UTF-8?Q?Cristian_Rodr=C3=ADguez?= Date: Wed, 3 Aug 2022 09:50:34 -0400 Message-ID: Subject: Re: Using arc4random() in the library (was Re: [PATCH] malloc: Use __getrandom_nocancel during tcache initiailization) To: Florian Weimer Cc: Yann Droneaud , libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 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 autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Wed, 03 Aug 2022 13:50:49 -0000 On Tue, Aug 2, 2022 at 5:44 AM Florian Weimer via Libc-alpha wrote: > Currently there is not much of a difference between arc4random_buf and > getrandom on current kernels. We'll see where getrandom is heading (and > if vDSO acceleration will end up in the kernel), and if it will involve > malloc in some way. The current experimental interface between vdso an userspace does not involve malloc, state has to be allocated by calling void *getrandom_alloc([inout] size_t *num, [out] size_t *size_per_each);