Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp509530imu; Fri, 7 Dec 2018 04:46:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/WzkGmo5oi7QeSFTGwX/oor4VVNWfpakEhZyl6ky2qwGlzDijpYBmyx4YQFmi462o86Y2xe X-Received: by 2002:a17:902:a6:: with SMTP id a35mr1995231pla.201.1544186796963; Fri, 07 Dec 2018 04:46:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544186796; cv=none; d=google.com; s=arc-20160816; b=hKBAK+JqE1CuXMLpMZdai2f+z1eDm8KFnBAbKaLwr6TnwTSjctFuYn/ArYFyb/1tOD 3h/BjcE46paZ+7Dn+8K8Oi79BK1VA1WNRUH0FiHV5QMNriVQ2yFQO725B34QJmryAcGy MrmGimvMuTnbC8TekBmEz29ypYIGfChS7CPpHfWuDyxmLhVohb0STpuInRt/vs+35rMk Whsg6GSNFDhdd6G1ck4Yhs5oZA1HicfjFQAeBGMFGzanpMSKMMz5SCsKHDFOc+GyL1ZR er/lWvkeBvZp0t5X+fSj7gsETGbfQE7ydxASjFpu+pDPu/zmADf5bdMxNmLntfdRhTQD 5Zwg== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=IPMi7s8MsS9Oq2TJhPvjYVOvLQcMtk/ZoVNYUrufOfE=; b=wHBOcIbJYdpHtVW1gJXnrTZmN3UGmomXbCcJm0wypvyzQg9zvVejeOuwyynJ0ye0VA 5cbkW+jQBCWCTFf0zCCdXK6OUeLoUQ+uXecC72N17DP/ZQ076ZEWmbCBxYnDUWx8xwFm NhJ/dvrWm5hhHleJLuZLNx/vhqimFavdjg3503EP8YzvKPNOcUIQSvoyKgZ1qaIjG8CP 3z62ARz1RlB+KXolVMC6RhFFCvyXvYyv2rsq/vSbppXFeccvSCUvbjlx60cVF0Cu6hwl BDlK45gnr8gjy8GODKBybVo9M4u0doYZX10ha+nhT608sx89QGwQQ4D/5ioDq5TfkI6T u/vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=crmRPRH2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si3143752pfj.153.2018.12.07.04.46.21; Fri, 07 Dec 2018 04:46:36 -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=@linaro.org header.s=google header.b=crmRPRH2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726074AbeLGMpl (ORCPT + 99 others); Fri, 7 Dec 2018 07:45:41 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:39817 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbeLGMpl (ORCPT ); Fri, 7 Dec 2018 07:45:41 -0500 Received: by mail-it1-f195.google.com with SMTP id a6so6806151itl.4 for ; Fri, 07 Dec 2018 04:45:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=IPMi7s8MsS9Oq2TJhPvjYVOvLQcMtk/ZoVNYUrufOfE=; b=crmRPRH2iEc0Ae29iyVjYqLc1EWe6N/lxQ/OFZj9FghtO38TGYr5is6+novf0PJVUz kD4XYeFXg0Dv7nqKjZsHTw6QuK60tgexjNEMKJ0uoucoqMasJ7UXAvICrhzsoOIE28lm MSQ+EI4ngL5J5E9PUn2lFxkzlI3v8VV9qBWeY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=IPMi7s8MsS9Oq2TJhPvjYVOvLQcMtk/ZoVNYUrufOfE=; b=is+bA0As4Ft5kYVl4FpAbPh/cm/uMxxMauA5X84XJ06zp+zeXJvxUsYClwCOXmHlET rvfVHKfsp/H/nWjfGo6htl9bSaEBOBzTYz9JiGtX3x6oZ0xhD+hhzvAP3NKvbftAIXGR Us8QJp0bYoAcw2ixbAB7ar32jDjtZF6kxvW6NpWs/hwTDaTIaEICUU5cLi3Srw2WbvR3 f8FDGgZk97PpatLLEclw8ohNgCOYTX2bDuHWmi93/ATkME8GJ4lFi9ujABu3x7l0Pl0u xMiw6cmwjXCR+Tbeb+NeYwboqeTk9suKRk8jACMdBmNGQsChSG2v8OzioMaQv8xw7m8X gT7g== X-Gm-Message-State: AA+aEWbcs5rThSdZpRBNm8hjYpl0bbcknIzLVG5JWhfka8Ho2PcXMZlv 3m8sCDLgHHwyBVSkfi3hEau6fQdBDB4kuVFEAwV5ow== X-Received: by 2002:a05:660c:4b:: with SMTP id p11mr1983278itk.71.1544186739850; Fri, 07 Dec 2018 04:45:39 -0800 (PST) MIME-Version: 1.0 References: <1543517152-23969-1-git-send-email-cai@gmx.us> <20181206161633.36292-1-cai@gmx.us> <20181206175958.GS54495@arrakis.emea.arm.com> <1544119499.12945.48.camel@gmx.us> In-Reply-To: From: Ard Biesheuvel Date: Fri, 7 Dec 2018 13:45:28 +0100 Message-ID: Subject: Re: [RESEND PATCH] efi: let kmemleak ignore false positives To: Qian Cai Cc: Andrew Morton , Marc Zyngier , Linux Kernel Mailing List , linux-efi , Catalin Marinas Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 7 Dec 2018 at 13:32, Qian Cai wrote: > > > On 12/7/18 at 6:28 AM, Ard Biesheuvel wrote: > > > On Thu, 6 Dec 2018 at 19:05, Qian Cai wrote: > > > > > > On Thu, 2018-12-06 at 19:01 +0100, Ard Biesheuvel wrote: > > > > On Thu, 6 Dec 2018 at 19:00, Catalin Marinas wrote: > > > > > > > > > > On Thu, Dec 06, 2018 at 11:16:33AM -0500, Qian Cai wrote: > > > > > > unreferenced object 0xffff8096c1acf580 (size 128): > > > > > > comm "swapper/63", pid 0, jiffies 4294937418 (age 1201.230s) > > > > > > hex dump (first 32 bytes): > > > > > > 80 87 b5 c1 96 00 00 00 00 00 cc c2 16 00 00 00 ..........= ...... > > > > > > 00 00 01 00 00 00 00 00 6b 6b 6b 6b 6b 6b 6b 6b ........kk= kkkkkk > > > > > > backtrace: > > > > > > [<000000001d2549ba>] kmem_cache_alloc_trace+0x430/0x500 > > > > > > [<0000000093a6dfab>] efi_mem_reserve_persistent+0x50/0xf8 > > > > > > [<000000000a730828>] its_cpu_init_lpis+0x394/0x4b8 > > > > > > [<00000000edf04e07>] its_cpu_init+0x104/0x150 > > > > > > [<000000004d0342c5>] gic_starting_cpu+0x34/0x40 > > > > > > [<000000005d9da772>] cpuhp_invoke_callback+0x228/0x1d68 > > > > > > [<0000000061eace9b>] notify_cpu_starting+0xc0/0x118 > > > > > > [<0000000048bc2dc5>] secondary_start_kernel+0x23c/0x3b0 > > > > > > [<0000000015137d6a>] 0xffffffffffffffff > > > > > > > > > > > > efi_mem_reserve_persistent+0x50/0xf8: > > > > > > kmalloc at include/linux/slab.h:546 > > > > > > (inlined by) efi_mem_reserve_persistent at drivers/firmware/efi= /efi.c:979 > > > > > > > > > > > > This line, > > > > > > > > > > > > rsv =3D kmalloc(sizeof(*rsv), GFP_ATOMIC); > > > > > > > > > > > > Kmemleak has a known limitation that can only track pointers in= the kernel > > > > > > virtual space. Hence, it will report false positives due to "rs= v" will > > > > > > only > > > > > > reference to other physical addresses, > > > > > > > > > > > > rsv->next =3D efi_memreserve_root->next; > > > > > > efi_memreserve_root->next =3D __pa(rsv); > > > > > > > > > > > > Signed-off-by: Qian Cai > > > > > > > > > > Acked-by: Catalin Marinas \ > > > > > > > > I don't see the patch and I wasn't cc'ed > > > > > > That is strange. Please see, > > > > > > https://lore.kernel.org/lkml/1543517152-23969-1-git-send-email-cai@gm= x.us/ > > > > OK, I found it in my spam folder, apologies for that. > > > > This kmalloc() will be replaced in the next merge window by a call to > > __get_free_page(). Does kmemleak still require the kmemleak_ignore() > > for that case? Or is it only for kmalloc()? > > Looks like kmemleak won=E2=80=99t be able to track page > allocation, so it should be fine then without > kmemleak_ignore(). OK, thanks Qian I will take the patch for v4.20 and remove the kmemleak_ignore() again for = v4.21