From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A88C9C64E7B for ; Tue, 1 Dec 2020 11:04:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 28975206CB for ; Tue, 1 Dec 2020 11:04:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wrP5dpDT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28975206CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Y4ItsKwbycGWcrbAX3bPpUmlq4mRCHrm6f3YyIKcaYQ=; b=wrP5dpDTOqnwNo1ivL60SSQHQ 5rukF5Pe4+I25n28X32XrPUViymg3n3X8zd0CDhVSY6tUzoLm3YL9jFwUHsKPkuIeynqgpNtA2j0X n7fejhd0fjspfhnpA1X5xsuI/gM56XceCNO0S3PVuN1KPnDsAStu8ysa/AqBfw06kO0CWLpNgdQnZ /aZlzOWWhUqzhuAR4/GfQP2aD31HnrwgZDUOKZdJXGJPl97eEjw12PT0RDFw4YOkIXQoZDaqCoW9d 4+QJpsfbM8fPthlOOaWkHnJAJRgmAg/u5SrCOGVKCvQdzfiKTPJQ0bAo389s/7MQZSfGYDd5jkH66 jR9nScZ5g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kk3Ra-0004WK-UO; Tue, 01 Dec 2020 11:03:39 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kk3RY-0004Ui-9K for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2020 11:03:37 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E146F101E; Tue, 1 Dec 2020 03:03:33 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.30.155]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 796803F718; Tue, 1 Dec 2020 03:03:32 -0800 (PST) Date: Tue, 1 Dec 2020 11:03:23 +0000 From: Mark Rutland To: James Morse Subject: Re: [PATCHv4 12/17] arm64: uaccess: split user/kernel routines Message-ID: <20201201110323.GA81672@C02TD0UTHF1T.local> References: <20201113124937.20574-1-mark.rutland@arm.com> <20201113124937.20574-13-mark.rutland@arm.com> <315fbabd-629d-e513-95f6-3d251f225779@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <315fbabd-629d-e513-95f6-3d251f225779@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201201_060336_424459_F66ED244 X-CRM114-Status: GOOD ( 15.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: catalin.marinas@arm.com, will@kernel.org, hch@lst.de, linux-arm-kernel@lists.infradead.org, robin.murphy@arm.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Nov 26, 2020 at 06:42:24PM +0000, James Morse wrote: > Hi Mark, Hi James, Thanks for the comments. I've applied most of those below, but I have one follow-up question. > On 13/11/2020 12:49, Mark Rutland wrote: > > +#define __get_mem_asm(ldr, reg, x, addr, err) \ > > ('ldr' as variable name where you need to output something other than ldr does my head in) > > > asm volatile( \ > > - "1:"ALTERNATIVE(instr " " reg "1, [%2]\n", \ > > - alt_instr " " reg "1, [%2]\n", feature) \ > > + "1: " ldr " " reg "1, [%2]\n" \ I've changed this to 'load', and used 'store' in __put_mem_asm(). [...] > > +#define __get_kernel_nofault(dst, src, type, err_label) \ > > +do { \ > > + int __gkn_err = 0; \ > > + \ > > + __raw_get_mem("ldr", *((type *)(dst)), \ > > + (__force type __user *)(src), __gkn_err); \ > > Is the __user needed as you moved __chk_user_ptr() out of __raw_get_mem() in the previous > patch? You're right; the __user portion can go as neither __raw_get_mem() or __get_mem_asm() needs that. Likewise for __put_kernel_nofault(), __raw_put_mem(), and __put_mem_asm(). I've removed those. > (your branch on kernel.org does something different here, not sure if its ahead or behind v4) AFAICT this portion of the patch is up-to-date with what's on kernel.org. I might have pushed that out-of-order with posting the series -- does this look the same now, or am I missing something? > > + if (unlikely(__gkn_err)) \ > > + goto err_label; \ > > +} while(0) I'll fix the whitespace for the while(0), too... Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel