Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: libcrypto: switch aarch64 CPU feature detection to elf_aux_info()
To:
tech@openbsd.org
Date:
Tue, 4 Aug 2026 19:57:53 +0200

Download raw body.

Thread
Eventually this will also allow us to remove another special case
in pledge_sysctl().

I'll save it on a branch "post-8.2" in my repository. :-)

-----------------------------------------------
commit 2ad170fdf33c13b481a5f553239f970ce138ed30 (local)
from: Christian Weisgerber <naddy@mips.inka.de>
date: Tue Aug  4 17:18:01 2026 UTC
 
 pledge: aarch64 libcrypto special case no longer needed
 
 aarch64 libcrypto has switched to elf_aux_info() for CPU feature
 detection.  XXX 2026-08-XX
 
diff e1fdeb03b249edacff87dad73e1796647a22d661 2ad170fdf33c13b481a5f553239f970ce138ed30
commit - e1fdeb03b249edacff87dad73e1796647a22d661
commit + 2ad170fdf33c13b481a5f553239f970ce138ed30
blob - eb93c496aef371de52a06b95f910131b3d691383
blob + 548c5d52e38609177d5d3220bd80f243d3f6790d
--- sys/kern/kern_pledge.c
+++ sys/kern/kern_pledge.c
@@ -996,17 +996,6 @@ pledge_sysctl(struct proc *p, int miblen, int *mib, vo
 		}
 	}
 
-#ifdef CPU_ID_AA64ISAR0
-	if (miblen == 2 &&		/* arm64 libcrypto inspects CPU features */
-	    mib[0] == CTL_MACHDEP && mib[1] == CPU_ID_AA64ISAR0)
-		return (0);
-#endif /* CPU_ID_AA64ISAR0 */
-#ifdef CPU_ID_AA64ISAR1
-	if (miblen == 2 &&		/* arm64 libcrypto inspects CPU features */
-	    mib[0] == CTL_MACHDEP && mib[1] == CPU_ID_AA64ISAR1)
-		return (0);
-#endif /* CPU_ID_AA64ISAR1 */
-
 	return pledge_fail(p, EINVAL, 0);
 }
 #endif /* SMALL_KERNEL */

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de