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 8C0F7C32771 for ; Mon, 26 Sep 2022 14:16:32 +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=59bDxHV7SUKRolZG8i/riURwx1ZRU2MiqCckn2bT/gQ=; b=pbgrNQSiYpsCqt 01VQQC0j2nf8z01Erm6JSSzeA0gwYYsz3782yV3kgcELOHP8BbFP2i51Q6jXyFV3LFhHWM5kLjwWx AfEo6jnYP0rITxjNOENjJsiANbX4exTvOFEmfV0ORXzTfCYJ3tCLp5/HIPyiZwmNUyXMLZxdP6q5c mxCGBCjLVdL80ZBxYwfOZee5b7lo/WUG3fYhHgvWFN6jH74wl7+WNZonAAhJgbERsy3MZgS8eOTAb eEACmg49HuRoS1RLm9VJ8xpqN2ueSK80glzHZJH3OmB+68MG6BmPnEnNRKmVgNs16xyQ05OLRDoSe 6162seZJZ+tyCWxSdLzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ocotJ-005K31-5f; Mon, 26 Sep 2022 14:15:25 +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 1ocotE-005K0d-L9 for linux-arm-kernel@lists.infradead.org; Mon, 26 Sep 2022 14:15:23 +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=rhmwAa3yjvJEAtWrZIFUSXTAZj6LNMHdXMY1MRcUVwo=; b=Xxmx7kKKB1tsGVdyE48THLkO4x giNesbp2ujEN48oFnmeyCreegaQ6+m4bIzQ1+Gre4+NYFBroVLvqMwLxEF60nUxgaWrHDUglzVrrS 8rmzuFiP0mVuO632RfDCzMxbFJjg2D3gAPva2VStpYlrbcSgxGy1PLKhhxj9C8xkSIxXArN1hIjZE 6kJuQHBEDbN1lZpY7IiR6ddxf8NedRp2t49xIM+9LexIROQL4jlDsYxk5t5dcspoa54SZWwGzgYuf tR2fr9MhEv19cjgNfDhBqvf4y0uVJDA+9kx2fVnH443+9AEx3BIJBgwLUtG9VVXYHdzO++V9VTc2f ZHRg56PQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34500) 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 1ocot7-0000cH-SW; Mon, 26 Sep 2022 15:15:13 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1ocot3-0005CR-Fg; Mon, 26 Sep 2022 15:15:09 +0100 Date: Mon, 26 Sep 2022 15:15:09 +0100 From: "Russell King (Oracle)" To: Kefeng Wang Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ARM: mm: Provide better fault message for permission fault Message-ID: References: <20220919103845.100809-1-wangkefeng.wang@huawei.com> <6fc308aa-a0ac-3f0e-b484-352512ad6793@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6fc308aa-a0ac-3f0e-b484-352512ad6793@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220926_071520_746145_ED2F397C X-CRM114-Status: GOOD ( 16.69 ) 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 Mon, Sep 26, 2022 at 09:26:50PM +0800, Kefeng Wang wrote: > > On 2022/9/26 18:13, Russell King (Oracle) wrote: > > On Mon, Sep 19, 2022 at 06:38:45PM +0800, Kefeng Wang wrote: > > > If there is a permission fault in __do_kernel_fault(), we only > > > print the generic "paging request" message which don't show > > > read, write or excute information, let's provide better fault > > > message for them. > > I don't like this change. With CPUs that do not have the ability to > > relocate the vectors to 0xffff0000, the vectors live at address 0, > > so NULL pointer dereferences can produce permission faults. > The __do_user_fault(), do_DataAbort() and do_PrefetchAbort() shows > the FSR when printing, we could do it in die_kernel_fault(), and > which will be easy for us to check whether the page fault is permision > fault, We print the hex value already in the oops: Internal error: Oops: (fsr hex value) [#num] ... -- 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