Message ID | 20241001-arm64-gcs-v13-5-222b78d87eee@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 F106ECF318A for <linux-mm@archiver.kernel.org>; Tue, 1 Oct 2024 23:00:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 85B9F44014C; Tue, 1 Oct 2024 19:00:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 80C8968002B; Tue, 1 Oct 2024 19:00:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 65E5944014C; Tue, 1 Oct 2024 19:00:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 45F6C68002B for <linux-mm@kvack.org>; Tue, 1 Oct 2024 19:00:57 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 0E2A21A1294 for <linux-mm@kvack.org>; Tue, 1 Oct 2024 23:00:57 +0000 (UTC) X-FDA: 82626555354.07.8680C45 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf25.hostedemail.com (Postfix) with ESMTP id 33087A0011 for <linux-mm@kvack.org>; Tue, 1 Oct 2024 23:00:55 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Q9BEblIa; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf25.hostedemail.com: domain of broonie@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1727823615; a=rsa-sha256; cv=none; b=TmVYwI7pQ4y+XVsfUNgaaQI4lT+wWWuKWRDnUMEBv3xa7TR0mgGqgQPMmVI62kAn3JOpCp YIBTwk/8p562RVSth8WEMQ3d0otW4U96wcRwQYJxoqM6uOVSdFKwpf9w/Bqpu6cknbi9PP olLvtbCNCGw6hkErbNG2z5+T8xJ3LjU= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Q9BEblIa; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf25.hostedemail.com: domain of broonie@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1727823615; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=qUMCCvXQQpJjPoDO711IUc+ph4XSEVjmEgAg2iHR6t4=; b=z1ZGBmH3HmDzaiw1MlG51VKU5aXq3/JIu9oku6o06lpOtjyiiCjyOmwHKmwr+xU27v5Ia8 UtZ6a45eXHLkEkiCvSgODisS0h4uMEu6zZDv7bsTliQ45yHM0sHgxiIz/Bn0H8rkE7ZE4m TLFMmIQEOo9nFqo0jPh1/Ze9U/Y6Qw4= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 65D595C045A; Tue, 1 Oct 2024 23:00:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73BCEC4CECD; Tue, 1 Oct 2024 23:00:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727823653; bh=vL+b/h3WOPYO7SwFl92JA9c0VbV77YwkdcIPJjlNFTs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Q9BEblIa6MmA5Xaow7wFPzfAM9zttSOUnO+EtJzN/PX7Huf9lzr++3lNcVEnhbBqz 6dMkhlxPMElbdJeNlV158SBKPlOnHk5LQmhwlqFXihJgYSoqGxl3GLqUDM7DzAG5zc lvLDejujVe26CNwqEFjY9RC9WxGXrSNkF5G9RyuOCrURHXGYY7+8AA1BJ1SMrCIjZt BJvDkqRMfZF1cudVdwGq4CDhB5w9OLNa4NOrghTmOJJzwygsOzNNOFDRDlXzt7kKtH IpBNBwRkNrS1h0eaDjRqb0/mVRIcjwZiyqBZn+jatUlWQ0I77tCcOgDFflvH0cvLXI 3XrtVqCX11mdg== From: Mark Brown <broonie@kernel.org> Date: Tue, 01 Oct 2024 23:58:44 +0100 Subject: [PATCH v13 05/40] mman: Add map_shadow_stack() flags MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241001-arm64-gcs-v13-5-222b78d87eee@kernel.org> References: <20241001-arm64-gcs-v13-0-222b78d87eee@kernel.org> In-Reply-To: <20241001-arm64-gcs-v13-0-222b78d87eee@kernel.org> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Andrew Morton <akpm@linux-foundation.org>, Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Arnd Bergmann <arnd@arndb.de>, Oleg Nesterov <oleg@redhat.com>, Eric Biederman <ebiederm@xmission.com>, Shuah Khan <shuah@kernel.org>, "Rick P. Edgecombe" <rick.p.edgecombe@intel.com>, Deepak Gupta <debug@rivosinc.com>, Ard Biesheuvel <ardb@kernel.org>, Szabolcs Nagy <Szabolcs.Nagy@arm.com>, Kees Cook <kees@kernel.org> Cc: "H.J. Lu" <hjl.tools@gmail.com>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Florian Weimer <fweimer@redhat.com>, Christian Brauner <brauner@kernel.org>, Thiago Jung Bauermann <thiago.bauermann@linaro.org>, Ross Burton <ross.burton@arm.com>, David Spickett <david.spickett@arm.com>, Yury Khrustalev <yury.khrustalev@arm.com>, Wilco Dijkstra <wilco.dijkstra@arm.com>, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Brown <broonie@kernel.org> X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=openpgp-sha256; l=1935; i=broonie@kernel.org; h=from:subject:message-id; bh=vL+b/h3WOPYO7SwFl92JA9c0VbV77YwkdcIPJjlNFTs=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBm/H7Ig3nICM+W9H3bCT71LrQPx0TmwN2XrzWIKusU qfRtVgmJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZvx+yAAKCRAk1otyXVSH0EIMB/ 9VAnLOcjD+99k7ouK69WkUZZje02S2hR6fRnCSftnhm+4bz+XAyRnRMAjPkiv0ecgHaTuBtP+MmN6L M1BTqr15gkX62ORCMeKqgMig0l5Zm08WyrOD4f/Vf4Zb4phDfeQkEhHthQYNAOzPiw9zjQIJGaypMM PJHFuO2ykfazrzqINBCj0D1SCeQt3+5cESSO4XqcDnyaOrpnKPqwWdoWVkNzB98GHx999EQw2iWsOp pEi9Zg8ZJFAhJSTayVv1NDY9QzD6ngW3nJCCx7rD/3cbiZd2/Whg25ERj0YbAqlldQVHJfqrX3RCBL guH+PVB5PQbczVYykW+F+llt/dznd7 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Rspam-User: X-Rspamd-Queue-Id: 33087A0011 X-Rspamd-Server: rspam01 X-Stat-Signature: nmg9tnayqkcqqwtgp3i5cfdmise19r1q X-HE-Tag: 1727823655-483917 X-HE-Meta: U2FsdGVkX1+XzoRmyOIPnH/LPv6wMOBpMChY1pKFXmGDI8UOdGRebZz+heEIQ7OS8agNYPQLeVYFgZzCsV72FjqmjrVRhIanze5UUrn0+4CryX4mqbxjJwU54dWuebrtLmnsyIRVRf0COyl/BW9cJGq/G2iYvtEBxpv8gE7rp1WbPoV6B0wp8vPkGrRLl6tO5wOzBHBd6ce+sSQFvpXzCz783x5MlVqO57VZkgqN4yMfdWtZMiiZUyA/9eqxm+LgiVckebTUrswaoOYqPEkCvblf2sqw0r/5PfftBp6sn/fAfEhkViwFh20N49Nc0OmicDWL86AvmVmgHllL3f5v5HKtWDlEemiyJ0Mk324NVSy6eag77Z9SdjS2iqxc8gmFdrLPcU+CBtQY44hITizgtPFWp69u/KYCVC1pgQfnBNQMHrXXJHPI4OWSuxEa31COvoASr8PYPZdtqXrf+yNuaYn37C1UAK0wmEB2ilD7dSH1w+Cm8qqwML0EHypiviNN0jyngJUmQyTuL+t6XBQgxf3xlhFUvZo04xi7sgMspKHRB+geqkwAkKkfJp3XemLPz+OWQjVJLw8GKH1yx4bxxImLWtfMoboWbM2Uf2zjDIbDIlieiRBmNU6avH86QTYdAY6t7w31e87IocrW/tK74N/pwbJsvDorzWrNJw1YKFOMcypgzVoGAtiFWY1KRqizBHGPX2+WINZ7GDo/tSPaQrbVVUs7sqzvoLP4AazvBYRkOf4sFFh3dmOYQDKBbVZdDgqb+0qWNz58wfzqENVrVRwOQSg8a6EGXM7XZGd1YMxLRG8rRsyjlG9efa0DYDWM8kmNreSMldqHSDOpgDxm4Oz0jbqCYuaVrDWUztT2U3o5uCbWigOc3czLI/17613hBai4veyxG2DeQKMxUFQ8r7j+Fl/z2CaRPcrRfR3FIrv/eqT1Bx09mvKqPQ1IdKFwzoDYT9/YGGKPQRPXgix U4a/OjGa w74gNS50Yc6D5y/kX6ydZjEiuWFe4AgjZTl6qvqHRam+WS4AllyZgmtBlklMEhlr9uOTB2fqw1sgvCV2P2nQnOKwg7FJ5eo/+xzSaWFfo9jk3CIUmk3HFH+22J8yFUpHBwGGDSzGtZvUpEC77JAe8v2sNJSlWB2z+1ppI072yarhxAcUYuRxKZHGkso6bOk/nbTg2FZGdepMOP1cKp6qI5YHniPptXBldSy4FqERh8XxiPAGr5XudQuioz3fX81DIEEj9beQm8AZtmgByXXu8LBHecSSOVPbzqMcUzV5YYIF7jXZdfF26w9lWaR6BRVE1ZIha/6qji7NXPmwf1TQXy3FCTcn+SdgD5Emx7E31ed8ZNIc8JxY/kGY9kIeEwrPN+5p/KXNqTWFT3np8aaWjzkw/U2eS1gYTJZ3ExeDNfpOU8ojWscykB3Spr3VDIiMW/jSSLxTLKP7/vuHtU02lEIS68SmTOrRR+jkS 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
arm64/gcs: Provide support for GCS in userspace
|
expand
|
diff --git a/arch/x86/include/uapi/asm/mman.h b/arch/x86/include/uapi/asm/mman.h index 46cdc941f958..ac1e6277212b 100644 --- a/arch/x86/include/uapi/asm/mman.h +++ b/arch/x86/include/uapi/asm/mman.h @@ -5,9 +5,6 @@ #define MAP_32BIT 0x40 /* only give out 32bit addresses */ #define MAP_ABOVE4G 0x80 /* only map above 4GB */ -/* Flags for map_shadow_stack(2) */ -#define SHADOW_STACK_SET_TOKEN (1ULL << 0) /* Set up a restore token in the shadow stack */ - #include <asm-generic/mman.h> #endif /* _ASM_X86_MMAN_H */ diff --git a/include/uapi/asm-generic/mman.h b/include/uapi/asm-generic/mman.h index 57e8195d0b53..5e3d61ddbd8c 100644 --- a/include/uapi/asm-generic/mman.h +++ b/include/uapi/asm-generic/mman.h @@ -19,4 +19,8 @@ #define MCL_FUTURE 2 /* lock all future mappings */ #define MCL_ONFAULT 4 /* lock all pages that are faulted in */ +#define SHADOW_STACK_SET_TOKEN (1ULL << 0) /* Set up a restore token in the shadow stack */ +#define SHADOW_STACK_SET_MARKER (1ULL << 1) /* Set up a top of stack marker in the shadow stack */ + + #endif /* __ASM_GENERIC_MMAN_H */