Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp314022rwe; Fri, 14 Apr 2023 03:19:36 -0700 (PDT) X-Google-Smtp-Source: AKy350aANSOc3f0nAM6o0zBI5sAXIWwjk1gmXWB6dTuBN1UD9QY5qWTXcKGMlMb4sSiqpCRU2uHS X-Received: by 2002:a05:6a00:1401:b0:63a:b035:8bf2 with SMTP id l1-20020a056a00140100b0063ab0358bf2mr8124460pfu.4.1681467575919; Fri, 14 Apr 2023 03:19:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681467575; cv=none; d=google.com; s=arc-20160816; b=OotHAWRm5jVUccLjfgVYcqchDJmXmG0gS0sSt0VTVzR2cYN2WYR9wdebvBWdzvy8wW zuAiBgeEpxsdOV1gqYl3YIFnS4LeOUeN8BXjEEl+I6NAqPj0y6aNUHx1D3e2W6/6QTG9 0P20kMppAH0ZH/Jdf+G/aym9foqK+QPyRfY8+NI7O2HYdcJzLgiBHdF/fy7XrkukqY9I PLwLwqyBY8DzEy5yqvdO893wwNcjxj8B+MNvYVsWoqRTzqmrwtdi614ZYpY/C8Gg4tYx xg06GOEAWBBFcNmAiAxJd6DC6xvohASxShpYMgXOlZjs+v2AnhVrfgjXGY84EWZPln1R wS/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=yzZFV0fOuAVbmpX9ius/VX3GJ0mpcAwb4zJYj2UnoWw=; b=fxdniQBahSP4pWsn6jcptZVs/vLhSn2zDNceXgbwaPC5wtbM3utNOPEdgv+u/ObEY8 PnDPP/dqitDWx2MaAMdg2Q/Skqjy2xE4vKHUkHa25Q6f2pnnIF8gIUlK0mpq2pdH6mLP ZKuvsIO8KcqAXWF64+AQZDiU/O8Zqj3GrQaSfw929bPjQjoPXPbXuVGwjhRWeykX7PIn FdjlQ+bKj8jaSUXaJ3Mfq3TqIu1uX4wKS9i+lIRjDqO/PcBYyx4Vx5Qg64fNrlhINNgq 4T4mk4ufflkKlfNw/CIGpoD/0+Lgp65oXMlvl704scwhIGE8CCllrYGawETZsBSuTbUH Q/7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j63-20020a638042000000b0050beb3fe627si4381199pgd.459.2023.04.14.03.19.23; Fri, 14 Apr 2023 03:19:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229784AbjDNKTD (ORCPT + 99 others); Fri, 14 Apr 2023 06:19:03 -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> X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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