Staging
v0.8.1
https://github.com/torvalds/linux
Raw File
Tip revision: 9e1ff307c779ce1f0f810c7ecce3d95bbae40896 authored by Linus Torvalds on 03 October 2021, 21:08:47 UTC
Linux 5.15-rc4
Tip revision: 9e1ff30
pac_corruptor.S
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2020 ARM Limited */

.global pac_corruptor

.text
/*
 * Corrupting a single bit of the PAC ensures the authentication will fail.  It
 * also guarantees no possible collision. TCR_EL1.TBI0 is set by default so no
 * top byte PAC is tested
 */
 pac_corruptor:
	paciasp

	/* corrupt the top bit of the PAC */
	eor lr, lr, #1 << 53

	autiasp
	ret
back to top