提交 ec840956 编写于 作者: G Glauber Costa 提交者: Ingo Molnar

x86: turn __put_user_check directly into put_user.

We also check user pointer in x86_64 put_user, the way i386 does.

In a separate patch for bisecting purposes.
Signed-off-by: NGlauber Costa <gcosta@redhat.com>
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 64a978c1
......@@ -23,9 +23,6 @@ extern void __put_user_bad(void);
:"c" (ptr),"a" (x) \
:"ebx")
#define put_user(x, ptr) \
__put_user_check((__typeof__(*(ptr)))(x), (ptr), sizeof(*(ptr)))
#define __get_user(x, ptr) \
__get_user_nocheck((x), (ptr), sizeof(*(ptr)))
#define __put_user(x, ptr) \
......@@ -34,11 +31,12 @@ extern void __put_user_bad(void);
#define __get_user_unaligned __get_user
#define __put_user_unaligned __put_user
#define __put_user_check(x, ptr, size) \
#define put_user(x, ptr) \
({ \
int __pu_err; \
typeof(*(ptr)) __user *__pu_addr = (ptr); \
switch (size) { \
__chk_user_ptr(ptr); \
switch (sizeof(*(ptr))) { \
case 1: \
__put_user_x(1, __pu_err, x, __pu_addr); \
break; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册