From patchwork Tue Sep 3 15:14:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincenzo Frascino X-Patchwork-Id: 13788872 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA540CD343E for ; Tue, 3 Sep 2024 15:15:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 505238D0192; Tue, 3 Sep 2024 11:15:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4B5958D016E; Tue, 3 Sep 2024 11:15:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 37E1A8D0192; Tue, 3 Sep 2024 11:15:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 170298D016E for ; Tue, 3 Sep 2024 11:15:07 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id B28E240574 for ; Tue, 3 Sep 2024 15:15:06 +0000 (UTC) X-FDA: 82523775012.05.313CB50 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf19.hostedemail.com (Postfix) with ESMTP id 2D07E1A000C for ; Tue, 3 Sep 2024 15:15:04 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of vincenzo.frascino@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=vincenzo.frascino@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725376457; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Gtd+KYbpRVq6Ifgb/TXYZWiFXelpqv+zL1XxSb/VLSQ=; b=s1q++lYB7/UO2EaPxOVNqZAWbjd+GR65tj8fqOujiAG61pmBCmZxh2zDA+I0lVDnmTaTVa phpRDrroSPmx8JNe0KZfrlWyaR0ZvAPyJh0iWJuM1ZgnSp49VdXbhVvXcX/VMYyVLVZVGZ izSA4CbvmhoDQvxTa5sEv01YdcyhvNE= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=none; spf=pass (imf19.hostedemail.com: domain of vincenzo.frascino@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=vincenzo.frascino@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725376457; a=rsa-sha256; cv=none; b=CCpyfYar2h7kakSmSxXx8k68aYLOtGWcll9yMaz6qTmt/8/EusH6SxraEwTZYArhNANoDm tYrYwW6JNAuRAH+cIp4FN3cmaoFCA3JL9wlhF3TO7E+uKr9wJpBUfgFCAnpm3SRnamc/+9 tuTZXS5AKROu5UUPFZzPkbBbS+CkyIM= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 805B91474; Tue, 3 Sep 2024 08:15:30 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2218F3F66E; Tue, 3 Sep 2024 08:15:01 -0700 (PDT) From: Vincenzo Frascino To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Vincenzo Frascino , Andy Lutomirski , Thomas Gleixner , "Jason A . Donenfeld" , Christophe Leroy , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Theodore Ts'o , Arnd Bergmann , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers Subject: [PATCH 3/9] x86: vdso: Introduce asm/vdso/page.h Date: Tue, 3 Sep 2024 16:14:31 +0100 Message-Id: <20240903151437.1002990-4-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240903151437.1002990-1-vincenzo.frascino@arm.com> References: <20240903151437.1002990-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 2D07E1A000C X-Stat-Signature: 84awoad5cj135b3phfkfgbrybrnbj4a7 X-HE-Tag: 1725376504-112621 X-HE-Meta: U2FsdGVkX18JST39YiGIXB7rYzfF/0fPQc5+PJfPzrBEnj+n8TUfRAP3UwGqEBu+8hAe4ICORylhbiPIj4zNtDAMVl4CHrbte93VSb5foMCF3UsxQFI74xQvhRUSTYu4zbJAc73QRlVC9DQjjqlGwgKqry7L/ImJCIYAPLi/noUbDVVTVZ24UvBaiO1nGVon1HWQe3ZKcL6diynoRLyFfSzOtaqjuEbPZMsxJWYhL8oyrMHzgzUpIh2x45viaenwfko5m7fXgD4hnKeorBzCpTxwQDnPg6RW0vtgI/VBankR1QVDqqVprA1ensbs3d3RkJsTSL+TOiLvXO9BH/4aEdypWaUY6vO7kFfneV9PnnGWaXocme5I7nvDe/QHMLs1i5srCbEimGYsNUvbqqfa8KcynQjO6ekzLGXPdBYMw7AcFK0i2r7ZtyhYeh179heBTMPr1RwL8LChgPrVm0d0/1aaupqTDPUpFo2twOEJFnkn8tzN67fHCAbrkUexoESYgz5ybO6DgW6kesHFsHo1ZIpiaXhMN8Cfhni4niugJaorYG6/mjiTb2KwRtkI8FZMYz85ksMVs1EB6lTmitY/DiiqrCWlyp96fNiRIjcW8IbAIm3kJSRh5bGOvL7z11gkME4feb0BjuKDmLu0jNPoLn1wx3HTud+nEsrfPeOmLSAPVfbJVg0J3KBeXU4ruYhuxvrQes8LqV2OE1NHjeLMyYBGvxv1D9GBH9IlFnh/d895GMGUv+KT4v+8efqQIP5HFmdKqUVCGJHfZ7+NBtc56tpLDcncROjr3gWYMBFLmxux+FL+a8hOfSyzeYf9rq+LZN5gL3KbUSspg/ncNP6VpY/ztHz8GruBE2Y8GNP6gtMenTA5bVrB5ghou+Lb5/YFDj3rR9VVp3l6ZvT2U/qFS5hn7AytHWqDhfBfVaiTveYvj5pBG0GUIFZJQK4QWvcfqQCtgiC3sgMZz9kd925 HqAn5cER CRCFTqO0HD42moRlJ1ZxY2vGoGBh8Kf99TggNENkhbaPC1nbVD4w1NW1BMmkyRl2mr8nnx7ILZm4yRGI0y6rHjNtySI/YhGSL2MZMAZxQgJvHME7ocd5cyhs/622Z1YYrw11Q99eE4KDuSHI00NocK2119tBS1rLRqq/gq91QrS4t+GdFgimqYodHb7AzZ2o+UnjI2tdmmmtvDM0WQGyElKcFYPXBrjZXnX+uV044VPObmnA= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The VDSO implementation includes headers from outside of the vdso/ namespace. Introduce asm/vdso/page.h to make sure that the generic library uses only the allowed namespace. Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Jason A. Donenfeld Signed-off-by: Vincenzo Frascino --- arch/x86/include/asm/vdso/page.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 arch/x86/include/asm/vdso/page.h diff --git a/arch/x86/include/asm/vdso/page.h b/arch/x86/include/asm/vdso/page.h new file mode 100644 index 000000000000..b0af8fbef27c --- /dev/null +++ b/arch/x86/include/asm/vdso/page.h @@ -0,0 +1,15 @@ + +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_VDSO_PAGE_H +#define __ASM_VDSO_PAGE_H + +#ifndef __ASSEMBLY__ + +#include + +#define VDSO_PAGE_MASK PAGE_MASK +#define VDSO_PAGE_SIZE PAGE_SIZE + +#endif /* !__ASSEMBLY__ */ + +#endif /* __ASM_VDSO_PAGE_H */