From: Frank Cornelis <fcorneli@elis.rug.ac.be>
To: <linux-kernel@vger.kernel.org>
Subject: Weird __put_user_asm behavior
Date: Mon, 24 Dec 2001 14:53:08 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.33.0112241436140.12067-100000@trappist.elis.rug.ac.be> (raw)
Hi,
I already posted this question 2 times on this mailing list under the
subject 'Help on __put_user_asm' but seems like the mailing software
doesn't like such subjects (or the person behind it:).
So here it goes: when I patch the macro in include/asm-i386/uaccess.h
named __put_user_asm using the patch below I cannot 'strace ls' anymore.
The ld.so runtime linker just stops when preparing the program displaying
a nice message; the same message as '/lib/ld-linux.so.2' generates when
ran without any parameters.
The kernel messages of __put_user_asm go to: 0xbffffb44; then the program
stops on the ld.so message.
But, 'strace'-ing of a static compiled program does the job as expected.
What am I doing wrong?
Thanks in advance,
Frank
--- linux-2.4.17/include/asm-i386/uaccess.h Sat Dec 22 09:35:17 2001
+++ linux/include/asm-i386/uaccess.h Mon Dec 24 12:43:22 2001
@@ -194,6 +194,10 @@
* aliasing issues.
*/
#define __put_user_asm(x, addr, err, itype, rtype, ltype) \
+do { \
+ if (current->ptrace & PT_PTRACED) { \
+ printk(KERN_DEBUG "__put_user_asm: %#x\n", (unsigned long)(addr)); \
+ } \
__asm__ __volatile__( \
"1: mov"itype" %"rtype"1,%2\n" \
"2:\n" \
@@ -206,7 +210,8 @@
" .long 1b,3b\n" \
".previous" \
: "=r"(err) \
- : ltype (x), "m"(__m(addr)), "i"(-EFAULT), "0"(err))
+ : ltype (x), "m"(__m(addr)), "i"(-EFAULT), "0"(err)); \
+} while (0)
#define __get_user_nocheck(x,ptr,size) \
next reply other threads:[~2001-12-24 13:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-24 13:53 Frank Cornelis [this message]
[not found] <01122416414400.02578@manta>
2001-12-26 10:42 ` Weird __put_user_asm behavior Frank Cornelis
2001-12-26 10:50 alad
2001-12-26 12:21 Manfred Spraul
2001-12-26 19:22 ` Frank Cornelis
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=Pine.LNX.4.33.0112241436140.12067-100000@trappist.elis.rug.ac.be \
--to=fcorneli@elis.rug.ac.be \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).