From 7e00b0a6352e9e96645ec6f8b2e70a595ba8ac3e Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Wed, 11 Nov 2026 14:59:53 +0000 Subject: [PATCH] cheri_exec: Remove always-true SV_CHERI condition We only ever call cheri_sigcode_capability for SV_CHERI, and other parts of its implementation would be broken were that not the case, so delete this check added in 87dd9fe781e0 ("struct vmspace: make vm_shp_base a capability"). --- sys/cheri/cheri_exec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/cheri/cheri_exec.c b/sys/cheri/cheri_exec.c index f84ceea9df73..f9165e6f4acd 100644 --- a/sys/cheri/cheri_exec.c +++ b/sys/cheri/cheri_exec.c @@ -105,9 +105,6 @@ cheri_sigcode_capability(struct thread *td) tmpcap = (void * __capability)cheri_bounds_set_exact( cheri_perms_and(PROC_SIGCODE(p), CHERI_CAP_USER_CODE_PERMS), *sv->sv_szsigcode); - - if (SV_PROC_FLAG(td->td_proc, SV_CHERI)) - tmpcap = cheri_capmode(tmpcap); - + tmpcap = cheri_capmode(tmpcap); return (cheri_sentry_create(tmpcap)); }