Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp689635lqh; Fri, 31 May 2024 13:19:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUn1rq84vAiSUU43axpPPL3tzCCjBjWqhVSrZvKMwDuXdKEcyFGXIaN+URM7n/5iN7wGY1muLpWI7gBpu5rCHdjli68ZtnotIhETNp6Zg== X-Google-Smtp-Source: AGHT+IH3XRXpjx01zZIxGdAz1ryJ0ZugUeFkNH73rGnnnW6Fe5bYZk03SyDAUGxO7VndjxUJvvqu X-Received: by 2002:a05:6a21:3392:b0:1af:ac8c:4366 with SMTP id adf61e73a8af0-1b26f2d54c4mr3999357637.30.1717186749328; Fri, 31 May 2024 13:19:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717186749; cv=pass; d=google.com; s=arc-20160816; b=BkkHYED78uMgYRzZT/kzRKsKHnfKcalGqjVABhC80eqLNVPhJvmB1hcEKpJBb0t3U5 q3qw1uSKMCpCiBhN+5GpQX8MQvuq0rBUiN6d2tebb6M2GA1hzHonzpLYqFLo3WB+z7Uy PqHuI9tu6sEfupteC+nV37yK+auTd5bQBPxNV35zy57DqQVlFg87682YTlNKoPLj0poy 9JBG/1PyoC1RZgDjnnFBl/6/VWCrUOQtTqRJXY5L51qT6LjJ7xDVZca9OguLxUFPI1ym qa3mPgQtK0ChMgNKVqN6KvLowPhQ2bIHMcPnhY+MAPW0sef46zQuLIGL4S3wZYOU6nVE Pa6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=WusGXCsAP8jLvsx8zCO8SWtowPYaOe3WkJ+UrPpN66k=; fh=dhbLWZ5YHgDiQsiBvVl0QIJQiGAlg+8xB6C7iWLPPTo=; b=Xz9J+BtBM83gUYHltDLlHDRGcZFeJO9S7+/o+lVtwRBZPX9rG+QaIE28xieBQeh54m gvLaaPRsRognGxIopK1MQ7K5nVUbv5jLy5vcKMBB8jmo3q3WMyAwskGD/Xo1nqhqUxU3 WcTRjka0+6eckKUEoFbDXSuAWHjkhnQEZXUN7JNvdfeP7pR2YnHNbUQBJ/QIIUhVPUj2 ezsh8nQWNZx6Iuy19ssLlyFvnLZ72gdVWM4tuJ+JjUjdDOIgyEeM/zrM5BlNvgqvt/Cv liUorOqTWwz8Of/2BEaiL6O/2O9ag79z8AVz2h1D73uxwYHUJFWtvGiIQX28gT75sv5Q xGCg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=NkubCPox; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-197338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197338-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35b40c4d9si2053242a12.531.2024.05.31.13.19.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 13:19:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=NkubCPox; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-197338-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197338-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4D608B25508 for ; Fri, 31 May 2024 19:12:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AA69017D890; Fri, 31 May 2024 19:12:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="NkubCPox" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9ECC317D36D; Fri, 31 May 2024 19:12:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717182747; cv=none; b=qM0PClENSTBdnbhKW3YMbCc0BaLRqg/38LrFuKad4M5RVLl04LJhuYtafaOHevlGUFNn1WNBTtRDjtkRELQhW1qFChX3uTtW+KDdubnxfCtpNpo9Giv/ZW8InuQGS9czvM8vyqoqb4tsvFihxsXHVV2ihZqQoH5KtN1b/NZVvbI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717182747; c=relaxed/simple; bh=sFsB5dqdy3gZRk50dI6z/h66URse+3gNEkhEkUqmsgQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=q+ZWo/nXtBaL6cgaRARYgkWcigNtkZmyjHjkCNu2vNW9tjv6QvZ7l4oaKDz37lbdrrzkgo4qMFa8zItf5xiPhsi4yWn4Q45QAqUlZFGkKOwab1how974YL4PLfH6EoymOW451kxSorB/dXvpzrII4BRs+CRi90ohPNDZ/TM7V/c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=NkubCPox; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=WusGXCsAP8jLvsx8zCO8SWtowPYaOe3WkJ+UrPpN66k=; b=NkubCPox2v0/24Di9p78k3teLJ rPt60VFZf5BlsFEh4KekHeGTRsJtoqjRbk7INTfkQLC6czg/eFvcKOFed1CqZ7k1Msx1SCVYAMU+A AnXj6yCqi4JJxBI40UiFH5jw1OV6djwOuBVce7ET6sSEo5igfyZqy2/SNZxyFYQcREfitSw0eAysk LH4e9UyiBz92JCFTBJih508iNv++M6PrzDdAPFd74DDttP9B7nf+r3LHk14pLm78EQ4owWOvuMvYu pIXxYtQvROat9d49Tzok7zPM48Ay8k46CgRWrvkNZMyXUWfmejUMFmZcva9PIlW4iWt/N2M94lyMw MHeoMTXA==; Received: from [50.53.4.147] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1sD7ft-0000000BD8i-1Abg; Fri, 31 May 2024 19:12:25 +0000 Message-ID: <173853ee-348d-4f76-bc50-c5727d76b3c9@infradead.org> Date: Fri, 31 May 2024 12:12:23 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v16 4/5] random: introduce generic vDSO getrandom() implementation To: "Jason A. Donenfeld" , linux-kernel@vger.kernel.org, patches@lists.linux.dev, tglx@linutronix.de Cc: linux-crypto@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org, Greg Kroah-Hartman , Adhemerval Zanella Netto , Carlos O'Donell , Florian Weimer , Arnd Bergmann , Jann Horn , Christian Brauner , David Hildenbrand References: <20240528122352.2485958-1-Jason@zx2c4.com> <20240528122352.2485958-5-Jason@zx2c4.com> Content-Language: en-US From: Randy Dunlap In-Reply-To: <20240528122352.2485958-5-Jason@zx2c4.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 5/28/24 5:19 AM, Jason A. Donenfeld wrote: > +/** > + * type vdso_kernel_ulong - unsigned long type that matches kernel's unsigned long s/type/typedef/ (for first "type" only) > + * > + * Data shared between userspace and the kernel must operate the same way in both 64-bit code and in > + * 32-bit compat code, over the same potentially 64-bit kernel. This type represents the size of an > + * unsigned long as used by kernel code. This isn't necessarily the same as an unsigned long as used > + * by userspace, however. > + * > + * +-------------------+-------------------+------------------+-------------------+ > + * | 32-bit userspace | 32-bit userspace | 64-bit userspace | 64-bit userspace | > + * | unsigned long | vdso_kernel_ulong | unsigned long | vdso_kernel_ulong | > + * +---------------+-------------------+-------------------+------------------+-------------------+ > + * | 32-bit kernel | ✓ same size | ✓ same size | > + * | unsigned long | | | > + * +---------------+-------------------+-------------------+------------------+-------------------+ > + * | 64-bit kernel | ✘ different size! | ✓ same size | ✓ same size | ✓ same size | > + * | unsigned long | | | | | > + * +---------------+-------------------+-------------------+------------------+-------------------+ > + */ > +#ifdef CONFIG_64BIT > +typedef u64 vdso_kernel_ulong; > +#else > +typedef u32 vdso_kernel_ulong; > +#endif -- #Randy https://people.kernel.org/tglx/notes-about-netiquette https://subspace.kernel.org/etiquette.html