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

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



commit 9956fdc70f99b0f133be7f16f62417928a84622c
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Dec 15 10:24:45 2021 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Dec 15 10:24:45 2021 +0100

    Arm: drop memguard_{,un}guard_range() stubs
    
    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>
    Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
---
 xen/arch/arm/include/asm/mm.h | 4 ----
 xen/common/page_alloc.c       | 6 ------
 2 files changed, 10 deletions(-)

diff --git a/xen/arch/arm/include/asm/mm.h b/xen/arch/arm/include/asm/mm.h
index 7b5e7b7f69..424aaf2823 100644
--- a/xen/arch/arm/include/asm/mm.h
+++ b/xen/arch/arm/include/asm/mm.h
@@ -341,10 +341,6 @@ long arch_memory_op(int op, XEN_GUEST_HANDLE_PARAM(void) 
arg);
 
 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);
 
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 653f1ab09f..38eea879c0 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -2152,8 +2152,6 @@ void init_xenheap_pages(paddr_t ps, paddr_t pe)
     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 order, unsigned 
int memflags)
     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, unsigned int order)
     if ( v == NULL )
         return;
 
-    memguard_guard_range(v, 1 << (order + PAGE_SHIFT));
-
     free_heap_pages(virt_to_page(v), order, false);
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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