From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by sourceware.org (Postfix) with ESMTPS id 6EA273858D32 for ; Tue, 26 Jul 2022 18:42:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6EA273858D32 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 dfw.source.kernel.org (Postfix) with ESMTPS id E1B3561479; Tue, 26 Jul 2022 18:42:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5E7DC433D6; Tue, 26 Jul 2022 18:42:54 +0000 (UTC) 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=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2022 18:42:57 -0000 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