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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DEC7C433EF for ; Wed, 12 Jan 2022 18:11:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=4qg+5Ny0VJ6JLlVfteMbauDy68fcEZFeSctXhsDFGyk=; b=ZpQqI2fFX8BK8c OeP1yHrgZIc2JpVXGLtZv2zVMZJ1PxBbah0Az8ch0q0V0++mKFxkV0clgQSCn7C8VwVvJ4XZUSiIh f3Bzfi4wG0gDqyOI174OJJL9kwJmfbiK8Q+dfEvU1CyKSvGWQVb4RsLOQ5y4uASrbXTUbjRP1Ogzc C3lGC3vfdBR2SS0LBtaJaNp6tzXLGGUg9hjXBzFrIucjrBniTsKhObQDUWL3mrTTqFapTaJXEomDm 6p7C84ou4on5ejFQ0cQBz3Q+9gTe/xGd918nqQFajU8QOBErIQM9dZUwsQbux7Nm8uRx035Ba3uYM 12J/oGgVcCh9IOyM/Vcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7i4u-003Qmo-Cj; Wed, 12 Jan 2022 18:10:32 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n7i4r-003QJa-3Z for linux-arm-kernel@lists.infradead.org; Wed, 12 Jan 2022 18:10:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6La9C4YyAg08OoV/358HZSqSghTNkDUXX2vxnwT4Wyc=; b=k5WVo9XBH6g8ABPj+Q9UPZDGFz 0aExXTaFDhQJ94Za0elX1EdK7gjPU0vGnsHXpuN67EquXAOEiE2boxLVEedHcoqT/yv6pksM/g6p8 sA1Nl8sXUQzZRUFNVZe3w1ZkNXQbnXv6AEJUhORMamQhK1b3t0jtoQwohGHFESDhSc5zPmlxJw5Rw jHJgoXAvDvsSHxbzYTB55w7skpfhJUIKdLW1tt1gZpK+szCVeEM+pWLtGRl0kYMEueGTSbP4S8Cy7 lMDxCY+F5Qi/fX43i1puyxHJkQxt8bVlId4CYwLRBagnd2I8y5HsMC7UdF4hp+33Jf2y2+zXFlzdK guQt/TQA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56676) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n7i2l-0006IJ-L2; Wed, 12 Jan 2022 18:08:19 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1n7i2j-000754-Oj; Wed, 12 Jan 2022 18:08:17 +0000 Date: Wed, 12 Jan 2022 18:08:17 +0000 From: "Russell King (Oracle)" To: Daniel Thompson Cc: Arnd Bergmann , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, Alexander Viro , Linus Walleij Subject: Re: [PATCH v5 08/10] ARM: uaccess: add __{get,put}_kernel_nofault Message-ID: References: <20210726141141.2839385-1-arnd@kernel.org> <20210726141141.2839385-9-arnd@kernel.org> 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-20220112_101029_172572_6C258B6D X-CRM114-Status: GOOD ( 21.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Wed, Jan 12, 2022 at 05:29:03PM +0000, Daniel Thompson wrote: > On Mon, Jul 26, 2021 at 04:11:39PM +0200, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > These mimic the behavior of get_user and put_user, except > > for domain switching, address limit checking and handling > > of mismatched sizes, none of which are relevant here. > > > > To work with pre-Armv6 kernels, this has to avoid TUSER() > > inside of the new macros, the new approach passes the "t" > > string along with the opcode, which is a bit uglier but > > avoids duplicating more code. > > > > As there is no __get_user_asm_dword(), I work around it > > by copying 32 bit at a time, which is possible because > > the output size is known. > > > > Signed-off-by: Arnd Bergmann > > I've just been bisecting some regressions running the kgdbts tests on > arm and this patch came up. So the software PAN code is working :) The kernel attempted to access an address that is in the userspace domain (NULL pointer) and took an exception. I suppose we should handle a domain fault more gracefully - what are the required semantics if the kernel attempts a userspace access using one of the _nofault() accessors? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel