On Sunday 02 November 2003 08:26 pm, Jason Thorpe wrote:
> On Sunday, November 2, 2003, at 12:19 PM, Charles M. Hannum wrote:
> > That's totally the wrong direction. What we should be doing is
> > mapping stack
> > pages in the target process and just doing copyin()s. We can use
> > copyinstr()
> > with a bound to detect when we hit the end of a page.
>
> I like this approach a lot better; avoid the temporary buffer
> altogether.
>
> The only trick would be to ensure that the KVA has a compatible cache
> alias on virtually indexed cache systems, unless we can somehow ensure
> that the stack pages aren't mapped at all in the target process at the
> time the args are copied.
That's easy enough to guarantee, depending on how we allocate the pages. We
may need to allocate them manually here anyway, because otherwise we could
get a fault on the wrong side of copyinstr() and the kernel would be...
upset.