Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2817425rda; Wed, 25 Oct 2023 13:13:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IERg1bGtTtvuyJCik3837c4AaUjYVQpSzzQLYLahJ7w154m9aE6gTPBDmbALUGqbfC7NPuh X-Received: by 2002:a25:910c:0:b0:d78:3b67:ef3 with SMTP id v12-20020a25910c000000b00d783b670ef3mr1108144ybl.12.1698264790305; Wed, 25 Oct 2023 13:13:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698264790; cv=none; d=google.com; s=arc-20160816; b=D18IcxFGEK8RXwk4GUrjoVqgKO8zRSgcSuYMj/e/t45H1IL8DGKZaDH3FlYfHZd+wT xu49/3AvJQAZXGHaJiCZ+ZCx8O4FOzj1a4V0AOBR/3sGbAGOip1DmWnYRRYLexQfmhZM pJb7Uk4rmNhWGr7Z7FSN+oyr0ut/6xzWDlhVCX/500LWsYwqKOIv0gm89S59byQQqnEe sjIVCBqvo0lPgxcG2IK2i0mazT9Xlj6RC1Hx9oDEfHNwQHwt+fmrmmHGrh393S8tbVKo WZmp83cNNbiwWMU6/dyzHTWEqpaFmJFJ82bmbPQ7Yf2gVVakewotyexSoo8fql3O0CsB ++Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=KeIOhvecg9pEnsrohIEgm5SQ6rPi0nFQhPnuomZ3bmQ=; fh=0eTloWZcVcBfzMScGVIuwGLrbwn3/PN2BqLmw+O0y6E=; b=xmKAIz7bHOeBJ5bsw12LK6sZP0ZSwVdwNPpp3zlx7bwrqg6kCeysgRhCSdHCP+muka 0XFxyCEg7/VPs7jiGbBRt1yz8yS9DCjcE8eAX/GwbAecW857O9YgGJQPmM1ZUAWlW6Iz tkRDIVyQJSHUE8OHvcKc560RAHbQjt269MTPH7B/N2mfo17xUZexqOPC7fEkztE3y64K gswRJ5bdc7mSnwsscdsTvYcnIViLCKAR9kKT1yIUud2uXMaMOnZQNIRV3ramDTJQ98uC iF0O0jRW4jyfNtQQV9IM1A+sq1UNqdyFhVp5KbPeaPDRBrFOuLXO8F98G5XqgDmPbPZ+ wr0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id g14-20020a25b10e000000b00da07267941fsi3490530ybj.253.2023.10.25.13.13.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 13:13:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 270D88029C7A; Wed, 25 Oct 2023 13:13:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230210AbjJYUNG convert rfc822-to-8bit (ORCPT + 99 others); Wed, 25 Oct 2023 16:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjJYUNF (ORCPT ); Wed, 25 Oct 2023 16:13:05 -0400 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB395192 for ; Wed, 25 Oct 2023 13:13:02 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id AFB80622F589; Wed, 25 Oct 2023 22:13:01 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id iN3NeRnDa_0H; Wed, 25 Oct 2023 22:13:01 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 4A2D8622F58A; Wed, 25 Oct 2023 22:13:01 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id vmC9xltJM6QH; Wed, 25 Oct 2023 22:13:01 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 23623622F589; Wed, 25 Oct 2023 22:13:01 +0200 (CEST) Date: Wed, 25 Oct 2023 22:13:00 +0200 (CEST) From: Richard Weinberger To: Petr Vorel Cc: linux-nfs , Steve Dickson Message-ID: <857096093.3016.1698264780882.JavaMail.zimbra@nod.at> In-Reply-To: <20231025194701.456031-1-pvorel@suse.cz> References: <20231025194701.456031-1-pvorel@suse.cz> Subject: Re: [PATCH 0/3] Add getrandom() fallback, cleanup headers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: Add getrandom() fallback, cleanup headers Thread-Index: Bpx3skmGDG7VX5pK6h7r55kvR0ekAA== X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 25 Oct 2023 13:13:06 -0700 (PDT) ----- Ursprüngliche Mail ----- > Von: "Petr Vorel" > I also wonder why getrandom() syscall does not called with GRND_NONBLOCK > flag. Is it ok/needed to block? With GRND_NONBLOCK it would return EAGAIN if not enough randomness is ready. How to handle this then? Aborting the start of the daemon? Before we other think the whole thing, the sole purpose of the getrandom() call is seeding libc's PRNG with srand() to give every waiter a different amount of sleep time upon concurrent database access. See wait_for_dbaccess() and handling of SQLITE_LOCKED. I'm pretty sure instead of seeding from getrandom() we can also use the current time or read a few bytes from /dev/urandom. Just make sure that every user of sqlite_plug_init() has a different seed. Thanks, //richard