Jan,

With the commit, enter_hypervisor->entry will not work anymore, because it is 
not
executable now! Any suggestion?

commit 8491502f787c4a902bd4f223b578ef47d3490264
Author: Christoph Hellwig <[email protected]>
Date:   Tue Sep 7 19:56:04 2021 -0700

    mm: don't allow executable ioremap mappings

    There is no need to execute from iomem (and most platforms it is
    impossible anyway), so add the pgprot_nx() call similar to vmap.

    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Christoph Hellwig <[email protected]>
    Cc: Nicholas Piggin <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index e44983fb2d156..3055f04b486bb 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -316,7 +316,7 @@ int ioremap_page_range(unsigned long addr, unsigned long 
end,
 {
        int err;

-       err = vmap_range_noflush(addr, end, phys_addr, prot,
+       err = vmap_range_noflush(addr, end, phys_addr, pgprot_nx(prot),
                                 ioremap_max_page_shift);
        flush_cache_vmap(addr, end);
        return err;

Thanks,
Peng

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/DB6PR0402MB276022E2F0E48908180F2DA188A49%40DB6PR0402MB2760.eurprd04.prod.outlook.com.

Reply via email to