@@ -76,10 +76,11 @@ EXPORT_SYMBOL(_copy_to_user);
|
||||
*/
|
||||
unsigned long _copy_from_user(void *to, const void __user *from, unsigned n)
|
||||
{
|
||||
unsigned long res = n;
|
||||
if (access_ok(VERIFY_READ, from, n))
|
||||
n = __copy_from_user(to, from, n);
|
||||
else
|
||||
memset(to, 0, n);
|
||||
return n;
|
||||
res = __copy_from_user_inatomic(to, from, n);
|
||||
if (unlikely(res))
|
||||
memset(to + n - res, 0, res);
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(_copy_from_user);
|
||||
|
@@ -80,9 +80,5 @@ copy_user_handle_tail(char *to, char *from, unsigned len)
|
||||
break;
|
||||
}
|
||||
clac();
|
||||
|
||||
/* If the destination is a kernel buffer, we always clear the end */
|
||||
if (!__addr_ok(to))
|
||||
memset(to, 0, len);
|
||||
return len;
|
||||
}
|
||||
|
新增問題並參考
封鎖使用者