Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp101519rwn; Wed, 7 Sep 2022 21:06:30 -0700 (PDT) X-Google-Smtp-Source: AA6agR4w/X6ms5zrFFaO9D3e8e+jtrobvO6ZUsIH2X9G0nOgaqEicxCG+eKnKaCgD7Q8yaiWl97e X-Received: by 2002:a17:902:e94f:b0:16d:847b:3343 with SMTP id b15-20020a170902e94f00b0016d847b3343mr6941628pll.103.1662609990722; Wed, 07 Sep 2022 21:06:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662609990; cv=none; d=google.com; s=arc-20160816; b=iYpus3pnqKLzpcLOTUaU3HdAlLGAk1MOmwbh6bzMXL1jWPfzoYgozEI+thvULTamg1 9YoUbRSdy8CS1h1RjfWZUZ1gOR649yWH10FpYeLj1JaQ9ivjiu6UV/3dhgO7+g5cRIt6 S6kOx/dqfePhsQg5Rj4nAq9egO+TTWIMXh/A+f4hASik7zKMH8Fh8ffcPvLbR4Uj51BR p1C9gPuvhPG8xKBP+4lVyO3bsDzJnaZb9KMXoIwvnl+dF37gk0kbvx/fYxnZJUmp8/Ux ARS0ju8+8WT09OsWQ5UmnWZJ8vTZZR1TSI1M9+uZmSbESx9IBzXC7nPhIus2DYz8Vzaz 8HEg== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ydHnDfJF1CwkwL8hT7Jru2SULZIDG0ItRA8lQpRUSt8=; b=lA9kCsWRivNJ536DoHf3RLtBG3bX6/IEX06o5MIx4OdrRuPwVuvatSyiEVUzxDIRuC cpK42YjZRQ48BjuKBJ6zUmP97A9EpUt/6NE4ZkwqHLgVGXbKTxcTj0MJFsEMvZATfdCx Zr7NXSbVq70Yl2A08sSYpJIareQsoaZVQ+npS9FKQX1twTCcsr9185mlB2qIDIL2gFjs rWIvuI2jZ4v7GaKr9Tl6vQC7ollQx5ysXphTkl+nAF2n2HrQElqucHCpu3BfBR/iENSH klb+vot/WDoMnAMOmU2qYllcBi0/+7Iu0SVgY/ge1/wUf6CJmn3I/Zl09uDtFYHishsZ nuig== 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 k4-20020a63ff04000000b0042b6e87d121si7826958pgi.345.2022.09.07.21.06.06; Wed, 07 Sep 2022 21:06:30 -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 S229551AbiIHDbf (ORCPT + 99 others); Wed, 7 Sep 2022 23:31:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbiIHDbf (ORCPT ); Wed, 7 Sep 2022 23:31:35 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3171EC7433 for ; Wed, 7 Sep 2022 20:31:33 -0700 (PDT) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MNPkR66QpzHnfS; Thu, 8 Sep 2022 11:29:35 +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; Thu, 8 Sep 2022 11:31:31 +0800 Message-ID: Date: Thu, 8 Sep 2022 11:31:31 +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 To: "Jason A. Donenfeld" CC: Eric Biggers , Linux Crypto Mailing List , Andrew Lutomirski , Theodore Ts'o , zhongguohua References: <29c4a3ec-f23f-f17f-da49-7d79ad88e284@huawei.com> <4a794339-7aaa-8951-8d24-9bc8a79fa9f3@huawei.com> <761e849c-3b9d-418e-eb68-664f09b3c661@huawei.com> From: "Guozihua (Scott)" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.110.173] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500024.china.huawei.com (7.185.36.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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/9/7 21:03, Jason A. Donenfeld wrote: > On Tue, Sep 06, 2022 at 12:16:56PM +0200, Jason A. Donenfeld wrote: >> On Thu, Jul 28, 2022 at 10:25 AM Guozihua (Scott) wrote: >>> >>> On 2022/7/26 19:33, Guozihua (Scott) wrote: >>>> On 2022/7/26 19:08, Jason A. Donenfeld wrote: >>>>> Hi, >>>>> >>>>> On Tue, Jul 26, 2022 at 03:43:31PM +0800, Guozihua (Scott) wrote: >>>>>> Thanks for all the comments on this inquiry. Does the community has any >>>>>> channel to publishes changes like these? And will the man pages get >>>>>> updated? If so, are there any time frame? >>>>> >>>>> I was under the impression you were ultimately okay with the status quo. >>>>> Have I misunderstood you? >>>>> >>>>> Thanks, >>>>> Jason >>>>> . >>>> >>>> Hi Jason. >>>> >>>> To clarify, I does not have any issue with this change. I asked here >>>> only because I would like some background knowledge on this flag, to >>>> ensure I am on the same page as the community regarding this flag and >>>> the change. And it seems that I understands it correctly. >>>> >>>> However I do think it's a good idea to update the document soon to avoid >>>> any misunderstanding in the future. >>>> >>> >>> Our colleague suggests that we should inform users clearly about the >>> change on the flag by returning -EINVAL when /dev/random gets this flag >>> during boot process. Otherwise programs might silently block for a long >>> time, causing other issues. Do you think this is a good way to prevent >>> similar issues on this flag? >> >> I still don't really understand what you want. First you said this was >> a problem and we should reintroduce the old behavior. Then you said no >> big deal and the docs just needed to be updated. Now you're saying >> this is a problem and we should reintroduce the old behavior? >> >> I'm just a bit lost on where we were in the conversation. >> >> Also, could you let me know whether this is affecting real things for >> Huawei, or if this is just something you happened to notice but >> doesn't have any practical impact? > > Just following up on this again... > . Hi Jason, Thank you for the timely respond and your patient. And sorry for the confusion. First of all, what we think is that this change (removing O_NONBLOCK) is reasonable. However, this do cause issue during the test on one of our product which uses O_NONBLOCK flag the way I presented earlier in the Linux 4.4 era. Thus our colleague suggests that returning -EINVAL when this flag is received would be a good way to indicate this change. For example: -- Best GUO Zihua -- Best GUO Zihua