Commit b971018b authored by Al Viro's avatar Al Viro Committed by Linus Torvalds

[PATCH] m68k uaccess __user annotations

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4b4fcaa1
...@@ -76,7 +76,7 @@ asm volatile ("\n" \ ...@@ -76,7 +76,7 @@ asm volatile ("\n" \
break; \ break; \
case 8: \ case 8: \
{ \ { \
const void *__pu_ptr = (ptr); \ const void __user *__pu_ptr = (ptr); \
asm volatile ("\n" \ asm volatile ("\n" \
"1: moves.l %2,(%1)+\n" \ "1: moves.l %2,(%1)+\n" \
"2: moves.l %R2,(%1)\n" \ "2: moves.l %R2,(%1)\n" \
...@@ -125,7 +125,7 @@ asm volatile ("\n" \ ...@@ -125,7 +125,7 @@ asm volatile ("\n" \
" .previous" \ " .previous" \
: "+d" (res), "=&" #reg (__gu_val) \ : "+d" (res), "=&" #reg (__gu_val) \
: "m" (*(ptr)), "i" (err)); \ : "m" (*(ptr)), "i" (err)); \
(x) = (typeof(*(ptr)))(long)__gu_val; \ (x) = (typeof(*(ptr)))(unsigned long)__gu_val; \
}) })
#define __get_user(x, ptr) \ #define __get_user(x, ptr) \
...@@ -221,16 +221,16 @@ __constant_copy_from_user(void *to, const void __user *from, unsigned long n) ...@@ -221,16 +221,16 @@ __constant_copy_from_user(void *to, const void __user *from, unsigned long n)
switch (n) { switch (n) {
case 1: case 1:
__get_user_asm(res, *(u8 *)to, (u8 *)from, u8, b, d, 1); __get_user_asm(res, *(u8 *)to, (u8 __user *)from, u8, b, d, 1);
break; break;
case 2: case 2:
__get_user_asm(res, *(u16 *)to, (u16 *)from, u16, w, d, 2); __get_user_asm(res, *(u16 *)to, (u16 __user *)from, u16, w, d, 2);
break; break;
case 3: case 3:
__constant_copy_from_user_asm(res, to, from, tmp, 3, w, b,); __constant_copy_from_user_asm(res, to, from, tmp, 3, w, b,);
break; break;
case 4: case 4:
__get_user_asm(res, *(u32 *)to, (u32 *)from, u32, l, r, 4); __get_user_asm(res, *(u32 *)to, (u32 __user *)from, u32, l, r, 4);
break; break;
case 5: case 5:
__constant_copy_from_user_asm(res, to, from, tmp, 5, l, b,); __constant_copy_from_user_asm(res, to, from, tmp, 5, l, b,);
...@@ -302,16 +302,16 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n) ...@@ -302,16 +302,16 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n)
switch (n) { switch (n) {
case 1: case 1:
__put_user_asm(res, *(u8 *)from, (u8 *)to, b, d, 1); __put_user_asm(res, *(u8 *)from, (u8 __user *)to, b, d, 1);
break; break;
case 2: case 2:
__put_user_asm(res, *(u16 *)from, (u16 *)to, w, d, 2); __put_user_asm(res, *(u16 *)from, (u16 __user *)to, w, d, 2);
break; break;
case 3: case 3:
__constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,); __constant_copy_to_user_asm(res, to, from, tmp, 3, w, b,);
break; break;
case 4: case 4:
__put_user_asm(res, *(u32 *)from, (u32 *)to, l, r, 4); __put_user_asm(res, *(u32 *)from, (u32 __user *)to, l, r, 4);
break; break;
case 5: case 5:
__constant_copy_to_user_asm(res, to, from, tmp, 5, l, b,); __constant_copy_to_user_asm(res, to, from, tmp, 5, l, b,);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment