[RFC PATCH] uprobes: copy to user-space xol page with proper cache flushing

David Miller davem at davemloft.net
Thu Apr 10 21:36:36 PDT 2014


From: David Long <dave.long at linaro.org>
Date: Thu, 10 Apr 2014 23:45:31 -0400

> Replace memcpy and dcache flush in generic uprobes with a call to
> copy_to_user_page(), which will do a proper flushing of kernel and
> user cache.  Also modify the inmplementation of copy_to_user_page
> to assume a NULL vma pointer means the user icache corresponding
> to this right is stale and needs to be flushed.  Note that this patch
> does not fix copy_to_user page for the sh, alpha, sparc, or mips
> architectures (which do not currently support uprobes).
> 
> Signed-off-by: David A. Long <dave.long at linaro.org>

You really need to pass the proper VMA down to the call site
rather than pass NULL, that's extremely ugly and totally
unnecesary.



More information about the linux-arm-kernel mailing list