lkml.org 
[lkml]   [2003]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] stop even more macros for comverting compat pointers
Hi Linus, Andi,

Just want to nip this in the bud :-)

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff -ruN 2.5.66-032708-32bit.1/arch/x86_64/ia32/sys_ia32.c 2.5.66-032708-32bit.3/arch/x86_64/ia32/sys_ia32.c
--- 2.5.66-032708-32bit.1/arch/x86_64/ia32/sys_ia32.c 2003-03-27 11:23:03.000000000 +1100
+++ 2.5.66-032708-32bit.3/arch/x86_64/ia32/sys_ia32.c 2003-03-28 17:21:54.000000000 +1100
@@ -75,7 +75,6 @@

#define A(__x) ((unsigned long)(__x))
#define AA(__x) ((unsigned long)(__x))
-#define u32_to_ptr(x) ((void *)(u64)(x))
#define ROUND_UP(x,a) ((__typeof__(x))(((unsigned long)(x) + ((a) - 1)) & ~((a) - 1)))
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de)))

@@ -2091,7 +2090,7 @@
}

asmlinkage long sys32_io_submit(aio_context_t ctx_id, int nr,
- u32 *iocbpp)
+ compat_uptr_t *iocbpp)
{
struct kioctx *ctx;
long ret = 0;
@@ -2110,14 +2109,14 @@
}

for (i=0; i<nr; i++) {
- u32 p32;
+ compat_uptr_t p32;
struct iocb *user_iocb, tmp;

if (unlikely(__get_user(p32, iocbpp + i))) {
ret = -EFAULT;
break;
- }
- user_iocb = u32_to_ptr(p32);
+ }
+ user_iocb = compat_ptr(p32);

if (unlikely(copy_from_user(&tmp, user_iocb, sizeof(tmp)))) {
ret = -EFAULT;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.115 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site