From: Andrew Morton <akpm@digeo.com>
To: Brice Goglin <bgoglin@ens-lyon.fr>
Cc: linux-kernel@vger.kernel.org, tigran@veritas.com, davej@suse.de,
hpa@zytor.com
Subject: Re: copy_from_user broken on i386 since 2.5.57
Date: Wed, 22 Jan 2003 10:49:28 -0800 [thread overview]
Message-ID: <20030122104928.769d72da.akpm@digeo.com> (raw)
In-Reply-To: <20030122183148.GB23109@ens-lyon.fr>
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 ;)
next prev parent reply other threads:[~2003-01-22 18:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-22 18:31 Brice Goglin
2003-01-22 18:49 ` Andrew Morton [this message]
2003-01-23 23:22 ` Bill Davidsen
[not found] ` <Pine.LNX.3.96.1030123182133.9688A-100000@gatekeeper.tmr.co m>
2003-01-24 3:35 ` Mike Galbraith
2003-01-22 18:50 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030122104928.769d72da.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=bgoglin@ens-lyon.fr \
--cc=davej@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tigran@veritas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome