From: David Long dave.long@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@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.