Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp626970imn; Tue, 26 Jul 2022 05:25:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1snVZ/2gY8V7yTG3jzkGF2P97EdUqZUW0KJXDGeDKDHPA0doB0MYfPqgZ+3aW0PCdEg03bV X-Received: by 2002:a17:906:d54b:b0:72e:ece1:2956 with SMTP id cr11-20020a170906d54b00b0072eece12956mr14046913ejc.156.1658838308647; Tue, 26 Jul 2022 05:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658838308; cv=none; d=google.com; s=arc-20160816; b=vDyssAru3DxG9PeRzv8kqRi6Z0ml8gEcwRLP9fdDHwiHA1t8mkyMX/OWmqSRcDfK/+ v/OPtM/OEt7/7AXvukr68wHY/COHTluYiSweWi8AAsu1fbFqNccH8oss8q/tCWhACSit VZTy5OSWOrWac7VisfnTQIeu0POV68Mq22Qx+mJMf7V6UcfV2OJ/gJBCgBTsnA2iqFx1 yM6lyaACOGFroRWymt/evKijZFRdl7rp0vt1/aNBItIePO+ZSLN6VzOG/iF1DWDzg/Ei HnksXADaz34inVBNatlZY/rlySi4YNa3okp1wFypMTZN/h0wO1sOlnyibAE4/kk4HwNu vWNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=blNfI594UxSlxvAxiYvdsJihan3p1zYkKcGwtk+en5U=; b=rxX5dF1iokuc+Tl1nQQ9ZxcUEwTI0Wa45kkFeECu/rsyu51KydR0cb/2xrBPxdQziL AQ23Zlk3/FdReMeGQfH3ZaF2bEd3ktreEH6MPXEw86YV/lVVgWs5iC624qqG1OyQq/qw j69N2OZwtcz93rgCEIJb8UiEnjurShdbE3ckz29c+odUscVF/2pj7qEsxaykmKqqlTYy 45UZ0B+/AaIWOlQewz4op6kB7YlfrHh7BIkFmNFWmr+mBWaII5T+KfST2dphHAzrB4KH TBmqF8ofduhiVnARLhcYVCgrV4iARow3YG+Lu8FerBwYRdOaxWVK39lNRWJ720qf4051 ynxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=QJ7YXSrQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ig2-20020a1709072e0200b00726f9797b01si13526044ejc.377.2022.07.26.05.24.27; Tue, 26 Jul 2022 05:25:08 -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=@zx2c4.com header.s=20210105 header.b=QJ7YXSrQ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232268AbiGZMI7 (ORCPT + 99 others); Tue, 26 Jul 2022 08:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238492AbiGZMI6 (ORCPT ); Tue, 26 Jul 2022 08:08:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 845662B638 for ; Tue, 26 Jul 2022 05:08:55 -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 194D4B8128D for ; Tue, 26 Jul 2022 12:08:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F81EC341C0; Tue, 26 Jul 2022 12:08:51 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="QJ7YXSrQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1658837330; 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: in-reply-to:in-reply-to:references:references; bh=blNfI594UxSlxvAxiYvdsJihan3p1zYkKcGwtk+en5U=; b=QJ7YXSrQgROElrxosVkugA1yXXsMOGwkqKxoaUdZfALECs5IJ6EAsN14ge/f3IZAFwbbem kd9u94KZzyVzUkzSmjExsGJAxuOtTdjTXLlXb3ZhVkl2P+7/3675gqy3OAD0SDaz4fUt4w bXZ9LCSTXlA/17qWetq89jHXox1HQB0= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 3ad2ae25 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 26 Jul 2022 12:08:50 +0000 (UTC) Date: Tue, 26 Jul 2022 14:08:48 +0200 From: "Jason A. Donenfeld" To: Adhemerval Zanella Netto Cc: libc-alpha@sourceware.org, Florian Weimer , Cristian =?utf-8?Q?Rodr=C3=ADguez?= , Paul Eggert , linux-crypto@vger.kernel.org Subject: Re: [PATCH v2] arc4random: simplify design for better safety Message-ID: References: <20220725225728.824128-1-Jason@zx2c4.com> <20220725232810.843433-1-Jason@zx2c4.com> <9c576e6b-77c9-88c5-50a3-a43665ea5e93@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 Hey again, On Tue, Jul 26, 2022 at 01:54:23PM +0200, Jason A. Donenfeld wrote: > > As Florian said we will need a non cancellable poll here. Since you are setting > > the timeout as undefined, I think it would be simple to just add a non cancellable > > wrapper as: > > > > int __ppoll_noncancel_notimeout (struct pollfd *fds, nfds_t nfds) > > { > > #ifndef __NR_ppoll_time64 > > # define __NR_ppoll_time64 __NR_ppoll > > #endif > > return INLINE_SYSCALL_CALL (__NR_ppoll_time64, fds, nfds, NULL, NULL, 0); > > } > > > > So we don't need to handle the timeout for 64-bit time_t wrappers. > > Oh that sounds like a good solution to the time64 situation. I'll do > that for v4... BUT, I already implemented possibly the wrong solution > for v3. Could you take a look at what I did there and confirm that it's > wrong? If so, then I'll do exactly what you suggested here. Actually, forget my v3. What you're suggesting is also better because it's ppoll, not poll, as poll isn't on all platforms. So I'll do things exactly as you've described for v4. Jason