Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2610269imi; Mon, 25 Jul 2022 03:29:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tMEddhAuQLsXtiK/UlG1RgkXeyv2wd9SgQtqJR9/Q7oKYBiatQLUsOE1IcNeqUfld1bPs3 X-Received: by 2002:aa7:94b4:0:b0:52b:b93b:95e9 with SMTP id a20-20020aa794b4000000b0052bb93b95e9mr11902785pfl.31.1658744951639; Mon, 25 Jul 2022 03:29:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658744951; cv=none; d=google.com; s=arc-20160816; b=P2hF3HrRi903z3nBBWRE1pU37/VOBjNAhvtKPuplzHqJinjOKHxE2yxtaAdwYQuV7Q 7W8IGSC17wFDMXPEARLr+GMpj169axD35YjkdatOSdkgtJGexW1Rs4u6ewLR+TgsPHAG cruv2n7V8rJeYkF0KIfnmpG90FWgV3C2mpnCaAm41SiTJ4refVsjWH8bs0s4ewFIWqTI kykbRlRs+euvMWp0+T198ioyiVTcJaQQlxjFhHmyaxXWPC53I4OUsGs9lOHy1/7m4mzn 3HvDV5JJmqHsHVkd4EtDOtb8HY+ume8ADAXWR4p/HwAtqvsQBbgUw/2c0JdW193GTesA aVgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=Jrp79KdnVbC67SbvT0BjYJeBblG8mzva9JDRRifZJsc=; b=q0Hax50u+I9Geg21sLd84MKYbDUUlE9fPCNDThmln/YdRYOisqDNeJdQPqxMPGdG2K KUzU2EB28ZpzZ8u0z/yjY2P15+jvRaPsRH5LmewVhkA1l5jqpFwnbjd66Ctuqf5bXbqX D0YhW0gU4fpi3gr+f5+cTmDyYw1LMCUqm5Poyon81zFJ7g59bJwmbn3OnmT6aG8EyxK7 epguDtZL28r5ePbuZVJBi4z+9ycGpSnSqkm+8lH5FEzmvAokllq3FpbwJTv+C3A9XIgX oBvxPvIqnudhWSPvgSfOIRN8McrF4/zSo5FAvDkfbja9jTfUsEdMLT50D1QUrvaSPrNx /ZZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@redhat.com header.s=20210105 header.b=NLOVJ68q; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm18-20020a656e92000000b0041a75809f88si17868003pgb.875.2022.07.25.03.28.46; Mon, 25 Jul 2022 03:29:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@redhat.com header.s=20210105 header.b=NLOVJ68q; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234149AbiGYK2V (ORCPT + 99 others); Mon, 25 Jul 2022 06:28:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234196AbiGYK2L (ORCPT ); Mon, 25 Jul 2022 06:28:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 895AE175BF for ; Mon, 25 Jul 2022 03:28:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 06613B80DD9 for ; Mon, 25 Jul 2022 10:28:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E0A2C341CD for ; Mon, 25 Jul 2022 10:28:02 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=redhat.com header.i=@redhat.com header.b="NLOVJ68q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=20210105; t=1658744880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jrp79KdnVbC67SbvT0BjYJeBblG8mzva9JDRRifZJsc=; b=NLOVJ68qPKsc0gW/nwz8emdCq8miRplEWAJg1NVhIXXyrtqf89bi6CpBnIAdIe48SlU2wQ S8wcJCzw7B938zmmTkSS/JFvzerEGExkxgAFVn1zPJezVXihcEa3hy7zCo2S77IHWW+ltL tniRvUX6rBxZ64M8u8Fz53cxfkVNvqc= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 5d81789b (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Mon, 25 Jul 2022 10:28:00 +0000 (UTC) From: Florian Weimer To: Cristian =?utf-8?Q?Rodr=C3=ADguez?= Cc: "Jason A. Donenfeld" , libc-alpha@sourceware.org, Adhemerval Zanella Netto , Yann Droneaud , jann@thejh.net, Michael@phoronix.com, linux-crypto@vger.kernel.org Subject: Re: arc4random - are you sure we want these? References: Date: Mon, 25 Jul 2022 12:14:08 +0200 In-Reply-To: ("Cristian =?utf-8?Q?Rodr=C3=ADguez=22's?= message of "Sat, 23 Jul 2022 15:04:36 -0400") Message-ID: <877d41sdn3.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org * Cristian Rodr=C3=ADguez: > On Sat, Jul 23, 2022 at 12:25 PM Jason A. Donenfeld via Libc-alpha > wrote: > >> For that reason, past discussion of having some random number generation >> in userspace libcs has geared toward doing this in the vDSO, somehow, >> where the kernel can be part and parcel of that effort. > > On linux just making this interface call "something" from the VDSO that > > - does not block. > - cannot ever fail or if it does indeed need to bail out it kills the > calling thread as last resort. > > (if neither of those can be provided, we are back to square one) > > Will be beyond awesome because it could be usable everywhere, > including the dynamic linker, malloc or whatever else > question is..is there any at least experimental patch with a hope of > beign accepted available ? I agree that this would be nice, but we'd like have to donate thread-specific data for kernel use, and that's currently totally vaporware. The =E2=80=9Ccannot ever fail=E2=80=9D part is impossible to achieve due to= old kernels and seccomp filters. Low-level userspace needs to paper over it in some way, so that applications don't have to deal with it. Thanks, Florian