diff options
Diffstat (limited to 'arch/x86_64/lib/usercopy.c')
-rw-r--r-- | arch/x86_64/lib/usercopy.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86_64/lib/usercopy.c b/arch/x86_64/lib/usercopy.c index 9bc2c295818e..a82bfacdb1af 100644 --- a/arch/x86_64/lib/usercopy.c +++ b/arch/x86_64/lib/usercopy.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * Copyright 1997 Linus Torvalds | 5 | * Copyright 1997 Linus Torvalds |
6 | * Copyright 2002 Andi Kleen <ak@suse.de> | 6 | * Copyright 2002 Andi Kleen <ak@suse.de> |
7 | */ | 7 | */ |
8 | #include <linux/module.h> | ||
8 | #include <asm/uaccess.h> | 9 | #include <asm/uaccess.h> |
9 | 10 | ||
10 | /* | 11 | /* |
@@ -47,6 +48,7 @@ __strncpy_from_user(char *dst, const char __user *src, long count) | |||
47 | __do_strncpy_from_user(dst, src, count, res); | 48 | __do_strncpy_from_user(dst, src, count, res); |
48 | return res; | 49 | return res; |
49 | } | 50 | } |
51 | EXPORT_SYMBOL(__strncpy_from_user); | ||
50 | 52 | ||
51 | long | 53 | long |
52 | strncpy_from_user(char *dst, const char __user *src, long count) | 54 | strncpy_from_user(char *dst, const char __user *src, long count) |
@@ -56,6 +58,7 @@ strncpy_from_user(char *dst, const char __user *src, long count) | |||
56 | __do_strncpy_from_user(dst, src, count, res); | 58 | __do_strncpy_from_user(dst, src, count, res); |
57 | return res; | 59 | return res; |
58 | } | 60 | } |
61 | EXPORT_SYMBOL(strncpy_from_user); | ||
59 | 62 | ||
60 | /* | 63 | /* |
61 | * Zero Userspace | 64 | * Zero Userspace |
@@ -94,7 +97,7 @@ unsigned long __clear_user(void __user *addr, unsigned long size) | |||
94 | [zero] "r" (0UL), [eight] "r" (8UL)); | 97 | [zero] "r" (0UL), [eight] "r" (8UL)); |
95 | return size; | 98 | return size; |
96 | } | 99 | } |
97 | 100 | EXPORT_SYMBOL(__clear_user); | |
98 | 101 | ||
99 | unsigned long clear_user(void __user *to, unsigned long n) | 102 | unsigned long clear_user(void __user *to, unsigned long n) |
100 | { | 103 | { |
@@ -102,6 +105,7 @@ unsigned long clear_user(void __user *to, unsigned long n) | |||
102 | return __clear_user(to, n); | 105 | return __clear_user(to, n); |
103 | return n; | 106 | return n; |
104 | } | 107 | } |
108 | EXPORT_SYMBOL(clear_user); | ||
105 | 109 | ||
106 | /* | 110 | /* |
107 | * Return the size of a string (including the ending 0) | 111 | * Return the size of a string (including the ending 0) |
@@ -125,6 +129,7 @@ long __strnlen_user(const char __user *s, long n) | |||
125 | s++; | 129 | s++; |
126 | } | 130 | } |
127 | } | 131 | } |
132 | EXPORT_SYMBOL(__strnlen_user); | ||
128 | 133 | ||
129 | long strnlen_user(const char __user *s, long n) | 134 | long strnlen_user(const char __user *s, long n) |
130 | { | 135 | { |
@@ -132,6 +137,7 @@ long strnlen_user(const char __user *s, long n) | |||
132 | return 0; | 137 | return 0; |
133 | return __strnlen_user(s, n); | 138 | return __strnlen_user(s, n); |
134 | } | 139 | } |
140 | EXPORT_SYMBOL(strnlen_user); | ||
135 | 141 | ||
136 | long strlen_user(const char __user *s) | 142 | long strlen_user(const char __user *s) |
137 | { | 143 | { |
@@ -147,6 +153,7 @@ long strlen_user(const char __user *s) | |||
147 | s++; | 153 | s++; |
148 | } | 154 | } |
149 | } | 155 | } |
156 | EXPORT_SYMBOL(strlen_user); | ||
150 | 157 | ||
151 | unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len) | 158 | unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len) |
152 | { | 159 | { |
@@ -155,3 +162,5 @@ unsigned long copy_in_user(void __user *to, const void __user *from, unsigned le | |||
155 | } | 162 | } |
156 | return len; | 163 | return len; |
157 | } | 164 | } |
165 | EXPORT_SYMBOL(copy_in_user); | ||
166 | |||