Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp497699imu; Fri, 7 Dec 2018 04:34:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/U2vy46j3rcC4MYv0TMFntp8sKqoMaK8mHAdRqKGn2+dYacIlQg+WgWOw7+mk7gy5npWJbH X-Received: by 2002:aa7:8045:: with SMTP id y5mr2079466pfm.62.1544186095970; Fri, 07 Dec 2018 04:34:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544186095; cv=none; d=google.com; s=arc-20160816; b=Gv1GFfExuKDpXp5pDnLHWAwkNIgwD2hrfrHIQfJbXfvvLhOGR5Wnh5m43zwfSY393w 6UwUHbqLPGgjvy1wf/Nx+2ScKaL6oxwOABp3E1EBAgYJkrADR9wmqUoYa5J060c5ja6L UuTt7JttEQdqJCUFL+yzDG0AyxYGKa5VahN9UCVuWcyWYYCDAwdazToLgmxKq5DuQCWy IphCKk6qU9oqVLbHKDzip23G6VG3odIaczvJ9cYnkGqLTlgm+bfc5fv8XSZeoS0lNaQt kMV/X5+yEPXfuU2O8swnnT6s9nOgyHOvelartJ1JnvUuerGkm2lPRR40lS4rBcO9lJqD hR+A== 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:references :in-reply-to:date:subject:cc:to:from:message-id:mime-version; bh=lOm0eigLStob0O9XxhYS2i3V6Tvg9XDilgW07fkMQUw=; b=KGeXyHgVd4ThlqOLdfQa9zfalY3d/2Fc1mZjkxB7GNpLDERBwKbn6QhGSJJMN+0OmU iHuIHwT8lFzhvewA98ivbQ7JPpseeX/KFplXWoLNYSvi7+DrGoA9i86BT7MLRe10p6pA U6S9T0ATls5XmRd2h6xc3yJp0kStTkzjHiJ87IbpYUp6MMGdfP8AfqVaX16FYhH1RxgD U7Yb5cRWW/Wp3l8dBMkTlIo0MxYIKxfKnLtKht8vduU3pAGL8XXrmwp/Ph88V+GMswEZ tYpK1qd1lfdSYWaIDf882CS3WQI1dyhs0hkxVmFqd3Ra9wBcStWmXsK+F9iBb4aRaCRg tlqQ== 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 bc7si2882942plb.120.2018.12.07.04.34.40; Fri, 07 Dec 2018 04:34:55 -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; 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 S1726052AbeLGMcn convert rfc822-to-8bit (ORCPT + 99 others); Fri, 7 Dec 2018 07:32:43 -0500 Received: from mout.gmx.net ([212.227.15.18]:45871 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbeLGMcn (ORCPT ); Fri, 7 Dec 2018 07:32:43 -0500 Received: from [71.184.117.43] ([71.184.117.43]) by msvc-mesg-gmx023.server.lan (via HTTP); Fri, 7 Dec 2018 13:32:40 +0100 MIME-Version: 1.0 Message-ID: From: "Qian Cai" To: "Ard Biesheuvel" Cc: "Andrew Morton" , "Marc Zyngier" , "Linux Kernel Mailing List" , linux-efi , "Catalin Marinas" Subject: Re: [RESEND PATCH] efi: let kmemleak ignore false positives Content-Type: text/plain; charset=UTF-8 Date: Fri, 7 Dec 2018 13:32:40 +0100 In-Reply-To: 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> Content-Transfer-Encoding: 8BIT X-Provags-ID: V03:K1:I+BmsAiDbNTCEKOEFTpsXQRKcKTAjcJ7IwIEA5sjIbIlPOdZA2xpA5Hy7xagLt1UeKC0i R8fqyi99yO65X+sEDTMtEgD+DtLHsiOsG6hJ7qpTLZANBJKYWpgCj8NHpCDSOPhyiXZghTv/OhKo BOQXHmitLJMDEW50aoEwg8nKnrStMwnwcWgtu7Jv6P2eSeogNO2ShRpWZrZlhE2ufEOPmnd2JYeK 3SGEzwLNtjcSwRjgQddWGjZT5c/fyySRiCK3WZfssB3smQlXJLaMtuhxZFdFspHQlKHtqgG8haJE 3Jt6hT1ESkskA3r/wl/S1so X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:qSHSn5Xw4nc=:jbS+xP2pwLy48NmVB2vgag boNR7TiUp/ea2JVIgdqrHItYU960qe6IPUNHUsH5YVi+hSdW6Jw/0Y1T3pGTt5YJIy4FzNWWC fYvhZB7Y+JadZ793h+XjGZBIOqFn9rK6SyGsvZVpiKdi7FwvYd/bPxCEpJZ79HcQ/56vFjtN3 x+mnRIcwGkciFoCXTdJJ55TTw7PF6vEQBoW4f470sjX1WuynODYuCGmAbOwgngAYTQSwN6JTu UpUblZ7tAsFaY4c3X+WUMaMQy81Au8rHmqvOKHhaXEIQgj6qlov2R3xTYAGzLEgGmDi8FofrD 3HyS9m/wpKCkYLNDKVHhXJ0Jt/0zKsaRXqmw1QXCiIbUC19ikvTs56L6bS9XkEvb3quyt1Bjr q1W9YqMt94A8QmKbvJU7pSEEc7AzblG1mLrsOF9U+FdPbqjq+c3XSLRVH4t2LFoGh0xkpj55t uamK1lQpd1avt0KSnGQj15ibXRWBLVa+pDGhUFANZ5+yBzS3LSLR54Gz2wRZhyrvvuJdm7ZL1 5qaW039/Z7IaRm0Dav3tIXl3v/Cp6c8OEQOiKIcVOSadS63JoexuFTT+OLBdZs7TByd/HI90Z mLX0slhXR1+iOkXmN3aAik5J0CvVzewWcZ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ........kkkkkkkk > > > > > 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 = 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 "rsv" will > > > > > only > > > > > reference to other physical addresses, > > > > > > > > > > rsv->next = efi_memreserve_root->next; > > > > > efi_memreserve_root->next = __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@gmx.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’t be able to track page allocation, so it should be fine then without kmemleak_ignore().