On 2015-12-17 at 21:23 "'Davide Libenzi' via Akaros"
<[email protected]> wrote:
> What is that you had in mind for readstr/readmem? To have it error()
> if -EFAULT?
More like the kernel trap handler would throw the error() on any PF on
a user address. There's no -EFAULT at all.
> If that's the case, and assuming all the call sites expects for them
> to throw, we could add memcpy_{to,from}_user_error(), sibling of the
> _errno() ones.
The point of the error() approach for PFs was that the kernel code does
not need any helper at all. memcpy works (including a memcpy that is
optimized for speed). CAS and atomics work. Regular dereferences work.
etc.
> I am not sure all the call sites are safe under throw though.
Me neither. That's why this is a bigger issue than playing
whack-a-mole with every function that might touch user memory. When
the time comes that we need to fix it (which I don't think is now), I'd
like to fix it completely. But for now, I'd like to just get an
application running.
Barret
--
You received this message because you are subscribed to the Google Groups
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.