mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jike Song <albcamus@gmail.com>
To: hpa@zytor.com
Cc: linux-kernel@vger.kernel.org, Jike Song <albcamus@gmail.com>
Subject: [PATCH] x86: add missed clobber for 32-bit memmove
Date: Fri, 17 Oct 2008 21:15:53 +0800	[thread overview]
Message-ID: <1224249353-3032-2-git-send-email-albcamus@gmail.com> (raw)
In-Reply-To: <1224249353-3032-1-git-send-email-albcamus@gmail.com>

memmove() is implemented by inline assembly. It calls std at first
and cld at last, but EFLAGS still should be clobbered.

Signed-off-by: Jike Song <albcamus@gmail.com>
---
 arch/x86/lib/memcpy_32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lib/memcpy_32.c b/arch/x86/lib/memcpy_32.c
index 5415a9d..99a8240 100644
--- a/arch/x86/lib/memcpy_32.c
+++ b/arch/x86/lib/memcpy_32.c
@@ -36,7 +36,7 @@ void *memmove(void *dest, const void *src, size_t n)
 			:"0" (n),
 			 "1" (n-1+src),
 			 "2" (n-1+dest)
-			:"memory");
+			:"cc", "memory");
 	}
 	return dest;
 }
-- 
1.6.0.1


  reply	other threads:[~2008-10-17 13:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-17 13:15 Jike Song
2008-10-17 13:15 ` Jike Song [this message]
2008-10-17 15:55   ` Jeremy Fitzhardinge
2008-10-17 16:35   ` H. Peter Anvin
2008-10-20  6:44     ` Jike Song

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=1224249353-3032-2-git-send-email-albcamus@gmail.com \
    --to=albcamus@gmail.com \
    --cc=hpa@zytor.com \
    --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

Powered by JetHome