On Fri, May 2, 2014 at 8:43 AM, <st...@nixia.no> wrote: >> Yeah, this is because trinity destroys the UML stub code. >> Please test the attached patch, it should fix the root cause of the >> problem. > > @@ -124,6 +125,9 @@ static int add_munmap(unsigned long addr, unsigned > long len, > struct host_vm_op *last; > int ret = 0; > > + if ((addr >= STUB_START) && (addr < STUB_END)) > + return -EINVAL; > + > if (hvc->index != 0) { > last = &hvc->ops[hvc->index - 1]; > if ((last->type == MUNMAP) && > > I do not know how add_munmap is called, so this is more of a question. > What happens in the use cases where the mmap spans multiple pages, and > the stub is in the middle and other variations?
add_munmap() is only called on existing mappings. UML ensures that we have always a mapping at STUB_START. Doing a mremap() or munmap() i.e. on STUB_START - 4096 won't trigger the add_munmap(). It is also not possible to create an overlapping map over the STUB. update_pte_range() makes this impossible. If you find a way to bypass this, please drop me a mail. The UML TLB code is not trivial and also not written by me. Maybe I've overlooked something. :-) -- Thanks, //richard ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel