[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Arm: drop memguard_{,un}guard_range() stubs


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 14 Dec 2021 16:16:37 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oTnYpNOrpXU+v29cmdfEITKc/+oXUuEoOqhKM6iPyRE=; b=QvfGve+/BTam1dExcpk7a+h2My5kcrCipKEamuEN0L7zSuoDERhdiFqPlKfvioj7McYP9p5ZhIEns19QezyMqmcjznuDHMKif7Q7Eg89cM6i13GXcap9xck0iQFptp/gOJhdhGP02RL3uoQkxOcQqEpBQg82NyI+Tug/iAo9MqyQtpZ8AGmnQxEBBg+6+CZo3evgmvpr/N4TM7Jogm4ETYui310Yb+5rXg1TbFUPeZ9KF+o215rghZ2P9mBUxWM/aNkX4nPMkoO8HGJJiQJdtG3A97lrFL0bI/ADMFn9H/A/thJTaRq/EfDXy8yNAMfxqbLc2Ms5Kvb5xj0shzSQOA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KjG/1+wVmpKxXqPexuZfT5R64old9KNjOvdn6M9S6FlCDnyi3di5F1PFR97UQ1wWs/QSPovXDJPZZpFkrEs3xgVAZdvvADgjzHmGYCNlN4eR/nfeXHBpz+4lCwqStigXpqpjoKy562fRs3bcjwWWEKb/8JTvJcmzFTH4wkR4TQgP+M1owf9DSXce+SGuEId/iGGuNZld4QJzABwFp14hqbbddGHMZdR3Tkm8G7oRE+J2dRr6uRNtStFNgNlqGpWCngECuL8SwdVYPjI3LEYchs1yMb3+VFjtQgVdpDee/GSUXJwsR2HqxrTSVu3QPcanr74mfYTBB++/6kOa/h8ciQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 14 Dec 2021 15:17:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

These exist for no reason: The code using them is only ever built for
Arm32. And memguard_guard_stack() has no use outside of x86-specific
code at all.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -2152,8 +2152,6 @@ void init_xenheap_pages(paddr_t ps, padd
     if ( !is_xen_heap_mfn(maddr_to_mfn(pe)) )
         pe -= PAGE_SIZE;
 
-    memguard_guard_range(maddr_to_virt(ps), pe - ps);
-
     init_heap_pages(maddr_to_page(ps), (pe - ps) >> PAGE_SHIFT);
 }
 
@@ -2169,8 +2167,6 @@ void *alloc_xenheap_pages(unsigned int o
     if ( unlikely(pg == NULL) )
         return NULL;
 
-    memguard_unguard_range(page_to_virt(pg), 1 << (order + PAGE_SHIFT));
-
     return page_to_virt(pg);
 }
 
@@ -2182,8 +2178,6 @@ void free_xenheap_pages(void *v, unsigne
     if ( v == NULL )
         return;
 
-    memguard_guard_range(v, 1 << (order + PAGE_SHIFT));
-
     free_heap_pages(virt_to_page(v), order, false);
 }
 
--- a/xen/include/asm-arm/mm.h
+++ b/xen/include/asm-arm/mm.h
@@ -341,10 +341,6 @@ long arch_memory_op(int op, XEN_GUEST_HA
 
 unsigned long domain_get_maximum_gpfn(struct domain *d);
 
-#define memguard_guard_stack(_p)       ((void)0)
-#define memguard_guard_range(_p,_l)    ((void)0)
-#define memguard_unguard_range(_p,_l)  ((void)0)
-
 /* Release all __init and __initdata ranges to be reused */
 void free_init_memory(void);
 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.