From a9d4205766350832d2a6635cca8f20ad91627ba7 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 18 Dec 2024 16:47:47 +0000 Subject: [PATCH] uma: Remove a bogus setbounds operation It's up to the backend allocator to apply bounds. When UMA is allocating memory, this is already done in the keg (slab allocator) layer. For cache zones, where UMA is just providing a frontend to some custom allocator, we shouldn't be touching bounds at all; we don't even know that what we're allocating is memory, UMA is just providing per-CPU caching for pointer-sized objects. --- sys/vm/uma_core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 63497891070d..543b000b20d1 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -4483,10 +4483,6 @@ zone_alloc_item(uma_zone_t zone, void *udata, int domain, int flags) if (zone->uz_import(zone->uz_arg, &item, 1, domain, flags) != 1) goto fail_cnt; -#ifdef __CHERI_PURE_CAPABILITY__ - if ((zone->uz_flags & UMA_ZONE_PCPU) == 0) - item = cheri_setboundsexact(item, zone->uz_size); -#endif /* * We have to call both the zone's init (not the keg's init)