Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3312908imu; Fri, 18 Jan 2019 08:16:52 -0800 (PST) X-Google-Smtp-Source: ALg8bN4YDfIPQgLLfLWOPIvUxSR+EhYfWBTWhKI4W2rIUhC0o1PhXiD1dNJos57yQDn/hSavk5gk X-Received: by 2002:a62:6cc9:: with SMTP id h192mr19889759pfc.223.1547828212248; Fri, 18 Jan 2019 08:16:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547828212; cv=none; d=google.com; s=arc-20160816; b=J8hDMAr+US9c7xpoRXaiiDeGCNpFGoPcd7SKduxxNYBRsXi7XNTvSBVXyVtYPVzIXD twnUcrU96Rg1aqxdBRMNBtwlLIGqTDpYwD4aRLqrIObhm8vkw4/ptI4ZUkn7FSR/+7D3 zwvfb9hxfNMreUXKOK3LRgzpic9JMh2hYPLq3BHrTYur7+2jYbpEH5gwvTFBgPaWdgz8 526J5fi5cm2W9rFaD/WfLuImw7zXnIP93xMcXR+XfKGCoOSo4/OdIDVw96GcZ1L3B14s 68gy1j1rYW+JeN3S9nprYJXxD2nh8IfnW1qAmK/59FjWmk6E6mLH/JHLHEel0RLP7H88 e1hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=KG+I2J8N6LxgofxAwyTwx6e1PVHkREPUWUPz4a02bbs=; b=jc+YAYR83yWKQAzdRQOWeU/hViqyw2MxdD+txjJ0w4udwLhSNV9xpanpFyeAdA6lxi ucQUFG2BQLbD7kXKI5+f+tPf3Y6bca6+G3NgU1kCGpvMEPFmVIQTvfECEIKpN7dGGGbL F0auFAXZH2KtCi87qByncYuo3CbpnzbHQIBDKVutbyQaTuRB7jeO8FUSYAGUch1S1KG9 0B2GSHuCohox5lA1dVd+BoEf41vctJb7qqyHoss/TbgbZLtIRGIRxeeeyQnIOvj08VyA MRDzIGvNrl1Lw2wzB+wjcbDjhDWI6gVMYV8WoaVM/cqE6MqGZx6z4Brq3iMFCDWJbTjo rJBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=lEWq+kUg; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si5066572plr.189.2019.01.18.08.16.33; Fri, 18 Jan 2019 08:16:52 -0800 (PST) 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; dkim=pass header.i=@lca.pw header.s=google header.b=lEWq+kUg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727762AbfARQOF (ORCPT + 99 others); Fri, 18 Jan 2019 11:14:05 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:40995 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727357AbfARQOF (ORCPT ); Fri, 18 Jan 2019 11:14:05 -0500 Received: by mail-qt1-f195.google.com with SMTP id l12so15730752qtf.8 for ; Fri, 18 Jan 2019 08:14:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KG+I2J8N6LxgofxAwyTwx6e1PVHkREPUWUPz4a02bbs=; b=lEWq+kUgd/zdCiUUMuVhTY1kFOs3zw0sP6Ma0OPLYJBYrkh1d92+OFyFLsExcJVOmE SwBhQUitRNDB8ZFyogn+ESTarzTu5zEm3aXX8sOog90zrdyBCpN1MnAGOtoaqhGboxEE ZssDZRBu4FM0soTOTwTX3BzFVdGBAwUQd+EfjIiMtF98JXrfyigsZkwyNjZG6n4lv0nc Wn9NY7gr5/9SlPNEVlgzHgo654RgjuD3jvtPk9QDS52x+oyvVHLGBGckvFf9TveHG5V2 N3D85W8OCUBXK3lboS524RjeCuZdVLoEp3UG21BHEaUkStmai7GAkVIDtJdJSSfMaVNn uwIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KG+I2J8N6LxgofxAwyTwx6e1PVHkREPUWUPz4a02bbs=; b=Jt0DtcW3FAFT/c6Cx9/O0SOghk2H/h+QDEjChBWFz7mSLWtSSUxMx8h30/QNj5omUm RsYAZ+vbH4y/L00ENjAuQNvWVNpK5yu4Pv5Ml8MKNwsvcRVWE9KnfWkRmLYMc8ecob93 D87kZDCp583Iq0Ey5l1i697tYoHAQfbhw9DYi6HvBGaBnjfos/3dTAyW8u7r/Qfb4mBe RBJKcrvlbVUS6q5kGwMP0l4NO8/lTz+iC8zu7g87ou0zdBMohDSHc0E+beKQY09856Jg 9t2vWSIM7iuLYNxNDyAvd9XKJfFyIBh4gI72Q6V/cvPHYhZvcMkSSgK/sE3CLTtOGA3j mjgA== X-Gm-Message-State: AJcUukdSySxF951OSXYqE9MF3b9ZZa0/5lK8CU3C/ynJOAJH15dSKVBy nHRRKlGHb87WqhDs29ity1MpvslkTCR91g== X-Received: by 2002:a0c:a144:: with SMTP id d62mr16500680qva.50.1547828043668; Fri, 18 Jan 2019 08:14:03 -0800 (PST) Received: from ovpn-124-227.rdu2.redhat.com (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id t4sm4551510qke.74.2019.01.18.08.14.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 08:14:02 -0800 (PST) Subject: Re: kmemleak panic To: Marc Gonzalez , Catalin Marinas Cc: Robin Murphy , Mark Rutland , Arnd Bergmann , Ard Biesheuvel , Oscar Salvador , Wei Yang , Michal Hocko , Andrew Morton , Linus Torvalds , Sri Krishna chowdary , LKML References: <20190118143434.GE118707@arrakis.emea.arm.com> From: Qian Cai Message-ID: <5fe89adc-c95b-ca89-d043-c380e2ba8cb3@lca.pw> Date: Fri, 18 Jan 2019 11:14:01 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/18/19 10:36 AM, Marc Gonzalez wrote: > On 18/01/2019 15:34, Catalin Marinas wrote: > >> On Fri, Jan 18, 2019 at 02:36:46PM +0100, Marc Gonzalez wrote: >> >>> Trying to diagnose a separate issue, I enabled a raft of debugging options, >>> including kmemleak. However, it looks like kmemleak itself is crashing? >>> >>> We seem to be crashing on this code: >>> >>> kasan_disable_current(); >>> pointer = *ptr; >>> kasan_enable_current(); >> >> There was another regression reported recently: >> >> http://lkml.kernel.org/r/51e79597-21ef-3073-9036-cfc33291f395@lca.pw >> >> See if reverting commit 9f1eb38e0e113 (mm, kmemleak: little optimization while >> scanning) fixes it. >> > > [Drop LAKML, add LKML, add recipients] > > Bug is easy to reproduce: > > boot > mount -t debugfs nodev /sys/kernel/debug/ > echo scan > /sys/kernel/debug/kmemleak > > Unable to handle kernel paging request at virtual address ffffffc021e00000 > Mem abort info: > ESR = 0x96000006 > Exception class = DABT (current EL), IL = 32 bits > SET = 0, FnV = 0 > EA = 0, S1PTW = 0 > Data abort info: > ISV = 0, ISS = 0x00000006 > CM = 0, WnR = 0 > swapper pgtable: 4k pages, 39-bit VAs, pgdp = (____ptrval____) > [ffffffc021e00000] pgd=000000017e3ba803, pud=000000017e3ba803, pmd=0000000000000000 > Internal error: Oops: 96000006 [#1] PREEMPT SMP > Modules linked in: > CPU: 0 PID: 635 Comm: exe Not tainted 5.0.0-rc1 #16 > Hardware name: Qualcomm Technologies, Inc. MSM8998 v1 MTP (DT) > pstate: 80000085 (Nzcv daIf -PAN -UAO) > pc : scan_block+0x70/0x190 > lr : scan_block+0x6c/0x190 > sp : ffffff80133b3b20 > x29: ffffff80133b3b20 x28: ffffffc0fdbaf018 > x27: ffffffc022000000 x26: 0000000000000080 > x25: ffffff80118bdf70 x24: ffffffc0f8cc8000 > x23: ffffff8010bd8000 x22: ffffff8010bd8830 > x21: ffffffc021e00ff9 x20: ffffffc0f8cc8050 > x19: ffffffc021e00000 x18: 00000000000025fd > x17: 0000000000000200 x16: 0000000000000000 > x15: ffffff8010c24dd8 x14: 00000000000025f9 > x13: 00000000445b0e6c x12: ffffffc0f5a96658 > x11: 0000000000000001 x10: ffffff8010bae688 > x9 : ffffff8010baf000 x8 : ffffff8010bae688 > x7 : 0000000000000003 x6 : 0000000000000000 > x5 : ffffff801133ad60 x4 : 0000000000002878 > x3 : ffffff8010c24d88 x2 : 7c512d102eca1300 > x1 : ffffffc0f5a81b00 x0 : 0000000000000000 > Process exe (pid: 635, stack limit = 0x(____ptrval____)) > Call trace: > scan_block+0x70/0x190 > scan_gray_list+0x108/0x1c0 > kmemleak_scan+0x33c/0x7c0 > kmemleak_write+0x410/0x4b0 > full_proxy_write+0x68/0xa0 > __vfs_write+0x60/0x190 > vfs_write+0xac/0x1a0 > ksys_write+0x6c/0xe0 > __arm64_sys_write+0x24/0x30 > el0_svc_handler+0xc0/0x160 > el0_svc+0x8/0xc > Code: f9000fb4 d503201f 97ffffd2 35000580 (f9400260) > ---[ end trace 8797ac2fea89abd6 ]--- > note: exe[635] exited with preempt_count 2 > > > > Reverting 9f1eb38e0e1131e75cc4ac684391b25d70282589 does not help: This looks like something different from the original "invalid PFNs from pfn_to_online_page()" issue. What's your .config ?