1/* SPDX-License-Identifier: BSD-2-Clause */ 2/* 3 * Copyright (c) 2022, Linaro Limited 4 */ 5 6#include <asm.S> 7 8/* 9 * void corrupt_pac(void) 10 * 11 * The function corrupts a single bit of the PAC to ensure that the 12 * authentication will fail. paciasp calculates and adds the PAC to the 13 * link register and autiasp is used to authenticate the PAC. 14 */ 15FUNC corrupt_pac , : 16 paciasp 17 /* Flip a random bit in PAC field of the return address */ 18 eor lr, lr , 1 << 58 19 autiasp 20 ret 21END_FUNC corrupt_pac 22 23emit_aarch64_feature_1_and GNU_PROPERTY_AARCH64_FEATURE_1_BTI 24