Message ID | 22915.33137.173101.458489@gargle.gargle.HOWL |
---|---|
State | RFC |
Delegated to: | David Miller |
Headers | show |
--- linux-4.13-rc3/include/linux/uaccess.h.~1~ 2017-08-01 08:49:48.397819726 +0200 +++ linux-4.13-rc3/include/linux/uaccess.h 2017-08-03 21:33:11.009634421 +0200 @@ -4,6 +4,8 @@ #include <linux/sched.h> #include <linux/thread_info.h> #include <linux/kasan-checks.h> +#include <linux/ratelimit.h> +#include <linux/printk.h> #define VERIFY_READ 0 #define VERIFY_WRITE 1 @@ -115,7 +117,9 @@ _copy_from_user(void *to, const void __u res = raw_copy_from_user(to, from, n); } if (unlikely(res)) - memset(to + (n - res), 0, res); + { + printk_ratelimited("_copy_from_user(%p, %p, %lu) res %lu\n", to, from, n, res); + } return res; } #else