From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B129DC352A1 for ; Wed, 30 Nov 2022 10:45:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230260AbiK3Kpl (ORCPT ); Wed, 30 Nov 2022 05:45:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231190AbiK3Kpi (ORCPT ); Wed, 30 Nov 2022 05:45:38 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F0AE5E3DA for ; Wed, 30 Nov 2022 02:44:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669805083; 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=QpiS+lqB9/nD3c7h6a4WkksXWdpwbKquOlt3y6VqM1A=; b=dIaob4MGq02R5k0tcCPUleTfVYUdBEj/+D1P8+zz41m5KfDQB0eKH10KzY6M+y3ms82JzY E6EjD6MDKsr6u3NaZkEUk5xp67+v/4kltW6W2ofObyp+89nxKWHeKdYavMPbmo3gpEB4xb PLosjkPe9Lr+pYAZpgMiabVa22jP0OU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-253-0B0kZKdnMq6rQRzxcMBaLg-1; Wed, 30 Nov 2022 05:44:37 -0500 X-MC-Unique: 0B0kZKdnMq6rQRzxcMBaLg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 519DE3C0F227; Wed, 30 Nov 2022 10:44:36 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E5B642166B26; Wed, 30 Nov 2022 10:44:33 +0000 (UTC) From: Florian Weimer To: "Jason A. Donenfeld" 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 References: <20221129210639.42233-1-Jason@zx2c4.com> <20221129210639.42233-4-Jason@zx2c4.com> Date: Wed, 30 Nov 2022 11:44:30 +0100 In-Reply-To: <20221129210639.42233-4-Jason@zx2c4.com> (Jason A. Donenfeld's message of "Tue, 29 Nov 2022 22:06:38 +0100") Message-ID: <878rjs7mcx.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org * 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. Thanks, Florian