From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by sourceware.org (Postfix) with ESMTPS id 7A2BE3858C56 for ; Tue, 26 Jul 2022 19:24:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A2BE3858C56 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 8217DB80D7D; Tue, 26 Jul 2022 19:24:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F7C5C433C1; Tue, 26 Jul 2022 19:24:55 +0000 (UTC) Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id d920f036 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 26 Jul 2022 19:24:54 +0000 (UTC) Date: Tue, 26 Jul 2022 21:24:52 +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 19:24:59 -0000 On Tue, Jul 26, 2022 at 08:42:51PM +0200, Jason A. Donenfeld wrote: > 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... It's because LICENSE has a ^L in it, which I guess doesn't go over well with OpenSMPTD or rspamd or kernel.org's smtp server or some combination thereof... I just posted v5, by the way, in case it's in your spam folder. Jason