From: Jamie Cunliffe <Jamie.Cunliffe@arm.com>
To: linux-arm-kernel@lists.infradead.org, rust-for-linux@vger.kernel.org
Cc: Miguel Ojeda <ojeda@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
steve.capper@arm.com, Asahi Lina <lina@asahilina.net>
Subject: [PATCH v2 2/3] arm64: rust: Enable PAC support for Rust.
Date: Tue, 6 Jun 2023 15:56:05 +0100 [thread overview]
Message-ID: <20230606145606.1153715-3-Jamie.Cunliffe@arm.com> (raw)
In-Reply-To: <20230606145606.1153715-1-Jamie.Cunliffe@arm.com>
Enable the PAC ret and BTI options in the Rust build flags to match
the options that are used when building C.
Signed-off-by: Jamie Cunliffe <Jamie.Cunliffe@arm.com>
---
arch/arm64/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 2ce1555e9fc5..4a2c807d65db 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -67,7 +67,9 @@ endif
ifeq ($(CONFIG_ARM64_BTI_KERNEL),y)
KBUILD_CFLAGS += -mbranch-protection=pac-ret+bti
+ KBUILD_RUSTFLAGS += -Z branch-protection=bti,pac-ret
else ifeq ($(CONFIG_ARM64_PTR_AUTH_KERNEL),y)
+ KBUILD_RUSTFLAGS += -Z branch-protection=pac-ret
ifeq ($(CONFIG_CC_HAS_BRANCH_PROT_PAC_RET),y)
KBUILD_CFLAGS += -mbranch-protection=pac-ret
else
--
2.30.2
next prev parent reply other threads:[~2023-06-06 15:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 14:56 [PATCH v2 0/3] Rust enablement for AArch64 Jamie Cunliffe
2023-06-06 14:56 ` [PATCH v2 1/3] arm64: rust: Enable Rust support " Jamie Cunliffe
2023-06-09 17:47 ` Boqun Feng
2023-06-12 15:26 ` Jamie Cunliffe
2023-06-29 19:46 ` Boqun Feng
2023-08-15 18:00 ` Boqun Feng
2023-06-06 14:56 ` Jamie Cunliffe [this message]
2023-06-06 14:56 ` [PATCH v2 3/3] arm64: Restrict Rust support to little endian only Jamie Cunliffe
2023-06-06 15:25 ` [PATCH v2 0/3] Rust enablement for AArch64 Miguel Ojeda
2023-06-09 18:34 ` Boqun Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230606145606.1153715-3-Jamie.Cunliffe@arm.com \
--to=jamie.cunliffe@arm.com \
--cc=catalin.marinas@arm.com \
--cc=lina@asahilina.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=steve.capper@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).