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=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 51984C00A89 for ; Mon, 2 Nov 2020 10:15:44 +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 D0DE22225E for ; Mon, 2 Nov 2020 10:15:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="0mTTVmr5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0DE22225E 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=3bYEEgUp/gyhyLQF7SoQROSICm/bZZMmR1lgMMsGPTw=; b=0mTTVmr5ieywKLvjaPWl9RDQ7 cIDbk2EEZeSCru661yFe/4cRJrkpJjpkcK1CBmo/3Kx9VpVISQft/qYW1PtVx3Z/vgdXVHeKF+CAb Ilexdq/VzChNqNZyHAbRQIBuNlLyzlp9W/h/U5ZsrK8ByhH9c5dtSG+xe5Zh9BNYTue2HgZNNyaLh Q2lkl10H0ipwKMwiKJ2WFCaBYDYdcjDwM2EDij4UmCToMKgqfeEVLJ22LdyONlRPV2TkJMhy/fLAn lwX4m9RI3KlYfWG6NE9EFfbLJ0jkk2OfUY6QmnrAhX1BlhHAQ7BqPh4T4B+b9EjybVriSVBfKiOWj kGcAE2mmQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZWrM-0008SY-3h; Mon, 02 Nov 2020 10:14:44 +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 1kZWr8-0008CO-WD for linux-arm-kernel@lists.infradead.org; Mon, 02 Nov 2020 10:14:35 +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 AA2B4101E; Mon, 2 Nov 2020 02:14:22 -0800 (PST) Received: from C02TD0UTHF1T.local (unknown [10.57.54.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6BF8E3F719; Mon, 2 Nov 2020 02:14:21 -0800 (PST) Date: Mon, 2 Nov 2020 10:14:15 +0000 From: Mark Rutland To: Robin Murphy Subject: Re: [PATCHv3 10/17] arm64: uaccess: simplify __copy_user_flushcache() Message-ID: <20201102101415.GA71783@C02TD0UTHF1T.local> References: <20201026133156.44186-1-mark.rutland@arm.com> <20201026133156.44186-11-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201102_051431_230046_2EE7370C X-CRM114-Status: GOOD ( 21.55 ) 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, james.morse@arm.com, hch@lst.de, linux-arm-kernel@lists.infradead.org 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 Tue, Oct 27, 2020 at 05:33:31PM +0000, Robin Murphy wrote: > On 2020-10-26 13:31, Mark Rutland wrote: > > Currently __copy_user_flushcache() open-codes raw_copy_from_user(), and > > doesn't use uaccess_mask_ptr() on the user address. Let's have it call > > raw_copy_from_user(), which is both a simplification and ensures that > > user pointers are masked under speculation. > > I think this originally stems from the fact that "raw_*" were merely generic > aliases for "__arch_*" at the time. Then whichever chump subsequently > implemented uaccess_mask_ptr() for arm64 clearly did a terrible job... ;) :) > > There should be no functional change as a result of this patch. > > Reviewed-by: Robin Murphy Thanks! Mark. > > > Signed-off-by: Mark Rutland > > Cc: Catalin Marinas > > Cc: Christoph Hellwig > > Cc: Robin Murphy > > Cc: Will Deacon > > --- > > arch/arm64/lib/uaccess_flushcache.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/arch/arm64/lib/uaccess_flushcache.c b/arch/arm64/lib/uaccess_flushcache.c > > index bfa30b75b2b8e..c83bb5a4aad2c 100644 > > --- a/arch/arm64/lib/uaccess_flushcache.c > > +++ b/arch/arm64/lib/uaccess_flushcache.c > > @@ -30,9 +30,7 @@ unsigned long __copy_user_flushcache(void *to, const void __user *from, > > { > > unsigned long rc; > > - uaccess_enable_not_uao(); > > - rc = __arch_copy_from_user(to, from, n); > > - uaccess_disable_not_uao(); > > + rc = raw_copy_from_user(to, from, n); > > /* See above */ > > __clean_dcache_area_pop(to, n - rc); > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel