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.6 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,USER_AGENT_SANE_1 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 95F17C4708F for ; Wed, 2 Jun 2021 16:01:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 69D2D6157F for ; Wed, 2 Jun 2021 16:01:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69D2D6157F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk 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=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=lh/7eX0NzGAIBZD6sKhn+OQBSVSvmiD7eIc5OdM+1qM=; b=dW5/MFs64WqflD +MG6rDaZcA1jYP/inG+7l3feeRr4G9WIldyxo+LJ9C5jYMRl4axugVZCySNvOJUDPUYBt7e4AzMcq 6o8bwAi0IMUqlhQFdhAZBKB1UxVw1+/xdtdD2qYr7yHS6qfR9lKzdtgFEMgMtaSS85FPI5C9+VktR pBm2l/89Rp2nhEyAz7DUBWriySUMpNBFkBcCknImErb8EHFJy8SXsniBflI/5zjXGZPxI9XJid/Ta Qpx3F8igBdiIIkiTClb1l+7IP93Y9sF66tEw1EJemtrjbnJ58mdhYlHXQApyj0z+wilOreFcyQ+JQ Qb1dXbJOT/z/AAbrcShg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1loTHk-004ymv-NG; Wed, 02 Jun 2021 16:00:01 +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 1loTGd-004y3H-5V for linux-arm-kernel@lists.infradead.org; Wed, 02 Jun 2021 15:58:52 +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-Transfer-Encoding:Content-Type: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-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xE3+bSp5Uq0gZUInDE6RsIp0ZZwW4TKitUfgOu4xU6o=; b=0dBsKgvLd8j9MEogNOQasu51H f0UAVkQZNLu3Zwid7ejnCBZPonLqsFVB9IUiyzI/s7Ncg6kxw6MnHxY+kt6upYfDIKTpP/3HY+zkb XBPEd+gfR+n5+uaMTiRPj2qZ2tpVKnDDCowmsf7aOIBec2sTo8lyJ7jLU63+BCGsXZWImuJlwDAcg RtZGoyS1pUlR/jBv9ejYJCUlh0LVP40euTM4/73VMihvO3QTiWPrrEj1iUSc7R4v1q2j3+BZbtbyu SGorxmNi3W495y8aSOdVwHWkf1aKK8AwbsSbj83i82ant6V9yb8N7eIXHqD0HLJo+f/VoVtKAAVdC lmoZj+1kA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44634) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1loTGY-0001TQ-OH; Wed, 02 Jun 2021 16:58:46 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1loTGV-0001Fi-DN; Wed, 02 Jun 2021 16:58:43 +0100 Date: Wed, 2 Jun 2021 16:58:43 +0100 From: "Russell King (Oracle)" To: Kefeng Wang Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , linux-kernel@vger.kernel.org, Andrew Morton , Jungseung Lee Subject: Re: [PATCH v2 7/7] ARM: mm: Fix PXN process with LPAE feature Message-ID: <20210602155843.GN30436@shell.armlinux.org.uk> References: <20210602070246.83990-1-wangkefeng.wang@huawei.com> <20210602070246.83990-8-wangkefeng.wang@huawei.com> <20210602105255.GK30436@shell.armlinux.org.uk> <62f08378-85e7-2a07-3fd0-b287047ce1b5@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <62f08378-85e7-2a07-3fd0-b287047ce1b5@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210602_085851_267056_909715A7 X-CRM114-Status: GOOD ( 12.63 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 02, 2021 at 11:13:14PM +0800, Kefeng Wang wrote: > =A0 IFSR format when using the Short-descriptor translation table format > = > =A0=A0=A0 Domain fault =A0 =A0=A0 01001=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 Firs= t level=A0=A0 01011 =A0=A0=A0 Second level > = > =A0=A0=A0 Permission fault 01101 =A0=A0 =A0=A0=A0 =A0=A0=A0 First level= =A0=A0 01111 =A0=A0=A0 Second level > = > =A0 IFSR format when using the Long-descriptor translation table format > = > =A0=A0 0011LL Permission fault. LL bits indicate levelb. > = > After check the ARM spec, I think for the permission fault,=A0 we should = panic > with or without LPAE, will change to As I explained in one of the previous patches, the page tables that get used for mapping kernel space are the _tasks_ own page tables. Any new kernel mappings are lazily copied to the task page tables - such as when a module is loaded. The first time we touch a page, we could end up with a page translation fault. This will call do_page_fault(), and so with your proposal, loading a module will potentially cause a kernel panic in this case, probably leading to systems that panic early during userspace boot. -- = 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