Add BTI landing pads to the AArch64 SHA2 assembly
commit1611b8e56e555bf928b795e45ba1724ef85eb1ed
authorAndrew Turner <andrew@fubar.geek.nz>
Tue, 3 Oct 2023 22:12:36 +0000 (3 23:12 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 4 Oct 2023 19:36:21 +0000 (4 12:36 -0700)
treecbd68cd633f0453089aa54d2aaf69327d5eb5d35
parent8015e2ea66b4f6233877fef29a8a35594f33558d
Add BTI landing pads to the AArch64 SHA2 assembly

The Arm Branch Target Identification (BTI) extension guards against
branching to an unintended instruction.

To support BTI add the landing pad instructions to the SHA2 functions.
These are from the hint space so are a nop on hardware that lacks BTI
support or if BTI isn't enabled.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Andrew Turner <andrew.turner4@arm.com>
Closes #14862
Closes #15339
module/icp/asm-aarch64/sha2/sha256-armv8.S
module/icp/asm-aarch64/sha2/sha512-armv8.S