Re: Serious bug in uaccess.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 27, 2001 at 03:40:11PM +0100, Fabrice Bellard wrote:

> #define copy_from_user(to,from,n) ({ \
> 	register void *__cu_to asm("$4"); \
> 	register const void *__cu_from asm("$5"); \
> 	register long __cu_len asm("$6"); \
> 	\
> 	__cu_to = (to); \
> 	__cu_from = (from); \
> 	__cu_len = (n); \
> 	if (access_ok(VERIFY_READ, __cu_from, __cu_len)) \
> 		__asm__ __volatile__( \
> 			".set\tnoreorder\n\t" \
> 			__MODULE_JAL(__copy_user) \
> ...
> 
> But I am not sure that it is always correct. Any idea ?

While this should be correct - it was my original attempt also - it was
misscompiled by whatever C compiler I was using at that time.  If
egcs 1.1.2 and gcc 2.95 both compile this construct right now then I'd
say go for it.

  Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux