From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A9F4C77B6F for ; Fri, 14 Apr 2023 10:19:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229598AbjDNKTC (ORCPT ); Fri, 14 Apr 2023 06:19:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbjDNKTC (ORCPT ); Fri, 14 Apr 2023 06:19:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CA694C06; Fri, 14 Apr 2023 03:19:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E695564516; Fri, 14 Apr 2023 10:19:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4066AC433EF; Fri, 14 Apr 2023 10:18:56 +0000 (UTC) Date: Fri, 14 Apr 2023 11:18:53 +0100 From: Catalin Marinas To: Luis Chamberlain Cc: david@redhat.com, patches@lists.linux.dev, linux-modules@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, pmladek@suse.com, petr.pavlu@suse.com, prarit@redhat.com, torvalds@linux-foundation.org, gregkh@linuxfoundation.org, rafael@kernel.org, christophe.leroy@csgroup.eu, tglx@linutronix.de, peterz@infradead.org, song@kernel.org, rppt@kernel.org, dave@stgolabs.net, willy@infradead.org, vbabka@suse.cz, mhocko@suse.com, dave.hansen@linux.intel.com, colin.i.king@gmail.com, jim.cromie@gmail.com, jbaron@akamai.com, rick.p.edgecombe@intel.com Subject: Re: [PATCH v3 1/4] module: fix kmemleak annotations for non init ELF sections Message-ID: References: <20230414050836.1984746-1-mcgrof@kernel.org> <20230414050836.1984746-2-mcgrof@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230414050836.1984746-2-mcgrof@kernel.org> Precedence: bulk List-ID: On Thu, Apr 13, 2023 at 10:08:33PM -0700, Luis Chamberlain wrote: > Commit ac3b43283923 ("module: replace module_layout with module_memory") > reworked the way to handle memory allocations to make it clearer. But it > lost in translation how we handled kmemleak_ignore() or kmemleak_not_leak() > for different ELF sections. > > Fix this and clarify the comments a bit more. Contrary to the old way > of using kmemleak_ignore() for init.* ELF sections we stick now only to > kmemleak_not_leak() as per suggestion by Catalin Marinas so to avoid > any false positives and simplify the code. > > Fixes: ac3b43283923 ("module: replace module_layout with module_memory") > Reported-by: Jim Cromie > Acked-by: Song Liu > Suggested-by: Catalin Marinas > Signed-off-by: Luis Chamberlain Reviewed-by: Catalin Marinas