git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
include
/
asm-m68k
/
uaccess.h
diff --git
a/include/asm-m68k/uaccess.h
b/include/asm-m68k/uaccess.h
index
605e6cb
..
2ffd87b
100644
(file)
--- a/
include/asm-m68k/uaccess.h
+++ b/
include/asm-m68k/uaccess.h
@@
-14,12
+14,6
@@
/* We let the MMU do all checking */
#define access_ok(type,addr,size) 1
/* We let the MMU do all checking */
#define access_ok(type,addr,size) 1
-/* this function will go away soon - use access_ok() instead */
-static inline int __deprecated verify_area(int type, const void *addr, unsigned long size)
-{
- return access_ok(type,addr,size) ? 0 : -EFAULT;
-}
-
/*
* The exception table consists of pairs of addresses: the first is the
* address of an instruction that is allowed to fault, and the second is
/*
* The exception table consists of pairs of addresses: the first is the
* address of an instruction that is allowed to fault, and the second is
@@
-48,6
+42,7
@@
struct exception_table_entry
({ \
int __pu_err; \
typeof(*(ptr)) __pu_val = (x); \
({ \
int __pu_err; \
typeof(*(ptr)) __pu_val = (x); \
+ __chk_user_ptr(ptr); \
switch (sizeof (*(ptr))) { \
case 1: \
__put_user_asm(__pu_err, __pu_val, ptr, b); \
switch (sizeof (*(ptr))) { \
case 1: \
__put_user_asm(__pu_err, __pu_val, ptr, b); \
@@
-97,6
+92,7
@@
__asm__ __volatile__ \
({ \
int __gu_err; \
typeof(*(ptr)) __gu_val; \
({ \
int __gu_err; \
typeof(*(ptr)) __gu_val; \
+ __chk_user_ptr(ptr); \
switch (sizeof(*(ptr))) { \
case 1: \
__get_user_asm(__gu_err, __gu_val, ptr, b, "=d"); \
switch (sizeof(*(ptr))) { \
case 1: \
__get_user_asm(__gu_err, __gu_val, ptr, b, "=d"); \
@@
-111,7
+107,7
@@
__asm__ __volatile__ \
__gu_err = __constant_copy_from_user(&__gu_val, ptr, 8); \
break; \
default: \
__gu_err = __constant_copy_from_user(&__gu_val, ptr, 8); \
break; \
default: \
- __gu_val =
0;
\
+ __gu_val =
(typeof(*(ptr)))0;
\
__gu_err = __get_user_bad(); \
break; \
} \
__gu_err = __get_user_bad(); \
break; \
} \
@@
-140,7
+136,7
@@
__asm__ __volatile__ \
: "m"(*(ptr)), "i" (-EFAULT), "0"(0))
static inline unsigned long
: "m"(*(ptr)), "i" (-EFAULT), "0"(0))
static inline unsigned long
-__generic_copy_from_user(void *to, const void *from, unsigned long n)
+__generic_copy_from_user(void *to, const void
__user
*from, unsigned long n)
{
unsigned long tmp;
__asm__ __volatile__
{
unsigned long tmp;
__asm__ __volatile__
@@
-195,7
+191,7
@@
__generic_copy_from_user(void *to, const void *from, unsigned long n)
}
static inline unsigned long
}
static inline unsigned long
-__generic_copy_to_user(void *to, const void *from, unsigned long n)
+__generic_copy_to_user(void
__user
*to, const void *from, unsigned long n)
{
unsigned long tmp;
__asm__ __volatile__
{
unsigned long tmp;
__asm__ __volatile__
@@
-270,7
+266,7
@@
__generic_copy_to_user(void *to, const void *from, unsigned long n)
: "d0", "memory")
static inline unsigned long
: "d0", "memory")
static inline unsigned long
-__constant_copy_from_user(void *to, const void *from, unsigned long n)
+__constant_copy_from_user(void *to, const void
__user
*from, unsigned long n)
{
switch (n) {
case 0:
{
switch (n) {
case 0:
@@
-526,7
+522,7
@@
__constant_copy_from_user(void *to, const void *from, unsigned long n)
#define __copy_from_user_inatomic __copy_from_user
static inline unsigned long
#define __copy_from_user_inatomic __copy_from_user
static inline unsigned long
-__constant_copy_to_user(void *to, const void *from, unsigned long n)
+__constant_copy_to_user(void
__user
*to, const void *from, unsigned long n)
{
switch (n) {
case 0:
{
switch (n) {
case 0:
@@
-772,7
+768,7
@@
__constant_copy_to_user(void *to, const void *from, unsigned long n)
*/
static inline long
*/
static inline long
-strncpy_from_user(char *dst, const char *src, long count)
+strncpy_from_user(char *dst, const char
__user
*src, long count)
{
long res;
if (count == 0) return count;
{
long res;
if (count == 0) return count;
@@
-805,11
+801,11
@@
strncpy_from_user(char *dst, const char *src, long count)
*
* Return 0 on exception, a value greater than N if too long
*/
*
* Return 0 on exception, a value greater than N if too long
*/
-static inline long strnlen_user(const char *src, long n)
+static inline long strnlen_user(const char
__user
*src, long n)
{
long res;
{
long res;
- res = -(long)src;
+ res = -(
unsigned
long)src;
__asm__ __volatile__
("1:\n"
" tstl %2\n"
__asm__ __volatile__
("1:\n"
" tstl %2\n"
@@
-848,7
+844,7
@@
static inline long strnlen_user(const char *src, long n)
*/
static inline unsigned long
*/
static inline unsigned long
-clear_user(void *to, unsigned long n)
+clear_user(void
__user
*to, unsigned long n)
{
__asm__ __volatile__
(" tstl %1\n"
{
__asm__ __volatile__
(" tstl %1\n"