lkml.org 
[lkml]   [2003]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: copy_from_user broken on i386 since 2.5.57
On Wed, 22 Jan 2003, Andrew Morton wrote:

> Brice Goglin <bgoglin@ens-lyon.fr> wrote:
> >
> > Hi,
> >
> > Trying to compile a very very simple module for 2.5,
> > I got an error from gcc saying that assembly code
> > is incorrect.
> > This problem appeared in 2.5.57 and is still here
> > in 2.5.59.
> > I only tried on i386.
> >
> > Here's a very simple example code :
> >
> > #define __KERNEL__
> > #define MODULE
> > #include "linux/module.h"
> > #include "asm/uaccess.h"
> >
> > int func(void *to, const void *from) {
> > return __copy_from_user(to, from, 1);
> > }
> >
> >
> > Here's gcc report :
> >
> > mp760:~/tmp% gcc user.c -c -o user.o -Ipath_to_2.5.57/include
> > /tmp/cceAbcRd.s: Assembler messages:
> > /tmp/cceAbcRd.s:120: Error: `%al' not allowed with `movl'
> > /tmp/cceAbcRd.s:124: Error: `%al' not allowed with `xorl'
> > /tmp/cceAbcRd.s:209: Warning: using `%eax' instead of `%ax' due to `l' suffix
> > /tmp/cceAbcRd.s:213: Warning: using `%eax' instead of `%ax' due to `l' suffix
> > /tmp/cceAbcRd.s:213: Warning: using `%eax' instead of `%ax' due to `l' suffix
>
> Add `-O2' to the compiler switches.
>
> No, I don't know either ;)

So, does this actually fix the problem or simply optimize the suspect code
out of existance until some later date?

--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

-
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:32    [W:0.045 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site