Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4772089ybp; Mon, 14 Oct 2019 09:47:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAgF+GvvJiFBGTqMgTpd1LxcjJQEjJS94LwCxzA3DTlnI82EXF0LstFixO1VB2IpMAywzX X-Received: by 2002:a17:906:46db:: with SMTP id k27mr29379704ejs.308.1571071620738; Mon, 14 Oct 2019 09:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571071620; cv=none; d=google.com; s=arc-20160816; b=l9Vs9946AkVjKrE0v9Mnd3VwkBzVwTV7fSARr2U626FHIvmzN4XjnV9vGTSbViWoXp rKXzE7q4rXgk1Br//I6YuItG5X35NqmXhFx9dfdaPoXOb2vOeJocoxMiUaOo32kbIRio kBZHZc++w1MKBJd5G1S4xp8C3u8q8eXd68C94Ls0ugbk2FiHtJ33Wme2g5ANkmHmNUVH eJI3cFxxu/usR83mAl2xbXi9G2b10eiR+NOcWq2OADCoOpm0TVzxQdwfV4tOyoaRmDO0 nWZtAkfX5xshLeom5eWnaYkY89HJ3gr3ru90XgBNlP9JMR73gDt06yExGW09mlgP/7Ps n/mg== 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; bh=yxZaxk1b7lZOohU3KHcqJ6wI6HJWVu1yiQUBrw8x+hQ=; b=nssrlTKpJjEyk8wrb2rKCP34HfHd/ckN8HCL/1J2G606gdrtEhl9yr3DZqmXfcXcKx H7rYg8ci8zYTir10VFR1xUUicWkVczpGfmumxcDqgeEd9SZj08wOdtrdfYxBv0PR3gN9 7dXW5055rCe+3+GdnFSwM3B0RMFGralF4FVANxvXcKTxMh4wP66bt8R60arfXl0kuYfP optJsAdKJoOyf4IuTKTWaBELPmjpmsjMgQa7GxgigpRphWxx4YNwbSGQEcnFdZP+bvbt hyujwTCG9kLR/cam1hoKar+dwUFIxt/Z4QYWnCj+1aAKeQzn72p18EB5/swsj0Vl7fAm G0rA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d52si11356280ede.370.2019.10.14.09.46.36; Mon, 14 Oct 2019 09:47:00 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387992AbfJNQPL (ORCPT + 99 others); Mon, 14 Oct 2019 12:15:11 -0400 Received: from foss.arm.com ([217.140.110.172]:48080 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730028AbfJNQPK (ORCPT ); Mon, 14 Oct 2019 12:15:10 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1DE8528; Mon, 14 Oct 2019 09:15:10 -0700 (PDT) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 32DAA3F718; Mon, 14 Oct 2019 09:15:09 -0700 (PDT) Subject: Re: edac KASAN warning in experimental arm64 allmodconfig boot To: John Garry Cc: Borislav Petkov , Mauro Carvalho Chehab , tony.luck@intel.com, Robert Richter , linux-edac@vger.kernel.org, "linux-kernel@vger.kernel.org" References: <304df85b-8b56-b77e-1a11-aa23769f2e7c@huawei.com> From: James Morse Message-ID: Date: Mon, 14 Oct 2019 17:15:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <304df85b-8b56-b77e-1a11-aa23769f2e7c@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi John, On 14/10/2019 16:18, John Garry wrote: > I'm experimenting by trying to boot an allmodconfig arm64 kernel, as mentioned here: Crumbs! > One thing that I noticed - it's hard to miss actually - is the amount of complaining from > KASAN about the EDAC/ghes code. Maybe this is something I should not care about/red > herring, or maybe something genuine. Let me know what you think. Hmmm, I thought I tested this recently... > Log snippet (I cut off after the first KASAN warning): > > [   70.471011][    T1] random: get_random_u32 called from new_slab+0x360/0x698 with > crng_init=0 > [   70.478671][    T1] [Firmware Bug]: APEI: Invalid bit width + offset in GAR > [0x94110034/64/0/3/0] (this one's for you right?) > [   70.700412][    T1] ------------[ cut here ]------------ > [   70.802080][    T1] Call trace: > [   70.802093][    T1]  debug_print_object+0xec/0x130 > [   70.802106][    T1]  __debug_check_no_obj_freed+0x114/0x290 > [   70.802119][    T1]  debug_check_no_obj_freed+0x18/0x28 > [   70.802130][    T1]  slab_free_freelist_hook+0x18c/0x228 > [   70.802140][    T1]  kfree+0x264/0x420 > [   70.802157][    T1]  _edac_mc_free+0x6c/0x210 > [   70.814163][    T1]  edac_mc_free+0x68/0x88 > [   70.814177][    T1]  ghes_edac_unregister+0x44/0x70 > [   70.814193][    T1]  ghes_remove+0x274/0x2a0 Ugh. This must be the test driver remove thing. I've reproduced this, but had to remove the parent GHES twice. It looks like it tries to use the first ghes_edac global variables when freeing the second. ghes_init prevents it from re-allocating over the top. The below diff fixes it for me. (I'll post it as a proper patch once I've done the archaeology) -----------%<----------- diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index d413a0bdc9ad..955b59b6aade 100644 --- a/drivers/edac/ghes_edac.c +++ b/drivers/edac/ghes_edac.c @@ -554,6 +554,7 @@ void ghes_edac_unregister(struct ghes *ghes) return; mci = ghes_pvt->mci; + ghes_pvt = NULL; edac_mc_del_mc(mci->pdev); edac_mc_free(mci); } -----------%<----------- Thanks! James