Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2462850rwb; Wed, 30 Nov 2022 06:59:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf6dBO2c+kDuoNIos/XKJ0Zf8wAQ4K0srAMlmFjs0imiAXsyZaWevBlovZ/wgB/Jig6NujBF X-Received: by 2002:aa7:db91:0:b0:458:bd09:1b20 with SMTP id u17-20020aa7db91000000b00458bd091b20mr56982037edt.176.1669820395499; Wed, 30 Nov 2022 06:59:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669820395; cv=none; d=google.com; s=arc-20160816; b=dXLUg9Dao9kEZqcAkxFqCJb58RSrY8HLFLXCh+ezamUsZioJIFUJKTcZl8yELqEFQF RqxjLJS3sIY+lO3E7UfP0O6DFpS/7FRf/6KeLsqMIxrKJ63eKyyuV7YmSpzICIdlC5Du ZV5t3zClhFhr1g/y0bVvhdCDUmpSVvfSQd6QNHvLEULzYQgHBaLuX913VZVzk/F5rk62 2Nl4hkfCpqGyidHco+OtfyDJ6ROrmwv9DysGARXgY2MHgvF6Of8rQxZJkjgyWmCvb4eE RyOZ0r/V8Du78FEXmIgyAcrSR1lITqvIx7SHh+9+I9pkKIT8bkng3cBi15hFqTWzLlWl 5xBQ== 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=I0ES5jk4GEQeOlHUC9yT1zBbx4b4UMHigHQ+Fl9nJ/4=; b=CkPxC/zLrt99HZVUnBxuC3zlGDjzr8G84u+4h+xBisaJ6Cr+dZuJur6SNzwSkkiCnD t0vvHUtVftPYdLFawqKjfDj2eSW9lMKqvonzs0DotNxGlD7vulOQ//FJidnWtwBN+Sva RTVAY8GpNC1krR7/HK0zk9wSD+Wo013uPjt5gD85lbOfIJP/dpszpoOs281RVwA/r07g /HAdzIM7P2skDcvpDUkJTSGhbduRyRnVB7nYK2G/NmbL/DTlHAodOC5nIIKheiGkM6Cd g811Mx6J2UuPSPXz7OB3TLiYMJm9bZVc95ChSjzU5m78A20kRHmPNu+gWRF+z0iiSFQ8 33Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b="pMK/A5E6"; 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 nb35-20020a1709071ca300b007825bd02a6asi1577364ejc.54.2022.11.30.06.59.22; Wed, 30 Nov 2022 06:59:55 -0800 (PST) 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="pMK/A5E6"; 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 S229615AbiK3Oxa (ORCPT + 99 others); Wed, 30 Nov 2022 09:53:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbiK3Ox3 (ORCPT ); Wed, 30 Nov 2022 09:53:29 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FAC830F75; Wed, 30 Nov 2022 06:53:28 -0800 (PST) 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 CC572B81B41; Wed, 30 Nov 2022 14:53:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01E44C433D6; Wed, 30 Nov 2022 14:53:23 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="pMK/A5E6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1669820001; 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=I0ES5jk4GEQeOlHUC9yT1zBbx4b4UMHigHQ+Fl9nJ/4=; b=pMK/A5E6Lbyumh8idS2QVJbpD8XvaIuhI8pqx4ZGR8ta71bIZ04E9+/bu4Tr/zJflYz3oF XIwLpaPqMuiCiqm1Wa5oCl/hd167z6kGHeSuk0ZvKikvGUZdf+UdyTv6A0cZMJJf9B98zd Sl5+ALPxQoCy5XFP+i++BXrzOhEB0lM= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 8e91d6ae (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 30 Nov 2022 14:53:20 +0000 (UTC) Date: Wed, 30 Nov 2022 15:51:01 +0100 From: "Jason A. Donenfeld" To: Florian Weimer Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, tglx@linutronix.de, linux-crypto@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org, Greg Kroah-Hartman , Adhemerval Zanella Netto , Carlos O'Donell , Arnd Bergmann , Christian Brauner Subject: Re: [PATCH v10 3/4] random: introduce generic vDSO getrandom() implementation Message-ID: References: <20221129210639.42233-1-Jason@zx2c4.com> <20221129210639.42233-4-Jason@zx2c4.com> <878rjs7mcx.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <878rjs7mcx.fsf@oldenburg.str.redhat.com> 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 Florian, On Wed, Nov 30, 2022 at 11:44:30AM +0100, Florian Weimer wrote: > * Jason A. Donenfeld: > > > diff --git a/include/vdso/datapage.h b/include/vdso/datapage.h > > index 73eb622e7663..9ae4d76b36c7 100644 > > --- a/include/vdso/datapage.h > > +++ b/include/vdso/datapage.h > > @@ -109,6 +109,16 @@ struct vdso_data { > > struct arch_vdso_data arch_data; > > }; > > > > +/** > > + * struct vdso_rng_data - vdso RNG state information > > + * @generation: a counter representing the number of RNG reseeds > > + * @is_ready: whether the RNG is initialized > > + */ > > +struct vdso_rng_data { > > + unsigned long generation; > > + bool is_ready; > > +}; > > + > > I don't think you can use a type like long here. The header says this: > > * vdso_data will be accessed by 64 bit and compat code at the same time > * so we should be careful before modifying this structure. > > So the ABI must be same for 32-bit and 64-bit mode, and long isn't. Excellent point. The size of the type needs to be explicit. Will fix. Jason