From fd8134be2d7c28a76779bd0a6a422b26a2622b43 Mon Sep 17 00:00:00 2001 From: kettenis Date: Wed, 13 Mar 2024 14:57:08 +0000 Subject: [PATCH] Expose BTI support to userland. ok deraadt@ --- sys/arch/arm64/arm64/machdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arch/arm64/arm64/machdep.c b/sys/arch/arm64/arm64/machdep.c index fc1df710f67..ba1fcf72fc4 100644 --- a/sys/arch/arm64/arm64/machdep.c +++ b/sys/arch/arm64/arm64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.86 2024/02/21 01:45:14 dlg Exp $ */ +/* $OpenBSD: machdep.c,v 1.87 2024/03/13 14:57:08 kettenis Exp $ */ /* * Copyright (c) 2014 Patrick Wildt * Copyright (c) 2021 Mark Kettenis @@ -366,6 +366,7 @@ cpu_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, return sysctl_rdquad(oldp, oldlenp, newp, value); case CPU_ID_AA64PFR1: value = 0; + value |= cpu_id_aa64pfr1 & ID_AA64PFR1_BT_MASK; value |= cpu_id_aa64pfr1 & ID_AA64PFR1_SBSS_MASK; return sysctl_rdquad(oldp, oldlenp, newp, value); case CPU_ID_AA64ISAR2: -- 2.20.1