From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4530D1A76BC for ; Mon, 20 Oct 2025 20:40:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760992819; cv=none; b=qbRL8SIxjFZKYsLO+i4YA2qMT38sUJ7n7vlLxR2R9LTA0Hp7xlJtZmUl3DOd3W5gXjs1S8a45gty17Esl+7Mn14CaolrB58wPENSpI7ZmSA4Rhg+o3vmknRFGh8hq2baeIIkgGmUI52RQQMuUcW85GCkZ5Nqj09nCIh1Oe1okPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760992819; c=relaxed/simple; bh=9wUkGqUIBXLJujqdoNDRnEhUy5hWTQBgT9hIAnXOT+o=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type:References; b=OwgGE3dqOBoLUZzXktP2YAePF0EbelLBJeEYLabU0+HrXNxoMv7MNyVV5MLwsngrVBzDP1359QJqX3TUYTg8RaKteeM9a7OzWRLV/CzUOef4ftKdqHyuMgLa75QYusJp7d5f/Xrpbn/Pvwyifd0KtOe6L91Fi2grBhZUWc3Xmsw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=uCJoUzx2; arc=none smtp.client-ip=210.118.77.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="uCJoUzx2" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20251020204015euoutp020ac7b82dd414ca0df00d6cc3e9628341~wTaKts38H2245322453euoutp02S for ; Mon, 20 Oct 2025 20:40:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20251020204015euoutp020ac7b82dd414ca0df00d6cc3e9628341~wTaKts38H2245322453euoutp02S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1760992815; bh=LqJNb4Chs0cDieqVOpjUeWEQ6aUffVpBGo18AK7yOy4=; h=Date:Subject:To:Cc:From:In-Reply-To:References:From; b=uCJoUzx2Jd0WGTVxZtD5njK5keWng6uxJA9lJ3lYE0QEaWq3cFNCZegENDQsXQ7sv BjD8gcfmUsNG0JeW4dmu2awRPNCSchF+Julew+FE5EPxSdBeM/vGDH/scpFcq/gGMm 00qDrh5WvFlRv6b/GfJBwXN7XpOu7fiiGIJh2T6Y= Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20251020204013eucas1p29b00e200fcb635983bda03a4f34616e4~wTaJabuQd2129121291eucas1p2-; Mon, 20 Oct 2025 20:40:13 +0000 (GMT) Received: from [106.210.134.192] (unknown [106.210.134.192]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20251020204012eusmtip293bec40fb5818f44f74687d0c53be37d~wTaIZyVML0756007560eusmtip2B; Mon, 20 Oct 2025 20:40:12 +0000 (GMT) Message-ID: <98a11c7b-590b-49e3-99ab-b0857329b0a5@samsung.com> Date: Mon, 20 Oct 2025 22:40:12 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Betterbird (Windows) Subject: Re: [PATCH] module: Fix device table module aliases To: Josh Poimboeuf , x86@kernel.org Cc: linux-kernel@vger.kernel.org, Petr Mladek , Miroslav Benes , Joe Lawrence , live-patching@vger.kernel.org, Song Liu , laokz , Jiri Kosina , Marcos Paulo de Souza , Weinan Liu , Fazla Mehrab , Chen Zhongjin , Puranjay Mohan , Dylan Hatch , Peter Zijlstra , Alexander Stein , Mark Brown , Cosmin Tanislav Content-Language: en-US From: Marek Szyprowski In-Reply-To: Content-Transfer-Encoding: 7bit X-CMS-MailID: 20251020204013eucas1p29b00e200fcb635983bda03a4f34616e4 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20251020175415eucas1p18b060df78fab64a52a29ad10ac25869e X-EPHeader: CA X-CMS-RootMailID: 20251020175415eucas1p18b060df78fab64a52a29ad10ac25869e References: On 20.10.2025 19:53, Josh Poimboeuf wrote: > Commit 6717e8f91db7 ("kbuild: Remove 'kmod_' prefix from > __KBUILD_MODNAME") inadvertently broke module alias generation for > modules which rely on MODULE_DEVICE_TABLE(). > > It removed the "kmod_" prefix from __KBUILD_MODNAME, which caused > MODULE_DEVICE_TABLE() to generate a symbol name which no longer matched > the format expected by handle_moddevtable() in scripts/mod/file2alias.c. > > As a result, modpost failed to find the device tables, leading to > missing module aliases. > > Fix this by explicitly adding the "kmod_" string within the > MODULE_DEVICE_TABLE() macro itself, restoring the symbol name to the > format expected by file2alias.c. > > Fixes: 6717e8f91db7 ("kbuild: Remove 'kmod_' prefix from __KBUILD_MODNAME") > Reported-by: Alexander Stein > Reported-by: Marek Szyprowski > Reported-by: Mark Brown > Reported-by: Cosmin Tanislav > Signed-off-by: Josh Poimboeuf This fixes the issue observed on my test systems. Thanks! Closes: https://lore.kernel.org/all/d7b49971-8d77-43e2-b0cd-a70c6463ea57@samsung.com/ Tested-by: Marek Szyprowski > --- > include/linux/module.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/linux/module.h b/include/linux/module.h > index e135cc79aceea..d80c3ea574726 100644 > --- a/include/linux/module.h > +++ b/include/linux/module.h > @@ -251,10 +251,11 @@ struct module_kobject *lookup_or_create_module_kobject(const char *name); > */ > #define __mod_device_table(type, name) \ > __PASTE(__mod_device_table__, \ > + __PASTE(kmod_, \ > __PASTE(__KBUILD_MODNAME, \ > __PASTE(__, \ > __PASTE(type, \ > - __PASTE(__, name))))) > + __PASTE(__, name)))))) > > /* Creates an alias so file2alias.c can find device table. */ > #define MODULE_DEVICE_TABLE(type, name) \ Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland