From 2f9c1770080b74e8d406017bce5c48561958aad3 Mon Sep 17 00:00:00 2001 From: Hesham Almatary Date: Thu, 28 May 2026 09:37:24 +0100 Subject: [PATCH] CHERI: preserve VMA reservation data for purecap userspace Reservation metadata is currently copied only when CONFIG_CHERI_KERNEL is enabled (ie only purecap RVY at the moment). However, purecap userspace with hybrid Morello kernel also relies on VMA reservation data being preserved across VMA duplication and initialisation paths. Use CONFIG_CHERI_PURECAP_UABI instead so reservation data is retained for purecap user VMAs with a hybrid Morello kernel as well. Signed-off-by: Hesham Almatary --- mm/vma_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/vma_init.c b/mm/vma_init.c index bbab1c8169851a..217eb675b43bf0 100644 --- a/mm/vma_init.c +++ b/mm/vma_init.c @@ -75,7 +75,7 @@ static void vm_area_init_from(const struct vm_area_struct *src, #ifdef __HAVE_PFNMAP_TRACKING dest->pfnmap_track_ctx = NULL; #endif -#ifdef CONFIG_CHERI_KERNEL +#ifdef CONFIG_CHERI_PURECAP_UABI if (reserv_is_supported(dest->vm_mm)) reserv_vma_set_reserv_data(dest, &src->reserv_data); #endif