Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3442502yba; Tue, 7 May 2019 01:01:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvUv2lbzvn+CSFCnC3q8Yq0IuBlXnCYPkLdeeBZKayGC2CLIeVocNXLk6Q2Nt5ydswuqvL X-Received: by 2002:a17:902:b20f:: with SMTP id t15mr38797110plr.341.1557216066779; Tue, 07 May 2019 01:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557216066; cv=none; d=google.com; s=arc-20160816; b=EKpD4Xcy1CMT9JvmPnImnGZDbW3wRIqE8KL658xtcgPLdmM+zI4pD2tSEE1Ft5wIHX zvBvEeEbao3YeGeuqFIMvlT9zCmTfnfiRFdyYY0E98bZnCHrRbEpVC3vOj4TXzErQYRP RwiwV1hBX6zk3N2aGaxP62+zvoGMjn8VSUTxRd4vclHnIquBrgw0tGFP0SqcnB877mzs cQx1ZpI794mhZnIF5R/nslhMkwXjebnhj2PBWGIIe5VTAeLugrRZ6L+r7CFXR2IwPeES ZKTrqi3ANjWSDwE9sJSTg1sW93Sf5/ipIlPP57QeIihZJmkZfohDbLK9TXfpcxtZ6OkP tD9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xfq9tAk7wa5qpgZ5bWYVCfTS2jjPQUFS6HppD+jSjoY=; b=aQinZAT/+hXE9Eh3RD7yCcQmeU4Wi/GodcMjjpKb0jv3qFXxCVeOc/uzkGtvxOdAjK KeXrg7o0cS5hPANB+BOsd/7Euk+V9CjMhpv9k2ljMfTX+ko/vW2KxQUZ01K1R3V/NizJ t8Rm1ymHDruweBexxlzlU636qRX3feGdWwEndt1j0UbXSNtKwcquiBn/tzHnfP3i+jC5 RXVcAnEcp9eydelwvyBrjgZmMW+uTz40rTYOZ9tFZXov3xjds5mwZethZnpwnb2ipVq5 W1gFmSrkRSyk1zmKn5Q4AYngls4bWWxzn2BaVF2jzcyk50O8ylSMk/88tksUQLCsDZ8u a8/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k1si18196867pgo.81.2019.05.07.01.00.50; Tue, 07 May 2019 01:01:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbfEGH7Q (ORCPT + 99 others); Tue, 7 May 2019 03:59:16 -0400 Received: from mo-csw1114.securemx.jp ([210.130.202.156]:44712 "EHLO mo-csw.securemx.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726085AbfEGH7Q (ORCPT ); Tue, 7 May 2019 03:59:16 -0400 Received: by mo-csw.securemx.jp (mx-mo-csw1114) id x477wKuY027108; Tue, 7 May 2019 16:58:20 +0900 X-Iguazu-Qid: 2wHI0pXS3IUcaJjLn7 X-Iguazu-QSIG: v=2; s=0; t=1557215900; q=2wHI0pXS3IUcaJjLn7; m=VD7dm5karpU23Jq4iN2T2Siy1/GaUeeEYAjr0nZDb48= Received: from imx12.toshiba.co.jp (imx12.toshiba.co.jp [61.202.160.132]) by relay.securemx.jp (mx-mr1112) id x477wGdw019508; Tue, 7 May 2019 16:58:16 +0900 Received: from enc02.toshiba.co.jp ([61.202.160.51]) by imx12.toshiba.co.jp with ESMTP id x477wC2N020685; Tue, 7 May 2019 16:58:16 +0900 (JST) Received: from hop101.toshiba.co.jp ([133.199.85.107]) by enc02.toshiba.co.jp with ESMTP id x477wBRe022866; Tue, 7 May 2019 16:58:12 +0900 Date: Tue, 7 May 2019 16:58:09 +0900 From: Nobuhiro Iwamatsu To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Catalin Marinas , Qian Cai , Paul Mackerras , Benjamin Herrenschmidt , Avi Kivity , Paolo Bonzini , Radim Krcmar , Andrew Morton , Linus Torvalds , Sasha Levin , Michael Ellerman Subject: Re: [PATCH 4.19 62/99] kmemleak: powerpc: skip scanning holes in the .bss section X-TSB-HOP: ON Message-ID: <20190507071925.irtu4gpc7tijmpbw@toshiba.co.jp> References: <20190506143053.899356316@linuxfoundation.org> <20190506143059.710412844@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190506143059.710412844@linuxfoundation.org> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, May 06, 2019 at 04:32:35PM +0200, Greg Kroah-Hartman wrote: > [ Upstream commit 298a32b132087550d3fa80641ca58323c5dfd4d9 ] > > Commit 2d4f567103ff ("KVM: PPC: Introduce kvm_tmp framework") adds > kvm_tmp[] into the .bss section and then free the rest of unused spaces > back to the page allocator. > > kernel_init > kvm_guest_init > kvm_free_tmp > free_reserved_area > free_unref_page > free_unref_page_prepare > > With DEBUG_PAGEALLOC=y, it will unmap those pages from kernel. As the > result, kmemleak scan will trigger a panic when it scans the .bss > section with unmapped pages. > > This patch creates dedicated kmemleak objects for the .data, .bss and > potentially .data..ro_after_init sections to allow partial freeing via > the kmemleak_free_part() in the powerpc kvm_free_tmp() function. > > Link: http://lkml.kernel.org/r/20190321171917.62049-1-catalin.marinas@arm.com > Signed-off-by: Catalin Marinas > Reported-by: Qian Cai > Acked-by: Michael Ellerman (powerpc) > Tested-by: Qian Cai > Cc: Paul Mackerras > Cc: Benjamin Herrenschmidt > Cc: Avi Kivity > Cc: Paolo Bonzini > Cc: Radim Krcmar > Signed-off-by: Andrew Morton > Signed-off-by: Linus Torvalds > Signed-off-by: Sasha Levin > --- > arch/powerpc/kernel/kvm.c | 7 +++++++ > mm/kmemleak.c | 16 +++++++++++----- > 2 files changed, 18 insertions(+), 5 deletions(-) This commit has other problems, so we also need the following commits: commit dce5b0bdeec61bdbee56121ceb1d014151d5cab1 Author: Arnd Bergmann Date: Thu Apr 18 17:50:48 2019 -0700 mm/kmemleak.c: fix unused-function warning The only references outside of the #ifdef have been removed, so now we get a warning in non-SMP configurations: mm/kmemleak.c:1404:13: error: unused function 'scan_large_block' [-Werror,-Wunused-function] Add a new #ifdef around it. Link: http://lkml.kernel.org/r/20190416123148.3502045-1-arnd@arndb.de Fixes: 298a32b13208 ("kmemleak: powerpc: skip scanning holes in the .bss section") Signed-off-by: Arnd Bergmann Acked-by: Catalin Marinas Cc: Vincent Whitchurch Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Please apply this commit. Best regards, Nobuhiro