Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp879638imn; Tue, 26 Jul 2022 11:53:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tkjy/DOfZ+ljR3HhTzayX4aGfvf2Hyyb+FT88sDlYhrDHhwHe5asCjDujkHIohIY0xvIK3 X-Received: by 2002:a05:6402:5299:b0:435:61da:9bb9 with SMTP id en25-20020a056402529900b0043561da9bb9mr19970415edb.21.1658861582237; Tue, 26 Jul 2022 11:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658861582; cv=none; d=google.com; s=arc-20160816; b=X03NF7oqyqtAZn5BpPm2ymRM2kH+fSX3E6OQZnYzNBebTtAKgcItsLp9hCtopuOoGD BZruCKWEPO3IbkR8UwhPV4FRexLckbynrAHB1s9mMng/tdi21/Sh92oIgTypXU18Q0sQ zekR7wfi3qEa2rsXMIJpFJd7FGMETbPAndgG/97JL0cAGYqN4MzGpDeReV/Smb0WW2Yy WgHCgLckBDCT6FOeIEnj5DnsXCpv7zdfB9274b1ur24sgT6WmV8ptsR4qmtqC8ep1V5S gWjfyjPg+ftucofWDdp/ugBntyt+4g+C37/BvO1AS+d6aCmrdKvtu8Rf0FSK4ky1OrMU v63Q== 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=QjNGaVyW+WZioi5dMlm7fD9E+/yt0ObUAyCW9EClMvY=; b=nILjXxBL6h99SXZyouAKYpQAKvhDND0YA0H/mvgwteeF6KBi3AdfVlvVzJleEqDpTR WPcTDWuhOFiLbQGLLinmXHEn20acPN8ErowOEY24mCtSl4Q8h2KH95m0/fO94qW2wW9o dxUi1rkY8XG9G4a3nBvVNk0HhNDyOXX1Pq9MC4Fyqo0Ld+F/uFS9eU4jUl9Xj+h5+A64 zybacfHEqHz+K1Fo9qMFjtdJ4RH5IjMx2O/lkP5HXlRzPQzFLp95O315hCLlgART3/Fy /NPb61GzdQSdYYWv194D8x0QwkftdfZrleUXgSc8R3xxMvxiWdf/k93+av0tyxBFquFk smmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b="nVStWzR/"; 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 d19-20020a170906041300b0072b8cd4ca77si9879261eja.274.2022.07.26.11.52.35; Tue, 26 Jul 2022 11:53:02 -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="nVStWzR/"; 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 S231309AbiGZSm7 (ORCPT + 99 others); Tue, 26 Jul 2022 14:42:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230515AbiGZSm6 (ORCPT ); Tue, 26 Jul 2022 14:42:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8BB42E9D0 for ; Tue, 26 Jul 2022 11:42:57 -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 98782B8113E for ; Tue, 26 Jul 2022 18:42:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5E7DC433D6; Tue, 26 Jul 2022 18:42:54 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="nVStWzR/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1658860973; 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=QjNGaVyW+WZioi5dMlm7fD9E+/yt0ObUAyCW9EClMvY=; b=nVStWzR/szdBM3zLyEvZaceI5u8p6S9/kpHAAxjqcrElgD/GqrjxViIqE6V/EOmxip/R8n 2CsuflPP3CpGmAjWQf0rDfNxvsuexo10E49qyPL0Jo2zXzmQZ5y82JFeYlwaWw7rDvn+et dPwCyVOZdiLqRvrQ7tqZessijcg6xeg= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 92f27bfa (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 26 Jul 2022 18:42:53 +0000 (UTC) Date: Tue, 26 Jul 2022 20:42:51 +0200 From: "Jason A. Donenfeld" To: Mark Harris Cc: libc-alpha@sourceware.org, Florian Weimer , 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> 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 Hi Mark, On Tue, Jul 26, 2022 at 09:51:03AM -0700, Mark Harris wrote: > > Thanks. It looks like INTERNAL_SYSCALL_CALL just returns the errno as-is > > as a return value, right? I'll adjust the code to account for that. > > Yes INTERNAL_SYSCALL_CALL just returns the negated errno value that it > gets from the Linux kernel, but only on Linux does > __getrandom_nocancel use that. The Hurd and generic implementations > set errno on error. Previously the only call to this function did not > care about the specific error value so it didn't matter. Since you > are now using the error value in generic code, __getrandom_nocancel > should be changed on Linux to set errno like most other _nocancel > calls, and then it should go back to checking errno here. > > And as Adhemerval mentioned, you only added a Linux implementation of > __ppoll_infinity_nocancel, but are calling it from generic code. Okay, I'll switch this to use INLINE_SYSCALL_CALL, so that it sets errno, and then will use the normal TEMP_FAILURE_RETRY macro for EINTR. > Also, by the way your patches cc'd directly to me get quarantined > because DKIM signature verification failed. The non-patch messages > pass DKIM and are fine. That sure is odd. The emails are all going through the MTA. rspamd bug? OpenSMTPD bug? Hmm... Jason