Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1262017rwd; Thu, 25 May 2023 10:04:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ51A2lSTK0XZ6h9hrR8mLGcXp3LPwA4S03MIKhH6b3VxfVGkN4pLp/EWrCQzdVxW953lg7/ X-Received: by 2002:a05:6a00:194f:b0:647:e45f:1a49 with SMTP id s15-20020a056a00194f00b00647e45f1a49mr9848063pfk.4.1685034265327; Thu, 25 May 2023 10:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685034265; cv=none; d=google.com; s=arc-20160816; b=HoYDFkOQiedJdmsu8g/lVdibwaZl8JOtByLP9ff64oMHO20O5wUUcZCKR5BlJd9Oru VwMP72q6qh6/ynl9imMvhtG2tSQZWltrlniBrjDGIgTEdBG4fRruZCnUrNU16QnY8yac lN2G6BP2kOWL21Q7QZXRaafTsnslfcMp78Km1GaszH33Z9ahzSGqkc1JoEGPgZXUf77P A271LhCc6Dt0ZrRgDO9dDeWmNkjzTzMiJnmaGF1bBlC9SFNbAHmSBnlYoBWUhXwDPaOj WrEASBcDz+agvsNb0+D6iXIe45oFe5zI3VaZnTdVP7ejTQAFHRYvE2VNbkAbuki2LfPK PNAg== 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:dkim-signature; bh=RZEuzf2kG9zaAYbulkJBa6FdsTti3723oDs+cIj97Zk=; b=n5qHe5qIoH/CPLvoqAtNbtwPSrghgRw1SOP5HYSHppw60w72tk9tNKoeM/Y/OHBuah YNmzWxxgYi+QGY0lF/8k2sCnwOBbpNXpE4ladPhm8TZdnaQY4LJAB4uwXz/lHHbncKye gJOjguZNg8fbZte6l/pvTOVZx1otMGsoun1NGQbUjBb0e70L+b+vdi3b6jhhOkCgopCM uikS9gmZNhkR4secMJG+syJDOOGzY5z8WXjsTn6AcWCB2uRNFEGF1d7dZWxMAOf3HbKl gZ8wOXeWRV27OXHkY51E7lNj+M63Ho1j7m9ek+nCK7vSqeCxlyVc6xw2WDSfQZlxXE49 qGpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IiRHfVrM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l194-20020a633ecb000000b005347ed33096si1648831pga.258.2023.05.25.10.04.07; Thu, 25 May 2023 10:04:25 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IiRHfVrM; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239726AbjEYQmS (ORCPT + 99 others); Thu, 25 May 2023 12:42:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235677AbjEYQmR (ORCPT ); Thu, 25 May 2023 12:42:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DBFF189; Thu, 25 May 2023 09:42:14 -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 B60EA60FA0; Thu, 25 May 2023 16:42:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA6F1C433EF; Thu, 25 May 2023 16:42:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1685032933; bh=Y3G8k59J+vGHwssXzbrGUk2YAbv5aVOZNNFBpJdJe4Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IiRHfVrMvzzP1JE3LMScpOW2d9JCxyHoeLmakmesqZzwnwEOCzmF5sAA0H0oZs5A8 GOb9nruULIhwfOj3inOTpKVj2A4eX04/bz69TwE7rqHU6B+w+I3+ErxT2viK6kQXZL +q+Hl2oB//jPKpVj8Z7AGwg9yFmshvdFnhHxvqM4= Date: Thu, 25 May 2023 17:42:10 +0100 From: Greg KH To: Linus Torvalds , Petr Pavlu , Luis Chamberlain Cc: rafael@kernel.org, song@kernel.org, lucas.de.marchi@gmail.com, lucas.demarchi@intel.com, christophe.leroy@csgroup.eu, peterz@infradead.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, catalin.marinas@arm.com, jbaron@akamai.com, rick.p.edgecombe@intel.com, yujie.liu@intel.com, david@redhat.com, tglx@linutronix.de, hch@lst.de, patches@lists.linux.dev, linux-modules@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, pmladek@suse.com, prarit@redhat.com, lennart@poettering.net Subject: Re: [PATCH 2/2] module: add support to avoid duplicates early on load Message-ID: <2023052518-unable-mortician-4365@gregkh> References: <20230524213620.3509138-1-mcgrof@kernel.org> <20230524213620.3509138-3-mcgrof@kernel.org> <8fc5b26b-d2f6-0c8f-34a1-af085dbef155@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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, May 25, 2023 at 09:07:23AM -0700, Linus Torvalds wrote: > > It means that these and similarly organized distributions end up using > > init_module(), and adding complexity to optimize finit_module() wouldn't > > actually help in their case. > > Yeah, I think the real bug is absolutely in udev, and trying to load > the same module hundreds of times is very very wrong. So I think the > "mitigate it in the kernel" is at most a quick hack to fix user-space > brokenness. I totally agree. I also agree that this doesn't really seem to be any sort of "bug" in that no memory leaks, and when userspace calms down, all goes back to normal. So hacks in the vfs layer for this is not good, let's not paper over userspace code that we have control over with kernel changes. Luis, I asked last time what modules are being asked by the kernel to be loaded thousands of times at boot and can't seem to find an answer anywhere, did I miss that? This should be very easy to handle in userspace if systems need it, so that begs the questions, what types of systems need this? We have handled booting with tens of thousands of devices attached for decades now with no reports of boot/udev/kmod issues before, what has recently changed to cause issues? thanks, greg k-h