From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.137.202.133 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796284423; b=pdEEkd5EKlllMIRlJqsFL5paM8asARtmgrt9FRR1pkUdXXZMJYVw+GJoFKGXCj6YUaUO 02udLd9/9jxUDSwO7Tx4Lwjmo6YN/wlsZN2+zyrY8wIjXNk0+d2EqwidhMbZk4lgsC15j esvCXQBG2jCBxcUiZLojIBrvl1Zoogx9nIgvzcFh3g0H8TSoCxnCMBxpK6cCs0fmJ92qy QwtdCF4y5ZX2W3lsFNDYIC8dewJteio2MgP0RPf8Gt1xf6AGLF5sWnHZYWG+YAcqUxgEW E9vuWeHnhSpSX3bjpJpSs9DtWw1JQR2WIM78NDvZl2UoXAIPTUyqJBn6/egxap30A+g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796284423; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:X-SRS-Rewrite; bh=/Kc4XYfoLrl7vS/CC6uEXGF2sRZhXZFRdfNgYdiNKSw=; b=X5NDYtwKF6YCZfpbvtUhJb8Ze2k8kN0na6GJP22cTFE4yBj677V7wvs3MjX9GKH8Xkdx UBOWKsINGjxkgr7tkbX7k9PSIn+x9/w+Ic4mhPPUNLvrF4FXy6caKwjhLgiyRE/rnRKuU IwUBXYW4FMwgPUJQF4zhXiuPWtH36CMexwFaqGR4XtiJFEeYovSVjMWZeVBGSzqXVLsvV Qsi2wBfydZ6K0Iswg4jVfv9VoQBFm+R0aIQT5MWmA+X9b9gusW6gOHj31C2EAGmIGiJSN tNyTPISyopfm9pGjT/3uuqZxC9eeZYWK89hV8X7bgqulk/3opnvpeSU0+sBAMbf/cEA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LZmHZn3y; arc=none smtp.remote-ip=198.137.202.133 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 149AD606A322; Thu, 3 Dec 2026 07:53:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 149AD606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LZmHZn3y DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=/Kc4XYfoLrl7vS/CC6uEXGF2sRZhXZFRdfNgYdiNKSw=; b=LZmHZn3y7DzGURGV1EWpxgL+Zp ppidRkHHXYX+GkgKaMtiV/XedfaGJyweZGUB9Q8NGuGOPPlYJi8O5lqm6fghqOFskrahL+bpuxpNq vZM9RtrrGSakyou0ZHwgEAUD1JkymSKRiH6zM0agWuAclgPPap6Y+al5viJ5ktyuXXToX7uAN4fPP a6GR37Gi3+4AiO8rawMWwDpg8phnd5EwGkjsooK/QUfcFTg77E3HU9zvkyaNyD+AeZIbUOvZggJZH Pc3LQV6CakBUJg02Ue+H13vbXKGlp0nD4OTafY2C0kj8pD6kDM+Ifsk/IEwGFptc6347mrKbAcE9u 7h1LxOtg==; Received: from hch by bombadil.infradead.org with local (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ1dK-0000000DmUr-2a6P; Thu, 03 Dec 2026 07:53:38 +0000 Date: Wed, 2 Dec 2026 23:53:38 -0800 From: Christoph Hellwig To: David Matlack Cc: Christoph Hellwig , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-pci@vger.kernel.org, linux-riscv@lists.infradead.org, Albert Ou , Alexandre Ghiti , Alex Williamson , Bjorn Helgaas , Jacob Pan , Jason Gunthorpe , Josh Hilke , Lukas Wunner , Mike Rapoport , Palmer Dabbelt , Parav Pandit , Pasha Tatashin , Paul Walmsley , Pranjal Shrivastava , Pratyush Yadav , Samiullah Khawaja , Shuah Khan , Vipin Sharma , kexec Subject: Re: [PATCH 01/18] liveupdate: Export symbols needed by modules Message-ID: References: <20261202003955.3607156-1-dmatlack@google.com> <20261202003955.3607156-2-dmatlack@google.com> X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Wed, Dec 02, 2026 at 09:22:05AM -0800, David Matlack wrote: > On Tue Dec 1, 2026 at 11:18 PM PST, Christoph Hellwig wrote: > > On Wed, Dec 02, 2026 at 12:39:38AM +0000, David Matlack wrote: > >> From: Vipin Sharma > >> > >> Export liveupdate_register_file_handler() and > >> liveupdate_unregister_file_handler() so that drivers built as modules > >> can register Live Update file handlers. > > > > I don't see any such driver in this series. And the diea of allowing > > reandom drivers to register this information feels wrong. > > The user in this series is the test driver added in patch 10 > (tools/testing/selftests/liveupdate/modules/luo_pci_test_driver.c), Which of course does not count as a user. It's just code you make up, not real code. > which the selftests build as a module and load in the kernel. The other > user will be vfio-pci, from the VFIO Live Update series, which is where > this patch comes from: > > https://lore.kernel.org/kvm/20260714151505.3466855-1-vipinsh@google.com/ > > To address the concern about random drivers, I see two options: > > A. Restrict these exports to the modules that need them, i.e. > EXPORT_SYMBOL_FOR_MODULES(..., "vfio-pci,luo_pci_test_driver"). > > B. Make the test driver built-in, behind a Kconfig option like the > existing CONFIG_LIVEUPDATE_TEST, and drop this patch from this > series. vfio-pci would still need exports though. > > Can you say more about what your concern is? The concern is to add dangerous exports without in-tree actual users. > Is it mainly about which > modules can call these functions, or about drivers registering Live > Update file handlers at all? If it's the latter, I'd like to understand > it, since that's how drivers like vfio-pci are expected to preserve The main concert is adding it without a real user, which is a complete no-go. But even with a user like vfio-pci (which should have been part of the series) this looks dangerous enough to not be exported globally. ---end quoted text---