Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3097033imw; Mon, 18 Jul 2022 01:58:06 -0700 (PDT) X-Google-Smtp-Source: AGRyM1urGEeWB/4sAcAvMHbMW1/vZpuK18VEq5ES3JhX3qQsAZ3F7qeFB+YWlQf6IMx6mr/oiMIV X-Received: by 2002:a17:907:7fa9:b0:72f:36fd:ef89 with SMTP id qk41-20020a1709077fa900b0072f36fdef89mr2588934ejc.433.1658134686413; Mon, 18 Jul 2022 01:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658134686; cv=none; d=google.com; s=arc-20160816; b=al4Qh+5WGwIeyck9YxnxMxRjEIeZwu0A8Yf5MEkj2lo11cE+r5E6Srt4ohCm6Q8QyE 1CQxSnaz6668whBXEk/kUBNh+ZzvoZ23k/9AndudjE+pV8QJZKk1SbDMZ1RgFHzu6ooT E+8ZtMg6dUhaaDd0fr5KWY1MEiehb6Lp9ZbRgyk4TN+qXNH2ipllXru9LygB02MXucgg v1uoMIrNV/yrpvotWzMSKrgoiDTNF2E2BbjWYUK4ImeawNeSDfmZ6KG7cOj6vy6YDiNh apmeehC3yjkdY758sTfUxWG4fgLBEYvlsbEqHtayvKR6aYMi9MSkbrgMT+0zQWhtqbMM N5cg== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id; bh=82eQdL4eOlRk9xvM+1VHJilsSVZrSITCzUHwxea3mUw=; b=DKxBtBKzI4PK3zlmESKhZ+3BAHxeNEvYxSouzaiDKCmy+NlwUjUXT7boXdoZtx/+C5 fBv0GvA+fJrIC/WHflHdTK0z73SjcvsAyRS6om77UnCKYUpVNkYEo9raMVnDpfBgOFuj MnqojEt30TBnCSLdEXMwwomu92B3ZpwCS6lTBdVu2V1OnxvsNNua8wA80Et6FkxT19HH PaZXqeW9imFvHzMyXs4pJtLMF4YzJdQXyYIHp8ThiGOZc66Zw9I2j9U6f9Z6dH8ELMp+ NrhaCcgCvc08euXlzgjOE1ed+Y6b6rkFV7LEhUv50P3sqgvkViBFuyzEfP+CKVr8wYxZ tX1A== ARC-Authentication-Results: i=1; mx.google.com; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bo14-20020a0564020b2e00b00435abcf8f71si12093372edb.142.2022.07.18.01.57.30; Mon, 18 Jul 2022 01:58:06 -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; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230009AbiGRIxO (ORCPT + 99 others); Mon, 18 Jul 2022 04:53:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbiGRIxO (ORCPT ); Mon, 18 Jul 2022 04:53:14 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D83F6323 for ; Mon, 18 Jul 2022 01:53:12 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LmbJj3VZYzjWvh; Mon, 18 Jul 2022 16:50:29 +0800 (CST) Received: from [10.67.110.173] (10.67.110.173) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 18 Jul 2022 16:53:10 +0800 Message-ID: Date: Mon, 18 Jul 2022 16:52:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: Inquiry about the removal of flag O_NONBLOCK on /dev/random Content-Language: en-US From: "Guozihua (Scott)" To: CC: , References: <13e1fa9d-4df8-1a99-ca22-d9d655f2d023@huawei.com> In-Reply-To: <13e1fa9d-4df8-1a99-ca22-d9d655f2d023@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.110.173] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500024.china.huawei.com (7.185.36.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 2022/7/14 15:33, Guozihua (Scott) wrote: > Hi Community, > > Recently we noticed the removal of flag O_NONBLOCK on /dev/random by > commit 30c08efec888 ("random: make /dev/random be almost like > /dev/urandom"), it seems that some of the open_source packages e.g. > random_get_fd() of util-linux and __getrandom() of glibc. The man page > for random() is not updated either. Correction: I mean various open source packages are still using O_NONBLOCK flag while accessing /dev/random > > Would anyone please kindly provide some background knowledge of this > flag and it's removal? Thanks! > -- Best GUO Zihua