From patchwork Thu Feb 4 16:01:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin LaHaise X-Patchwork-Id: 8224871 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DD8EDBEEE5 for ; Thu, 4 Feb 2016 16:03:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D89D2039E for ; Thu, 4 Feb 2016 16:03:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0798A202F8 for ; Thu, 4 Feb 2016 16:03:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRMLV-0004aB-95; Thu, 04 Feb 2016 16:01:25 +0000 Received: from kanga.kvack.org ([205.233.56.17]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRMLS-0004Vk-4I for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2016 16:01:22 +0000 Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C77C4403D8; Thu, 4 Feb 2016 11:01:01 -0500 (EST) Date: Thu, 4 Feb 2016 11:01:01 -0500 From: Benjamin LaHaise To: Russell King - ARM Linux Subject: Re: linux-next: build failure after merge of the aio tree Message-ID: <20160204160101.GD16315@kvack.org> References: <20160127134024.0fababf6@canb.auug.org.au> <20160129113056.GP10826@n2100.arm.linux.org.uk> <20160204131959.6695c7bf@canb.auug.org.au> <20160204134142.GA16315@kvack.org> <20160204135056.GE10826@n2100.arm.linux.org.uk> <20160204140822.GB16315@kvack.org> <20160204141253.GF10826@n2100.arm.linux.org.uk> <20160204143204.GC16315@kvack.org> <20160204143907.GG10826@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160204143907.GG10826@n2100.arm.linux.org.uk> User-Agent: Mutt/1.4.2.2i X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160204_080122_251262_E2B73A02 X-CRM114-Status: GOOD ( 10.01 ) X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Rothwell , Linux-Next , Geert Uytterhoeven , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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) \