Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753428AbdFMCAa (ORCPT ); Mon, 12 Jun 2017 22:00:30 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:8266 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753288AbdFMCA2 (ORCPT ); Mon, 12 Jun 2017 22:00:28 -0400 Subject: Re: [PATCH 0/2] arm64: fix crash when reading /proc/kcore To: Ard Biesheuvel , References: <20170608194139.9250-1-ard.biesheuvel@linaro.org> CC: , , , , , , From: Tan Xiaojun Message-ID: <593F4721.7000501@huawei.com> Date: Tue, 13 Jun 2017 10:00:01 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20170608194139.9250-1-ard.biesheuvel@linaro.org> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.21.79] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0204.593F472F.003E,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 0488da93ec6cfcc0263713731c422f91 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1371 Lines: 38 On 2017/6/9 3:41, Ard Biesheuvel wrote: > This is a follow-up to patches from zhonjiang [0] and myself [1] that aim > to solve a problem in the kcore code, which gets confused by the presence > of block mappings in the vmalloc region. > > While fixing the crash is quite straight forward [2], we need to tweak > the kcore code itself to ensure that it operates correctly on arm64. > Fortunately, we can achieve this with two very simple changes: > > - replace a call to is_vmalloc_or_module_addr() in read_kcore() with a > comparison of the kclist type field (#1) > - enable CONFIG_ARCH_PROC_KCORE_TEXT for arm64 (#2) > > [0] http://marc.info/?l=linux-mm&m=149632393629295&w=2 > [1] http://marc.info/?l=linux-mm&m=149685966530180&w=2 > [2] http://marc.info/?l=linux-mm&m=149694975123959&w=2 > > Ard Biesheuvel (2): > fs/proc: kcore: use kcore_list type to check for vmalloc/module > address > arm64: mm: select CONFIG_ARCH_PROC_KCORE_TEXT > > arch/arm64/Kconfig | 3 +++ > fs/proc/kcore.c | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) > Reported-by: Tan Xiaojun Tested-by: Tan Xiaojun Thank you for working on this problem which I reported two months ago. https://patchwork.kernel.org/patch/9687319/ I tested, and it really solved the problem in Hisilicon D02/D03/D05. Thanks. Xiaojun.