1/* SPDX-License-Identifier: GPL-2.0 */
2/* Copyright (C) 2020 ARM Limited */
3
4.global pac_corruptor
5
6.text
7/*
8 * Corrupting a single bit of the PAC ensures the authentication will fail.  It
9 * also guarantees no possible collision. TCR_EL1.TBI0 is set by default so no
10 * top byte PAC is tested
11 */
12 pac_corruptor:
13	paciasp
14
15	/* corrupt the top bit of the PAC */
16	eor lr, lr, #1 << 53
17
18	autiasp
19	ret
20