From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] [PATCH] x86: Fix miscompile of strncopy_from_user
Date: Wed, 18 Mar 2009 10:25:57 +0100 [thread overview]
Message-ID: <49C0BE25.6060706@domain.hid> (raw)
This merges kernel commit e0a96129db574d6365e3439d16d88517c437ab33
(x86: use early clobbers in usercopy*.c). Without, gcc 4.3 may have let
these functions return 0 even if the actual length was > 0.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
ksrc/arch/x86/usercopy_32.c | 2 +-
ksrc/arch/x86/usercopy_64.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ksrc/arch/x86/usercopy_32.c b/ksrc/arch/x86/usercopy_32.c
index 3060cc3..3bcecde 100644
--- a/ksrc/arch/x86/usercopy_32.c
+++ b/ksrc/arch/x86/usercopy_32.c
@@ -38,7 +38,7 @@ do { \
" .align 4\n" \
" .long 0b,3b\n" \
".previous" \
- : "=d"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1), \
+ : "=&d"(res), "=&c"(count), "=&a" (__d0), "=&S" (__d1), \
"=&D" (__d2) \
: "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
: "memory"); \
diff --git a/ksrc/arch/x86/usercopy_64.c b/ksrc/arch/x86/usercopy_64.c
index 1b1da41..5867483 100644
--- a/ksrc/arch/x86/usercopy_64.c
+++ b/ksrc/arch/x86/usercopy_64.c
@@ -39,7 +39,7 @@ do { \
" .align 8\n" \
" .quad 0b,3b\n" \
".previous" \
- : "=r"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1), \
+ : "=&r"(res), "=&c"(count), "=&a" (__d0), "=&S" (__d1), \
"=&D" (__d2) \
: "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
: "memory"); \
reply other threads:[~2009-03-18 9:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=49C0BE25.6060706@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.