diff options
Diffstat (limited to 'arch/x86/lib/getuser.S')
-rw-r--r-- | arch/x86/lib/getuser.S | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/lib/getuser.S b/arch/x86/lib/getuser.S index b33b1fb1e6d4..156b9c804670 100644 --- a/arch/x86/lib/getuser.S +++ b/arch/x86/lib/getuser.S | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <asm/asm-offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | #include <asm/thread_info.h> | 34 | #include <asm/thread_info.h> |
35 | #include <asm/asm.h> | 35 | #include <asm/asm.h> |
36 | #include <asm/smap.h> | ||
36 | 37 | ||
37 | .text | 38 | .text |
38 | ENTRY(__get_user_1) | 39 | ENTRY(__get_user_1) |
@@ -40,8 +41,10 @@ ENTRY(__get_user_1) | |||
40 | GET_THREAD_INFO(%_ASM_DX) | 41 | GET_THREAD_INFO(%_ASM_DX) |
41 | cmp TI_addr_limit(%_ASM_DX),%_ASM_AX | 42 | cmp TI_addr_limit(%_ASM_DX),%_ASM_AX |
42 | jae bad_get_user | 43 | jae bad_get_user |
44 | ASM_STAC | ||
43 | 1: movzb (%_ASM_AX),%edx | 45 | 1: movzb (%_ASM_AX),%edx |
44 | xor %eax,%eax | 46 | xor %eax,%eax |
47 | ASM_CLAC | ||
45 | ret | 48 | ret |
46 | CFI_ENDPROC | 49 | CFI_ENDPROC |
47 | ENDPROC(__get_user_1) | 50 | ENDPROC(__get_user_1) |
@@ -53,8 +56,10 @@ ENTRY(__get_user_2) | |||
53 | GET_THREAD_INFO(%_ASM_DX) | 56 | GET_THREAD_INFO(%_ASM_DX) |
54 | cmp TI_addr_limit(%_ASM_DX),%_ASM_AX | 57 | cmp TI_addr_limit(%_ASM_DX),%_ASM_AX |
55 | jae bad_get_user | 58 | jae bad_get_user |
59 | ASM_STAC | ||
56 | 2: movzwl -1(%_ASM_AX),%edx | 60 | 2: movzwl -1(%_ASM_AX),%edx |
57 | xor %eax,%eax | 61 | xor %eax,%eax |
62 | ASM_CLAC | ||
58 | ret | 63 | ret |
59 | CFI_ENDPROC | 64 | CFI_ENDPROC |
60 | ENDPROC(__get_user_2) | 65 | ENDPROC(__get_user_2) |
@@ -66,8 +71,10 @@ ENTRY(__get_user_4) | |||
66 | GET_THREAD_INFO(%_ASM_DX) | 71 | GET_THREAD_INFO(%_ASM_DX) |
67 | cmp TI_addr_limit(%_ASM_DX),%_ASM_AX | 72 | cmp TI_addr_limit(%_ASM_DX),%_ASM_AX |
68 | jae bad_get_user | 73 | jae bad_get_user |
74 | ASM_STAC | ||
69 | 3: mov -3(%_ASM_AX),%edx | 75 | 3: mov -3(%_ASM_AX),%edx |
70 | xor %eax,%eax | 76 | xor %eax,%eax |
77 | ASM_CLAC | ||
71 | ret | 78 | ret |
72 | CFI_ENDPROC | 79 | CFI_ENDPROC |
73 | ENDPROC(__get_user_4) | 80 | ENDPROC(__get_user_4) |
@@ -80,8 +87,10 @@ ENTRY(__get_user_8) | |||
80 | GET_THREAD_INFO(%_ASM_DX) | 87 | GET_THREAD_INFO(%_ASM_DX) |
81 | cmp TI_addr_limit(%_ASM_DX),%_ASM_AX | 88 | cmp TI_addr_limit(%_ASM_DX),%_ASM_AX |
82 | jae bad_get_user | 89 | jae bad_get_user |
90 | ASM_STAC | ||
83 | 4: movq -7(%_ASM_AX),%_ASM_DX | 91 | 4: movq -7(%_ASM_AX),%_ASM_DX |
84 | xor %eax,%eax | 92 | xor %eax,%eax |
93 | ASM_CLAC | ||
85 | ret | 94 | ret |
86 | CFI_ENDPROC | 95 | CFI_ENDPROC |
87 | ENDPROC(__get_user_8) | 96 | ENDPROC(__get_user_8) |
@@ -91,6 +100,7 @@ bad_get_user: | |||
91 | CFI_STARTPROC | 100 | CFI_STARTPROC |
92 | xor %edx,%edx | 101 | xor %edx,%edx |
93 | mov $(-EFAULT),%_ASM_AX | 102 | mov $(-EFAULT),%_ASM_AX |
103 | ASM_CLAC | ||
94 | ret | 104 | ret |
95 | CFI_ENDPROC | 105 | CFI_ENDPROC |
96 | END(bad_get_user) | 106 | END(bad_get_user) |