Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1326945
| From | Benjamin LaHaise <bcrl@kvack.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: linux-next: build failure after merge of the aio tree |
| Date | 2016-02-04 17:10 +0100 |
| Message-ID | <qYuDM-4en-5@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <qYsBZ-W2-25@gated-at.bofh.it> <qYsLD-1hC-1@gated-at.bofh.it> <qYsVj-1nc-5@gated-at.bofh.it> <qYteG-3bN-11@gated-at.bofh.it> <qYteG-3bN-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Feb 04, 2016 at 02:39:07PM +0000, Russell King - ARM Linux wrote:
> However, this one should warn:
>
> int test_wrong(char **v, const char **p)
> { return __get_user(*v, p); }
>
> Good luck (I think you'll need lots of it to get a working solution)! :)
This works with your test cases on x86-32. Note that it's only compile +
link tested at present.
-ben
--
"Thought is the essence of where you are now."
diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h
index 09b1b0a..d8834c2 100644
--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -326,7 +326,21 @@ do { \
} while (0)
#ifdef CONFIG_X86_32
-#define __get_user_asm_u64(x, ptr, retval, errret) (x) = __get_user_bad()
+#define __get_user_asm_u64(x, addr, err, errret) \
+ asm volatile(ASM_STAC "\n" \
+ "1: movl %2,%%eax\n" \
+ " movl %3,%%edx\n" \
+ "2: " ASM_CLAC "\n" \
+ ".section .fixup,\"ax\"\n" \
+ "3: mov %4,%0\n" \
+ " xorl %%eax,%%eax\n" \
+ " xorl %%edx,%%edx\n" \
+ " jmp 2b\n" \
+ ".previous\n" \
+ _ASM_EXTABLE(1b, 3b) \
+ : "=r" (err), "=A"(x) \
+ : "m" (__m(addr)), "m" __m(((u32 *)addr) + 1), "i" (errret), "0" (err))
+
#define __get_user_asm_ex_u64(x, ptr) (x) = __get_user_bad()
#else
#define __get_user_asm_u64(x, ptr, retval, errret) \
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: linux-next: build failure after merge of the aio tree Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-29 12:40 +0100
Re: linux-next: build failure after merge of the aio tree Geert Uytterhoeven <geert@linux-m68k.org> - 2016-01-29 13:10 +0100
Re: linux-next: build failure after merge of the aio tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-02-04 03:30 +0100
Re: linux-next: build failure after merge of the aio tree Benjamin LaHaise <bcrl@kvack.org> - 2016-02-04 14:50 +0100
Re: linux-next: build failure after merge of the aio tree Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-02-04 15:00 +0100
Re: linux-next: build failure after merge of the aio tree Benjamin LaHaise <bcrl@kvack.org> - 2016-02-04 15:10 +0100
Re: linux-next: build failure after merge of the aio tree Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-02-04 15:20 +0100
Re: linux-next: build failure after merge of the aio tree Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-02-04 15:40 +0100
Re: linux-next: build failure after merge of the aio tree Benjamin LaHaise <bcrl@kvack.org> - 2016-02-04 17:10 +0100
Re: linux-next: build failure after merge of the aio tree Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-02-04 17:20 +0100
Re: linux-next: build failure after merge of the aio tree Benjamin LaHaise <bcrl@kvack.org> - 2016-02-04 17:30 +0100
Re: linux-next: build failure after merge of the aio tree Benjamin LaHaise <bcrl@kvack.org> - 2016-02-04 17:50 +0100
Re: linux-next: build failure after merge of the aio tree Benjamin LaHaise <bcrl@kvack.org> - 2016-02-04 19:50 +0100
Re: linux-next: build failure after merge of the aio tree Benjamin LaHaise <bcrl@kvack.org> - 2016-02-04 15:40 +0100
csiph-web