Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751701AbdFISFJ (ORCPT ); Fri, 9 Jun 2017 14:05:09 -0400 Received: from mail-qt0-f175.google.com ([209.85.216.175]:33764 "EHLO mail-qt0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751572AbdFISFI (ORCPT ); Fri, 9 Jun 2017 14:05:08 -0400 Subject: Re: [PATCH 0/2] arm64: fix crash when reading /proc/kcore To: Ard Biesheuvel , linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, jolsa@kernel.org, mingo@kernel.org, akpm@linux-foundation.org, zhongjiang@huawei.com, mark.rutland@arm.com References: <20170608194139.9250-1-ard.biesheuvel@linaro.org> From: Laura Abbott Message-ID: <7bbed6bb-63e9-bb75-318f-0054967ee087@redhat.com> Date: Fri, 9 Jun 2017 11:05:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170608194139.9250-1-ard.biesheuvel@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1317 Lines: 35 On 06/08/2017 12:41 PM, 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(-) > Reviewed-by: Laura Abbott I wish there was actual Kconfig help text for CONFIG_ARCH_PROC_KCORE_TEXT instead of having to go into kcore.c to read about how it was used but that can be fixed up separately. Thanks, Laura