On 24.09.21 10:58, Peng Fan wrote: > 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 >
Two options come to my mind: - carry another revert in the Jailhouse kernel branch (we already have some there...) - explore using a different mapping mechanism or a different page source that permit executable mappings for the trampoline pages (those used before activating Jailhouse's own mappings) The latter would only work for arm64 so far (JAILHOUSE_BORROW_ROOT_PT), but other archs should be converted to that scheme eventually. Jan -- 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/bb692a80-925b-ae39-1681-d98874810c5a%40web.de.
