From: "Jan Beulich" <JBeulich@novell.com>
To: <mingo@elte.hu>, <tglx@linutronix.de>, <hpa@zytor.com>
Cc: "Andi Kleen" <andi@firstfloor.org>, <v.mayatskih@gmail.com>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH] x86-64: __copy_from_user_inatomic() adjustments
Date: Fri, 13 Nov 2009 11:56:24 +0000 [thread overview]
Message-ID: <4AFD5778020000780001F8F4@vpn.id2.novell.com> (raw)
Commit ad2fc2cd925300b8127cf682f5a1c7511ae9dd27 rendered
__copy_from_user_inatomic() identical to copy_user_generic(), yet
didn't make the former just call the latter from an inline function.
Commit b885808e185a4ec2dfe16c84434f79e95f0245b0 converted the return
type of __copy_to_user_inatomic() from unsigned long to int, but didn't
do the same to __copy_from_user_inatomic()
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Vitaly Mayatskikh <v.mayatskih@gmail.com>
---
arch/x86/include/asm/uaccess_64.h | 7 +++++--
arch/x86/kernel/x8664_ksyms_64.c | 1 -
arch/x86/lib/copy_user_64.S | 6 ------
3 files changed, 5 insertions(+), 9 deletions(-)
--- linux-2.6.32-rc7/arch/x86/include/asm/uaccess_64.h 2009-09-10 00:13:59.000000000 +0200
+++ 2.6.32-rc7-x86_64-copy_from_user_inatomic/arch/x86/include/asm/uaccess_64.h 2009-11-10 13:54:10.000000000 +0100
@@ -176,8 +176,11 @@ __must_check long strlen_user(const char
__must_check unsigned long clear_user(void __user *mem, unsigned long len);
__must_check unsigned long __clear_user(void __user *mem, unsigned long len);
-__must_check long __copy_from_user_inatomic(void *dst, const void __user *src,
- unsigned size);
+static __must_check __always_inline int
+__copy_from_user_inatomic(void *dst, const void __user *src, unsigned size)
+{
+ return copy_user_generic(dst, (__force const void *)src, size);
+}
static __must_check __always_inline int
__copy_to_user_inatomic(void __user *dst, const void *src, unsigned size)
--- linux-2.6.32-rc7/arch/x86/kernel/x8664_ksyms_64.c 2009-06-10 05:05:27.000000000 +0200
+++ 2.6.32-rc7-x86_64-copy_from_user_inatomic/arch/x86/kernel/x8664_ksyms_64.c 2009-11-10 12:47:22.000000000 +0100
@@ -32,7 +32,6 @@ EXPORT_SYMBOL(copy_user_generic);
EXPORT_SYMBOL(__copy_user_nocache);
EXPORT_SYMBOL(copy_from_user);
EXPORT_SYMBOL(copy_to_user);
-EXPORT_SYMBOL(__copy_from_user_inatomic);
EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(clear_page);
--- linux-2.6.32-rc7/arch/x86/lib/copy_user_64.S 2009-09-10 00:13:59.000000000 +0200
+++ 2.6.32-rc7-x86_64-copy_from_user_inatomic/arch/x86/lib/copy_user_64.S 2009-11-10 12:43:14.000000000 +0100
@@ -96,12 +96,6 @@ ENTRY(copy_user_generic)
CFI_ENDPROC
ENDPROC(copy_user_generic)
-ENTRY(__copy_from_user_inatomic)
- CFI_STARTPROC
- ALTERNATIVE_JUMP X86_FEATURE_REP_GOOD,copy_user_generic_unrolled,copy_user_generic_string
- CFI_ENDPROC
-ENDPROC(__copy_from_user_inatomic)
-
.section .fixup,"ax"
/* must zero dest */
ENTRY(bad_from_user)
next reply other threads:[~2009-11-13 11:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 11:56 Jan Beulich [this message]
2009-11-15 10:28 ` [tip:x86/asm] " tip-bot for Jan Beulich
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=4AFD5778020000780001F8F4@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=v.mayatskih@gmail.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
all inboxes | Powered by JetHome®