From patchwork Mon Sep 23 14:19:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincenzo Frascino X-Patchwork-Id: 13809664 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 0BA87CF9C72 for ; Mon, 23 Sep 2024 14:19:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9197A6B0085; Mon, 23 Sep 2024 10:19:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A0D36B0088; Mon, 23 Sep 2024 10:19:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CF316B0089; Mon, 23 Sep 2024 10:19:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 525B46B0085 for ; Mon, 23 Sep 2024 10:19:58 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id D238481360 for ; Mon, 23 Sep 2024 14:19:57 +0000 (UTC) X-FDA: 82596212034.09.1DE95B3 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf18.hostedemail.com (Postfix) with ESMTP id 311221C0018 for ; Mon, 23 Sep 2024 14:19:56 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf18.hostedemail.com: domain of vincenzo.frascino@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=vincenzo.frascino@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727101100; a=rsa-sha256; cv=none; b=JrpMKEvxiq8UJtxsJcXX4ARkV70gpIhenA6wGxXoZj1IcE5n/hHj7xCLv+C37588Ei5Tfc Ac29LaRHZbcUnQpNJO3u6uOobVhceXs3CS0tHrhI+oeOqc+LtKYrHcXCIvpXZ4HXK0lBJq NotGOzcPu5uNtfpbrR2kTXduPajtCmc= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf18.hostedemail.com: domain of vincenzo.frascino@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=vincenzo.frascino@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727101100; 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=jXzKDHq6h6LNaexpMiKdZ8nDPcV8u6WvA5EoJpJAJXE=; b=A6AD+CSEQ32S4pzRIVXeebTzMYtotXJc70cCboLnAfrGc5uWFz3yvs+WxRgvFkHRTxR7QI g5sOXqq/+67Md0t8YaMK5WN7VillQjyZ3x9yIZBe0Sg0lnSA2XOoK/gjZer2cgHSRskJ03 7wUqeAJycEj6y139W9C8cNVDbjuBW+Q= 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 D48CA11FB; Mon, 23 Sep 2024 07:20:24 -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 EB8593F64C; Mon, 23 Sep 2024 07:19:52 -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 v2 2/8] arm64: vdso: Introduce asm/vdso/mman.h Date: Mon, 23 Sep 2024 15:19:37 +0100 Message-Id: <20240923141943.133551-3-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240923141943.133551-1-vincenzo.frascino@arm.com> References: <20240923141943.133551-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 311221C0018 X-Stat-Signature: itc6fyghi8g61u4iui8qbs77dgss3pic X-Rspam-User: X-HE-Tag: 1727101196-811431 X-HE-Meta: U2FsdGVkX1+WdFJ8NUW7VYYJCjqfY70F/K3gSz7vGRJn7DRg+Na88p2s6k0gUCpmauoPi232ouQZomM2sE/9QTk88bvA/1KuvZWA5VfGmkqH98MiYGCtQU2fpzFOvTNg8vrNoKRQDMguioYA/GzmHB6j4rFulDbayFHfUtNfy4reC/H4mecClEc3cGIKTPLFCZOOjJojemDIeHpwRFRl42Q/6x+e7wYuO8P5zWHZWVYThsrzBvjIksMIv493QPvqrFB6jDS4NJ1KTKB0fYRzLQbjfv8NPaIAI0qN8t1Ajiu880WAEKW74kcBlCxZnVRmbbWjqgK3QJVanMF1xPs+eN/YM1rf2mpd9PWHCBX3WL0jRKxcA7nCJBsV4mzkmHSOP6vzOdlWkmjg1MB6gZb1+JD5z9ZOnUuM4riC8tmM4hAlIzUYCx3R2MuKkgNPHIKJgkaeig4QWQrB3I8eGf0/YyjUIX8TG2cx0jKoWzTDpc3peKHl9OE9Y/9HtbAWQ8qGL3taoEz8KZw/Bx/O3b17AeFwYt+2az6IBe39d1MIzMTAi+A9/jSbNQxIP+h0uMcKE3HXzIB6t3EScbIhS6kS9lq/5bKJq2wQlureNsi1c7uIZC/uZpTBQWE2BuPUXvUVwGKWH/No5cD3QotICtyaJznTl6jabRCe35rAKPumdn0xuMedSAOceCG29N1coMKHvmwWY1cNPmoD0qZHBCbMREHj2R5ATHt4WggXDRKt6ZcCvFUeGtD0waAo863S3ljIhHz4SCk5IfnyAxHhMdg0tMqkB8Iubtd1BSBLa9LlWMfVt7g0Zr/d7u23PxWmEqltMiCfo9kdr4fLSQfHntZs913A4N3dHC2jy2UM+hV/ujHFlJ6BIYojF4axanuKs0psXbRD7at459HZfnO7nt5Sb6itUBKTVXWyuS0oemQ7j43c59DDo/ilEiqxzklNlWaadaAL09cSy+1m4XlsESi UDHn2CBZ xIGhOO8xQS/sZbNkonY06fowKmGf56G56IpNVyHfBHWc3Nf05k7yhueXhGDyN8hzhEKFH67vV8PLsURkS8iTZYYIRg2VyenzBKG/uHwdszROcKzh5kief1nHmUYowjNO1EVctGCO0h0DFP5ngHLPQaOBkaEXJT0yWtvFz4TThOt/k8dtnMXdiHpuvsk4mGkVD+l4uUT21AJ6o4CZOQVhMnhgH7Wu5ZQJ2QFgO7mUk9bYCQec= 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/mman.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/arm64/include/asm/vdso/mman.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 arch/arm64/include/asm/vdso/mman.h diff --git a/arch/arm64/include/asm/vdso/mman.h b/arch/arm64/include/asm/vdso/mman.h new file mode 100644 index 000000000000..4c936c9d11ab --- /dev/null +++ b/arch/arm64/include/asm/vdso/mman.h @@ -0,0 +1,15 @@ + +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __ASM_VDSO_MMAN_H +#define __ASM_VDSO_MMAN_H + +#ifndef __ASSEMBLY__ + +#include + +#define VDSO_MMAP_PROT PROT_READ | PROT_WRITE +#define VDSO_MMAP_FLAGS MAP_DROPPABLE | MAP_ANONYMOUS + +#endif /* !__ASSEMBLY__ */ + +#endif /* __ASM_VDSO_MMAN_H */