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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E8F3C7EE2E for ; Thu, 25 May 2023 16:42:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 143726B0074; Thu, 25 May 2023 12:42:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0CD5F6B0075; Thu, 25 May 2023 12:42:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E88C6900002; Thu, 25 May 2023 12:42:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id CF16A6B0074 for ; Thu, 25 May 2023 12:42:16 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 7CD3CC0B90 for ; Thu, 25 May 2023 16:42:16 +0000 (UTC) X-FDA: 80829345072.29.E8A1076 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id A58911A0024 for ; Thu, 25 May 2023 16:42:14 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=IiRHfVrM; dmarc=pass (policy=none) header.from=linuxfoundation.org; spf=pass (imf19.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685032934; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=RZEuzf2kG9zaAYbulkJBa6FdsTti3723oDs+cIj97Zk=; b=1U64qoy3rezBTXG1GHsK5TYlWeasECEVJlMSqd783RoybjrrCFwzZdGl/Crli3fdHfO96f lxLMS7ilWH7c5X32wlkf1M12jJrCB7KQebZCOdT7yObpqrUapI1TOH+FNMYRXOGsmBeoPS 8tD2KsgFmPk2cyxZBSWDSMWkSUoKyv0= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=IiRHfVrM; dmarc=pass (policy=none) header.from=linuxfoundation.org; spf=pass (imf19.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685032934; a=rsa-sha256; cv=none; b=TgaVdkrFXqK4EW/Vi9DrEuV/x/PrUB82O/yJSwKDaenvyAJsXPFQ3xJ0X6IxthC4Xd+XY9 nwdyB1T4CQXDxSwl2OVD3K58e8enT4H7ptk9aAu8vk9eEVgn2MLDbv9aImH3EUS77YOu69 WR/NDtFCb5hLZsh3ldoGz/6eZXFX8zk= 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 B40EA61423; 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-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: A58911A0024 X-Stat-Signature: mhaqh9qrxkxokw973b8zbhz5rsoc8rko X-Rspam-User: X-HE-Tag: 1685032934-851531 X-HE-Meta: U2FsdGVkX1+xH4F+cjDBCIqzbpqw1eps47bThqAj7KYABJtrC61efLH405EHME1zeKcOJPeWdGGUXO7PTGyYk3P/D84RRL2Yiy0+qd7iVwRf++T+9ONwoiitPWZk0ZgdptcYiHG8W+MUJALEijxKuQCHxZYU/Uyk4rJHUUhRSo96HBZVJ46in6WzJlsIYz7y8GulM4OiK6gu6uhf0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9Z2usLq8Y+1rh2RAHIWkdv5zaAc9zV76K5MU/Ji1KiCcDjTvmHUyjbRTY3kIi+3GTkUgwLXBxrg+Hs/n8rjFkIe+/17fxEksVrQ1vv X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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