Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp660377imn; Tue, 26 Jul 2022 06:13:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1saCNzawGm43HHap/N6oA0gbHTgPNKrnSz5+XHZxZcI3AsqFjfKGsEhQeNSht/tTTw1A1fQ X-Received: by 2002:a17:90b:1e0e:b0:1f2:7a78:78e2 with SMTP id pg14-20020a17090b1e0e00b001f27a7878e2mr15929198pjb.57.1658841219192; Tue, 26 Jul 2022 06:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658841219; cv=none; d=google.com; s=arc-20160816; b=kxbE/jAgjKieZY9w6mOeo128h+ZUmDhZMqXaeFDocjWgnwqVX46IH70IcDelA/LAZD ywM2VT9sCsdnowfc7H+6rJ14H1dT+C7d6WGE9rLYbSV2N1GGqZO1YFjqThJnsjDJWrIq itlzrdAIxfyxWQ7803v+bSvqcPR84DSoUWkZIU1pO5wnf2A1jbpJFdL0iUhp5kXiwkJ+ 7r662O1YZs4RJ7dYoYCE23dCrzJVin9ZOwGQNgPcQhNphIkQ7P4FK1edyMnaIrxR1RJ2 3kJ2Fr99wrCrm4YqN/3x1lS8dSMRQ/VkGzSIoJsdYhWqtYcAfhIKHtQRR0532wduRY0A JZxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=SRvL7rF/Rfmc6R9yZEJosuOv8b4u5XP2R5pW1VlL/lw=; b=jtAQUYVddBjpuvjnH58Mi+vHiZUzHu+3gv89qsd7Fs1eQXtHr67y1XFm4eUXeK/KVh HD/JEmvyEvT/fPQVc+u0KYlcbF+aZ7HWEaicKZuwyklWQXM5YVdFT1+I8ob378AwUrhH DxYxmqFUo7JiHP4UFUH/MCD6U3WzMFk7Ua/femS+VsdOKMrFXNLgI9CbnrTTn0IN9L12 b2ZC3GeXuvGjJOXqQSshvKyTLVEj5IvNB2KbZ72BmbiKA7Hj7mu9N7ZdRU3F2tJ49bko i0CGFDlwrMmVjJH2y7TkHEBmdMJj2eCjQKljE1O4aeQRfNQs+oVvgmCXrAD8I4Dd2StC VQYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PyNUDJ1b; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t14-20020a17090a5d8e00b001f033ddbb4dsi14779259pji.65.2022.07.26.06.13.14; Tue, 26 Jul 2022 06:13:39 -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=pass header.i=@linaro.org header.s=google header.b=PyNUDJ1b; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233789AbiGZNLc (ORCPT + 99 others); Tue, 26 Jul 2022 09:11:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233741AbiGZNLb (ORCPT ); Tue, 26 Jul 2022 09:11:31 -0400 Received: from mail-oa1-x34.google.com (mail-oa1-x34.google.com [IPv6:2001:4860:4864:20::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C991B275CD for ; Tue, 26 Jul 2022 06:11:27 -0700 (PDT) Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-10d6ddda695so18580475fac.0 for ; Tue, 26 Jul 2022 06:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=SRvL7rF/Rfmc6R9yZEJosuOv8b4u5XP2R5pW1VlL/lw=; b=PyNUDJ1b1q1/exHgptczU43Ez9Dv1tZXmavWMtesOfzh9Ro6+RERg9YNhDzdcXESva C7MMGmL63brG0mfYqXlLjqvgOjd60UQ2qbLYu/cmc0yRFvaOYZRPmXU619gmWi4/DeUZ 9RvYqQpLvHCucgmTfNfZSsr6V9jnqb2W1E35LHWdxNRHtsEzdEkg3nzH9OKna1EnEn53 yJ3ixBW9JhZKrxREnIDFobtDt7tZldMxvW7RPOe7fbwLYydYKt8BY/GvtCubZGBOYH/5 2mCEF683Jhuw+6qz07EtLgdEH/hUJl0YBgK5ziSaijCVSZIni8y/oMYJkUg9sMdgif8A yung== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=SRvL7rF/Rfmc6R9yZEJosuOv8b4u5XP2R5pW1VlL/lw=; b=O5KM2pmAaZ6AwvB04EEsAcCOOMPTa586I1jZ1xRKj0nxKb8J8RahI4sMMgqaGppHf/ p6agICqx3bsMWlbR90HuGuOLS1YCywgJrCOV2P5MzmpTW7jM4PitjX728Roh+VoC6Mc2 0Mgg7U7jNW+PXn42ZzZrp8LP4UQB4gSexAkdkEwg8Iv+bPRomP98X3k1D7xnyibnYzJ5 7JRrePab6UdnrLZttxe8BXd/w5aAhX8QVVL+tudjS7Wime1dDmm4kMHAR/Jr2bbjH2YY 4ZPVAs88Fhdu36hcujrH0UcSFC0/3/B3WjM4l5CZTymqi8D8wNWFQSSZVmrGb/oR4CvN 6iIg== X-Gm-Message-State: AJIora9DnXsna9I1SikuVzOhOtfq+56QVPhvym1ii5BYTQFnxEOVEv27 w/deZI+7oHn7COzBOdsvTGN7nNVJXe1GTw== X-Received: by 2002:a05:6870:899e:b0:101:be11:a071 with SMTP id f30-20020a056870899e00b00101be11a071mr8567918oaq.168.1658841087058; Tue, 26 Jul 2022 06:11:27 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:8ded:8925:49f1:c550:ee7d? ([2804:431:c7cb:8ded:8925:49f1:c550:ee7d]) by smtp.gmail.com with ESMTPSA id g5-20020a9d6c45000000b0061c862ac067sm6116518otq.62.2022.07.26.06.11.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Jul 2022 06:11:26 -0700 (PDT) Message-ID: <78977ba5-3814-1b5d-c58f-eec58ace3c44@linaro.org> Date: Tue, 26 Jul 2022 10:11:24 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0.3 Subject: Re: [PATCH v2] arc4random: simplify design for better safety Content-Language: en-US To: "Jason A. Donenfeld" Cc: libc-alpha@sourceware.org, Florian Weimer , =?UTF-8?Q?Cristian_Rodr=c3=adguez?= , Paul Eggert , linux-crypto@vger.kernel.org References: <20220725225728.824128-1-Jason@zx2c4.com> <20220725232810.843433-1-Jason@zx2c4.com> <9c576e6b-77c9-88c5-50a3-a43665ea5e93@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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 On 26/07/22 09:47, Jason A. Donenfeld wrote: > Hi Adhemerval, > > On Tue, Jul 26, 2022 at 09:34:57AM -0300, Adhemerval Zanella Netto wrote: >> kernel newer than 3.17) it means some syscall filtering, and I am not sure >> we should need to actually handle it. > > One thing to keep in mind is that people who use CUSE-based /dev/urandom > implementations might not like this, as it means they'd also have to > intercept getrandom() rather than just ENOSYS'ing it. But maybe that's > fine. I don't know of anyone actually doing this in the real world at > the moment. > I think it is a fair assumption that if you trying to implement your own character device in userland, we should know the implications for the environment. From glibc standpoint, and I would for this whole thread, we should assume that getrandom is de-facto API for entropy.