Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3486962pxj; Tue, 1 Jun 2021 06:30:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynhwj1QeiPtgkVkuR2YTbIfiFSqeY5y/2QQhSuqw//e35lu5PiVGPaiHQjoxvFgZKLh6UI X-Received: by 2002:a6b:cd08:: with SMTP id d8mr21588795iog.86.1622554212953; Tue, 01 Jun 2021 06:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622554212; cv=none; d=google.com; s=arc-20160816; b=eW6el/EGTQtBKDzAxPTan7BPqvTclPEUH3S3QJEtkE9SgrRA/6752PPSCPR8LpQEMb Ywyj/3xgG0WS4Oaa0Dqh4knYUf2JFLKYjqlEbQpFZIowB1tiIp4nm/RZGaaMJ6ZqCNJg 7LwNOq7xcI9ou7ha1y1FwLIzEuv81L+rm9+kGC5ocCz/ssdE1lV4t/FDVTNEKzoRVT1P cmDBgp4OU4BhkZhUJHTaLvgb1H9X5fsubdiFQVB2x2x+RKxCXEyyuVTU7Pm9NLRsmlaL QPj9ZFgW6JH5bGHI6WisQlmSQ4jycFRwOgcxcLGlSxjdOt32/UPQFE8mnP+NBrEJw7gC iMyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=A3jGo/F05bppPfTRBkxRy0rRsK01cZ+HjcnTOo+ZfVI=; b=o1rVSIs3Eh3aRpMhaSlSTvjAWL6+DbY5DsIWXM1QU6FeRlIAm6kos1klF8YiKDsiDt qhZOoLXRGmQFMBoGZAYob8L2fSfhfMtmiLWaKQdfIx1dA7AAcQkfIXBZpiSw+cRKqNm9 73Es7YHc8NSDWc3UK3npHfNaItvGWWDzKT/CSjST1fhoDMgZ9FjyMEnTuhzNI3FTrokD hBo42GSBg+Ys2CmAK0vC8ODy/vFCx+iyvClHDEBZNvQKDqB/9VlR7pjyuF7MQzCXYno+ 0+29I43nEz0OwjFBF683w+LYwjgJ+NFaGLbnH/asmi4G4n+h/4nVUm1+u6GCIDFvv8JS 1oeQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si18406368jan.91.2021.06.01.06.29.59; Tue, 01 Jun 2021 06:30:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233938AbhFANbM (ORCPT + 99 others); Tue, 1 Jun 2021 09:31:12 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2932 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233768AbhFANbJ (ORCPT ); Tue, 1 Jun 2021 09:31:09 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4FvXxK1bj2z68fC; Tue, 1 Jun 2021 21:26:29 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 21:29:26 +0800 Received: from [10.174.177.243] (10.174.177.243) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 1 Jun 2021 21:29:25 +0800 Subject: Re: [PATCH 0/2] ARM: fix PXN process with LPAE feature To: Russell King , CC: Catalin Marinas , , Andrew Morton , Jungseung Lee References: <20210529034138.83384-1-wangkefeng.wang@huawei.com> From: Kefeng Wang Message-ID: <09d3b1ac-01ab-ba8b-014a-8db8c58bfc45@huawei.com> Date: Tue, 1 Jun 2021 21:29:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20210529034138.83384-1-wangkefeng.wang@huawei.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/5/29 11:41, Kefeng Wang wrote: > refactor and cleanup [__do|do]_page_fault, then fix the pxn process > when lpae feature enabled. Additional information: when user code execution with privilege mode, it will lead infinite loop in the page fault handler if ARM_LPAE enabled,  the issue could be reproduced with  "echo EXEC_USERSPACE > /sys/kernel/debug/provoke-crash/DIRECT" also I could add a die_kernel_fault() (like arm64 does) to report different message in different scenes. Any comments, thanks. > > Kefeng Wang (2): > ARM: mm: Refactor __do_page_fault() > ARM: mm: Fix PXN process when ARM_LPAE enabled > > arch/arm/mm/fault.c | 78 +++++++++++++++++---------------------------- > 1 file changed, 30 insertions(+), 48 deletions(-) >