[RFC PATCH] uprobes: copy to user-space xol page with proper cache flushing
Linus Torvalds
torvalds at linux-foundation.org
Fri Apr 11 11:24:58 PDT 2014
On Fri, Apr 11, 2014 at 11:19 AM, David Miller <davem at davemloft.net> wrote:
>
> The vm_flags check is about "could it have gotten into the I-cache
> via this VMA".
.. and that's obviously complete bullshit and wrong. Which is my point.
Now, it's possible that doing things right is just too much work for
architectures that don't even matter, but dammit, it's still wrong. If
you change a page, and it's executably mapped into some other vma, the
icache is possibly stale there. The whole _point_ of our cache
flushing is to make caches coherent, and anything that uses "vma" to
do so is *wrong*.
So your argument makes no sense. You're just re-stating that "it's
wrong", but you're re-stating it in a way that makes it sounds like it
could be right.
The "this page has been mapped executably" approach, in contrast, is
*correct*. It has a chance in hell of actually making caches coherent.
Linus
More information about the linux-arm-kernel
mailing list