aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/usercopy.c
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-12-24 08:47:23 +0000
committerKeir Fraser <keir@xen.org>2010-12-24 08:47:23 +0000
commit0c4ff0fb92533aff947945f3562221a83bbfb941 (patch)
tree6c87342b77718bc05e02e23841051c8aa01d6abe /xen/arch/x86/usercopy.c
parentabf60d361232f53ad3c51fab74ff3b6f084d7f8e (diff)
downloadxen-0c4ff0fb92533aff947945f3562221a83bbfb941.tar.gz
xen-0c4ff0fb92533aff947945f3562221a83bbfb941.tar.bz2
xen-0c4ff0fb92533aff947945f3562221a83bbfb941.zip
x86-64: use PC-relative exception table entries
... thus allowing to make the entries half their current size. Rather than adjusting all instances to the new layout, abstract the construction the table entries via a macro (paralleling a similar one in recent Linux). Also change the name of the section (to allow easier detection of missed cases) and merge the final resulting output sections into .data.read_mostly. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/usercopy.c')
-rw-r--r--xen/arch/x86/usercopy.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/xen/arch/x86/usercopy.c b/xen/arch/x86/usercopy.c
index 76e3abfde2..d88e635bb0 100644
--- a/xen/arch/x86/usercopy.c
+++ b/xen/arch/x86/usercopy.c
@@ -36,12 +36,9 @@ unsigned long __copy_to_user_ll(void __user *to, const void *from, unsigned n)
"3: lea 0(%3,%0,"STR(BYTES_PER_LONG)"),%0\n"
" jmp 2b\n"
".previous\n"
- ".section __ex_table,\"a\"\n"
- " "__FIXUP_ALIGN"\n"
- " "__FIXUP_WORD" 4b,5b\n"
- " "__FIXUP_WORD" 0b,3b\n"
- " "__FIXUP_WORD" 1b,2b\n"
- ".previous"
+ _ASM_EXTABLE(4b, 5b)
+ _ASM_EXTABLE(0b, 3b)
+ _ASM_EXTABLE(1b, 2b)
: "=&c" (__n), "=&D" (__d0), "=&S" (__d1), "=&r" (__d2)
: "0" (__n), "1" (to), "2" (from), "3" (__n)
: "memory" );
@@ -82,12 +79,9 @@ __copy_from_user_ll(void *to, const void __user *from, unsigned n)
" pop %0\n"
" jmp 2b\n"
".previous\n"
- ".section __ex_table,\"a\"\n"
- " "__FIXUP_ALIGN"\n"
- " "__FIXUP_WORD" 4b,5b\n"
- " "__FIXUP_WORD" 0b,3b\n"
- " "__FIXUP_WORD" 1b,6b\n"
- ".previous"
+ _ASM_EXTABLE(4b, 5b)
+ _ASM_EXTABLE(0b, 3b)
+ _ASM_EXTABLE(1b, 6b)
: "=&c" (__n), "=&D" (__d0), "=&S" (__d1), "=&r" (__d2)
: "0" (__n), "1" (to), "2" (from), "3" (__n)
: "memory" );