From nobody Tue Dec 16 07:33:06 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DE2C722688B; Tue, 27 May 2025 09:08:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336895; cv=none; b=PJqLiJ7aedAjPsWdBtTiAlrui6JReVlX1wO+0f7SMWtRe8GUI9pOS2Zn9KgoPu41bitawry2iRYxePt3IZlpHNh8BEchg5yDKfYPaWdIKs6FiroRC5oVdKuPNX6mVEm0S2/SrgCa++PKsRHWPU1s8VELS8Z9XHqcZqY8nP2otGI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336895; c=relaxed/simple; bh=AzvE08+Vtmh2j/LN2k0JUwxxFHlnrEYfshug5ur5K8g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ecdMGX+zzQzvTUFZlRJXAhKdejkMdiMkLweLp7NoN96uGqNj9XF06rx9svV2Qu4geT7EgfIuywfK5Jd2Ph1dYjiu0yGIgegS9B/X4mXl1kRm1zbADnH/qcVNNt+4/NU13linjmw8SuLKnY6tmfTsuoS51a7O2fTFDbD+q+eQMpc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tFm7Hz4D; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tFm7Hz4D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A80CC4CEEE; Tue, 27 May 2025 09:08:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748336894; bh=AzvE08+Vtmh2j/LN2k0JUwxxFHlnrEYfshug5ur5K8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tFm7Hz4DPlpdjUs6RTbnptqCYxl1IHBJ94qxCr7WjQD4lKFKrO3E9LckO5qUm/pIX rvYktX0GyTyxnBU972YHpXP/7Z1z65K3R6aXM38W6sv9yW4P95Mm/TenFsfouFyNqB 0gaFX6K0YF9wBhZRc8ttIQU7Cbs/vsnlx4AIaZtfup368H47oIb6/f4gumePCvbUho 5CnSdD71cCqCZas83r7ztVcpBNdM0mi8yUka/SvnQfUavNb6iDCZOWLu+shXDFwcBm 16SjCtARnWII/Gxf7VZ+KvL+dZ90b5mwbcJ8SXZ1ekKC6qkjdsz3VJsnHCORG0CHob kVzi5jetyiQNw== From: Alexey Gladkov To: Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Masahiro Yamada , Nathan Chancellor , Nicolas Schier Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, Alexey Gladkov , Khalid Aziz , "James E.J. Bottomley" , "Martin K. Petersen" Subject: [PATCH v3 1/6] scsi: Define MODULE_DEVICE_TABLE only if necessary Date: Tue, 27 May 2025 11:07:55 +0200 Message-ID: <628e85f1b7e9d0423a8b83ac3150b3e151c9c4e3.1748335606.git.legion@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Define MODULE_DEVICE_TABLE only if a structure is defined for it. drivers/scsi/BusLogic.c:3735:26: error: use of undeclared identifier 'blogi= c_pci_tbl' 3735 | MODULE_DEVICE_TABLE(pci, blogic_pci_tbl); Fixes: 1079a2d251f2 ("[SCSI] BusLogic: stop using check_region") Cc: Khalid Aziz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Alexey Gladkov --- drivers/scsi/BusLogic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 1f100270cd38..8ce2ac9293a3 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -3731,8 +3731,8 @@ static const struct pci_device_id blogic_pci_tbl[] = =3D { {PCI_DEVICE(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT)}, {0, }, }; -#endif MODULE_DEVICE_TABLE(pci, blogic_pci_tbl); +#endif =20 module_init(blogic_init); module_exit(blogic_exit); --=20 2.49.0 From nobody Tue Dec 16 07:33:06 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A7CB42505CE; Tue, 27 May 2025 09:08:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336897; cv=none; b=GMigSALsbVs/uqDAffBbO8PJ0BnzFy1AbiD4KVW8addMQ/WIgrJCNwNYV+dTapagyZqBpp6PhOTmljY06kLAgu6//xJQ+uK8ycSnvpekF5tTAiLJ7Nb2WrgkSCZ/yuSDrr9XpIB/h4VhPtO1xAmCGcD5JEKfgwXflpNQ0pPCNtM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336897; c=relaxed/simple; bh=hX/12tgr8auIKj10dYH9wCEnSPJXZ5bPUlkNsw0TL8c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AF2I5mBUXlAkWxRYRgEpN1jRZYUL4SZojcLRGsT7uJ0ZhbCWYunDk2+GJmeX1SQQcNMUVvXix7SOESJVFOt/cBrxP5q0zCerXsjjHA4VbXTJJif2o+DOpzyuxZcU1GqKKEImbo8pFfRjtHySfFogKStGACXuyDZLCA7fhsIr+9c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OKOduVeI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OKOduVeI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C38E5C4CEE9; Tue, 27 May 2025 09:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748336897; bh=hX/12tgr8auIKj10dYH9wCEnSPJXZ5bPUlkNsw0TL8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OKOduVeI4QYRoItNfElW3TQcXzqPt5ow67PnTpFJAYi+b7+6/734v0+VADKsU3IsJ yANcp17yZsMCEhSkE0Mx3BSarzR7PiYlb26bcfEWcuEJSZmX064ZItgmjh7XjJ6j9/ 5if7Z3/12uG4h7N19XVpjF1dRJDweT+aa8jIgEJwBlBaJ1zcUZMN1+GLddsCHoL0SB K19SFYO3+7jC35w9jYKFSJuBA0vYZ2epCX1iyK6GGhlVThpfxMZIEvsySI6MUc+Ozi JuZvoqTKQJt6ww1qTD4spUl0l+xRD2p9XVS0HlXUoNHnaOhvtLEOQvDoWZm6cdZqRO 3u6frEKb/55yw== From: Alexey Gladkov To: Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Masahiro Yamada , Nathan Chancellor , Nicolas Schier Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, Alexey Gladkov Subject: [PATCH v3 2/6] modules: Add macros to specify modinfo prefix Date: Tue, 27 May 2025 11:07:56 +0200 Message-ID: <5cd53f6a4bca5186d3c9c47c070883131826c5eb.1748335606.git.legion@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The __MODULE_INFO macros always use __MODULE_INFO_PREFIX. The only way to use a different prefix is to override __MODULE_INFO_PREFIX, which is not very useful. The new macro will be used in file2alias.c to generate modalias for builtin modules. Signed-off-by: Alexey Gladkov Reviewed-by: Petr Pavlu --- include/linux/module.h | 3 +++ include/linux/moduleparam.h | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index 8050f77c3b64..88048561360f 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -170,6 +170,9 @@ struct module_kobject *lookup_or_create_module_kobject(= const char *name); /* For userspace: you can also call me... */ #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias) =20 +#define MODULE_ALIAS_MODNAME(_modname, _alias) \ + __MODULE_INFO_WITH_PREFIX(_modname ".", alias, alias, _alias) + /* Soft module dependencies. See man modprobe.d for details. * Example: MODULE_SOFTDEP("pre: module-foo module-bar post: module-baz") */ diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index bfb85fd13e1f..3f819fc67c43 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -20,10 +20,13 @@ /* Chosen so that structs with an unsigned long line up. */ #define MAX_PARAM_PREFIX_LEN (64 - sizeof(unsigned long)) =20 -#define __MODULE_INFO(tag, name, info) \ +#define __MODULE_INFO_WITH_PREFIX(prefix, tag, name, info) \ static const char __UNIQUE_ID(name)[] \ __used __section(".modinfo") __aligned(1) \ - =3D __MODULE_INFO_PREFIX __stringify(tag) "=3D" info + =3D prefix __stringify(tag) "=3D" info + +#define __MODULE_INFO(tag, name, info) \ + __MODULE_INFO_WITH_PREFIX(__MODULE_INFO_PREFIX, tag, name, info) =20 #define __MODULE_PARM_TYPE(name, _type) \ __MODULE_INFO(parmtype, name##type, #name ":" _type) --=20 2.49.0 From nobody Tue Dec 16 07:33:06 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 639AF253931; Tue, 27 May 2025 09:08:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336901; cv=none; b=XhJKkdWtfcp7Vra/vXh4fzgfPlpWwZq18zIrgmXziPgCcNyBhoLyCQVuWccF9ukkgA3YZoWUTAqQN6dCL8PiTWL0esHYXwa5Yv/k8rQKeP6p+97x+oTNEe2PKso7czxzw6GKcUmfSCLZtu06RDjFGQS8uNBj5jIvax1WnNlBA+Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336901; c=relaxed/simple; bh=DKOaNGI5NZtDaEHT/OdeqlteuIvyX6aHBbn+vBanltk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Szv8BEzuJ8P2N2WW88Dzgr5ZBj4Ce5T0RPO7WeUrOKK9RxreKbIbkgkgy6y701xbbA4NLg/L9Ouh49Q0lb+8t3Q6OKczVSjqgLAsGZdChX4s0XF4rrIGOAK1xd/7Xu1e+ezQ6rS4FgzYGCKOyr1RrzFkEgxkMfFZCcO3YT3708A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TzYY1JSB; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TzYY1JSB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 895F5C4CEF2; Tue, 27 May 2025 09:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748336899; bh=DKOaNGI5NZtDaEHT/OdeqlteuIvyX6aHBbn+vBanltk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TzYY1JSBNdNZDfLr+3/hyd/HKQCOFSWycptt2HyAW20dv1AYXyV8EoFsmPjOOVdck QuqqiMTgTFNZ1pNNfIpY1Uljg3Hy7bXoXgUjm6XZ7hC9lXsQgQvceW8voiEvW1Gwqv mHRy9k7Cxc2wlRZilBpcSWZYUyS1Hv3QeTrWAT5GxlskP7w4oYY6iSoxovBSHE6bme sYkM4oDps5fLC/C+DbNbzzMRiWDplx1myP3nEchWryJooNFzuBybJkaxyaP1rqe1U9 Cbis8Q3ssTf5oLqGqa4cIDAnuIWEJKO3ymj9Uid0C4B3xju9zR1Qg/B/16MNkTVUXC o2o9CwDiz838g== From: Alexey Gladkov To: Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Masahiro Yamada , Nathan Chancellor , Nicolas Schier Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, Alexey Gladkov Subject: [PATCH v3 3/6] modpost: Make mod_device_table aliases more unique Date: Tue, 27 May 2025 11:07:57 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" In order to avoid symbol conflicts if they appear in the same binary, a more unique alias identifier can be generated. Signed-off-by: Alexey Gladkov Reviewed-by: Petr Pavlu --- include/linux/module.h | 14 ++++++++++++-- scripts/mod/file2alias.c | 18 ++++++++++++++---- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index 88048561360f..e7506684069d 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -249,10 +249,20 @@ struct module_kobject *lookup_or_create_module_kobjec= t(const char *name); /* What your module does. */ #define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _descrip= tion) =20 +/* Format: __mod_device_table____kmod_____ */ +#define __mod_device_table(type, name) \ + __PASTE(__mod_device_table__, \ + __PASTE(__COUNTER__, \ + __PASTE(__, \ + __PASTE(__KBUILD_MODNAME, \ + __PASTE(__, \ + __PASTE(type, \ + __PASTE(__, name))))))) + #ifdef MODULE /* Creates an alias so file2alias.c can find device table. */ -#define MODULE_DEVICE_TABLE(type, name) \ -extern typeof(name) __mod_device_table__##type##__##name \ +#define MODULE_DEVICE_TABLE(type, name) \ +extern typeof(name) __mod_device_table(type, name) \ __attribute__ ((unused, alias(__stringify(name)))) #else /* !MODULE */ #define MODULE_DEVICE_TABLE(type, name) diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 00586119a25b..dff1799a4c79 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -1476,8 +1476,8 @@ void handle_moddevtable(struct module *mod, struct el= f_info *info, { void *symval; char *zeros =3D NULL; - const char *type, *name; - size_t typelen; + const char *type, *name, *modname; + size_t typelen, modnamelen; static const char *prefix =3D "__mod_device_table__"; =20 /* We're looking for a section relative symbol */ @@ -1488,10 +1488,20 @@ void handle_moddevtable(struct module *mod, struct = elf_info *info, if (ELF_ST_TYPE(sym->st_info) !=3D STT_OBJECT) return; =20 - /* All our symbols are of form __mod_device_table____. */ + /* All our symbols are of form __mod_device_table____kmod_____. */ if (!strstarts(symname, prefix)) return; - type =3D symname + strlen(prefix); + + modname =3D strstr(symname, "__kmod_"); + if (!modname) + return; + modname +=3D strlen("__kmod_"); + + type =3D strstr(modname, "__"); + if (!type) + return; + modnamelen =3D type - modname; + type +=3D strlen("__"); =20 name =3D strstr(type, "__"); if (!name) --=20 2.49.0 From nobody Tue Dec 16 07:33:06 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 25E90253B67; Tue, 27 May 2025 09:08:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336903; cv=none; b=Tpl3Zs/NLffa/sy00t2sElHdliHRlhaWGeZIX5mPoLLzwjCyE/TZtlKxd2Y3tpNybJnwA3o4I9beh6//Gz7MM120dN7Sd96M1eET2QTnxngfFsmma5hRMAYfKdhI8XB2ClH9NzIUeWHOCMEP1KEgF57bc77ugaB5ouDPFyzlGns= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336903; c=relaxed/simple; bh=mJpj1Azln1Y2J+zvehMHovrxqXkIUpTzjvkjnQsPP6k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aD4MHqDVaHhsKTbslRdu8ZhGYA/iQV27CO0P2KjjGfgFoVyahcKLMZdywyYFatAgBCec1lJN+qOqORwmWVWjXIjoZXvcHfQaYkeNyUKBQ4KLQVvp/l47j5+yjtmEoofcFGPWjvcYx4Rfsg+gxrJcYfXYkMtCgXtau4dHj+l2oGQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=irdlx2Un; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="irdlx2Un" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EC1BC4CEEA; Tue, 27 May 2025 09:08:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748336902; bh=mJpj1Azln1Y2J+zvehMHovrxqXkIUpTzjvkjnQsPP6k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=irdlx2UnZE6MS5lIcwfz2hcG3xBxTeq50M5gsJOiva6bQTRlG7pbqeb55tpAycUU2 TsKOnzg5ESzOCEXbeKy/A0OfgtK2dTcTyMgs7FugkfdNwfliKGJijfE9pcuxG47FKu SH1DIW97obcH5fdyWvj6QFtZ2xI32vfNRpWuZXM7O/2xVKwIPkSBG7WRTNcKGkxH1G +1tEaKltquYyRK6556DGd/QidUDIPb7DhCcU04PMkbamcrEGozrwOJ8V9ViyfAKSsQ 4ZnmpN0MhAF5B7O2uaBvb05yOeiZL6I/+d+BrfkoyyYmsbAwAEWwSKV508KNzik3mu vp4oaynHUk1Iw== From: Alexey Gladkov To: Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Masahiro Yamada , Nathan Chancellor , Nicolas Schier Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, Alexey Gladkov Subject: [PATCH v3 4/6] modpost: Create modalias for builtin modules Date: Tue, 27 May 2025 11:07:58 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For some modules, modalias is generated using the modpost utility and the section is added to the module file. When a module is added inside vmlinux, modpost does not generate modalias for such modules and the information is lost. As a result kmod (which uses modules.builtin.modinfo in userspace) cannot determine that modalias is handled by a builtin kernel module. $ cat /sys/devices/pci0000:00/0000:00:14.0/modalias pci:v00008086d0000A36Dsv00001043sd00008694bc0Csc03i30 $ modinfo xhci_pci name: xhci_pci filename: (builtin) license: GPL file: drivers/usb/host/xhci-pci description: xHCI PCI Host Controller Driver Missing modalias "pci:v*d*sv*sd*bc0Csc03i30*" which will be generated by modpost if the module is built separately. To fix this it is necessary to generate the same modalias for vmlinux as for the individual modules. Fortunately '.vmlinux.export.o' is already generated from which '.modinfo' can be extracted in the same way as for vmlinux.o. Signed-off-by: Masahiro Yamada Signed-off-by: Alexey Gladkov Reviewed-by: Petr Pavlu --- include/linux/module.h | 4 ---- scripts/mod/file2alias.c | 16 ++++++++++++++++ scripts/mod/modpost.c | 13 ++++++++++++- scripts/mod/modpost.h | 2 ++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/include/linux/module.h b/include/linux/module.h index e7506684069d..0be9b0f1660e 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -259,14 +259,10 @@ struct module_kobject *lookup_or_create_module_kobjec= t(const char *name); __PASTE(type, \ __PASTE(__, name))))))) =20 -#ifdef MODULE /* Creates an alias so file2alias.c can find device table. */ #define MODULE_DEVICE_TABLE(type, name) \ extern typeof(name) __mod_device_table(type, name) \ __attribute__ ((unused, alias(__stringify(name)))) -#else /* !MODULE */ -#define MODULE_DEVICE_TABLE(type, name) -#endif =20 /* Version of form [:][-]. * Or for CVS/RCS ID version, everything but the number is stripped. diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index dff1799a4c79..d42f2c742fd6 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -1527,5 +1527,21 @@ void handle_moddevtable(struct module *mod, struct e= lf_info *info, } } =20 + if (mod->is_vmlinux) { + struct module_alias *alias; + + /* + * If this is vmlinux, record the name of the builtin module. + * Traverse the linked list in the reverse order, and set the + * builtin_modname unless it has already been set in the + * previous call. + */ + list_for_each_entry_reverse(alias, &mod->aliases, node) { + if (alias->builtin_modname) + break; + alias->builtin_modname =3D xstrndup(modname, modnamelen); + } + } + free(zeros); } diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index be89921d60b6..c7c601c6f82d 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2021,11 +2021,22 @@ static void write_if_changed(struct buffer *b, cons= t char *fname) static void write_vmlinux_export_c_file(struct module *mod) { struct buffer buf =3D { }; + struct module_alias *alias, *next; =20 buf_printf(&buf, - "#include \n"); + "#include \n" + "#include \n"); =20 add_exported_symbols(&buf, mod); + + list_for_each_entry_safe(alias, next, &mod->aliases, node) { + buf_printf(&buf, "MODULE_ALIAS_MODNAME(\"%s\", \"%s\");\n", + alias->builtin_modname, alias->str); + list_del(&alias->node); + free(alias->builtin_modname); + free(alias); + } + write_if_changed(&buf, ".vmlinux.export.c"); free(buf.p); } diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 9133e4c3803f..2aecb8f25c87 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -99,10 +99,12 @@ buf_write(struct buffer *buf, const char *s, int len); * struct module_alias - auto-generated MODULE_ALIAS() * * @node: linked to module::aliases + * @modname: name of the builtin module (only for vmlinux) * @str: a string for MODULE_ALIAS() */ struct module_alias { struct list_head node; + char *builtin_modname; char str[]; }; =20 --=20 2.49.0 From nobody Tue Dec 16 07:33:06 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E5C3A25484A; Tue, 27 May 2025 09:08:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336906; cv=none; b=UpBqjI6cjOh2bBTq3jGNZM+nr/ftG2idz7y1yf6DErXAmIzFDMREdVmW7OhM90FnV/9rjdRyq/MG8b7yGL7a6l3OL3hdzgnT6grArEe9j2TTWosY98NGAMY6zHYk/2eZndQMZ24JY732ZWyt+d2YQS/WONtgLKwHVEnNpERaun8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336906; c=relaxed/simple; bh=VdO5wAhaBHemzC1FBtwJHS2mCJGZ/sVY+nfWpqo8Wew=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GPT8R0UAb6on9flHWDKMnCKOP0I1ScOXPVKFqSkMeZ/ASDG+tgW++Kd6rp+H8VMZUyq5VTfWXg3NdaHqxaHHClITFr27NMd9hjcLU27g0AyX1dI4lpw0hA+Jjrd9it2R6GXQRi8x/GDRMxXSglHigOhMC4eG7WQXjpOnZtO4Bcs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l2NvsH9q; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l2NvsH9q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 154A0C4CEEF; Tue, 27 May 2025 09:08:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748336905; bh=VdO5wAhaBHemzC1FBtwJHS2mCJGZ/sVY+nfWpqo8Wew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l2NvsH9qGTZox+nqFTkB8LDxngfyYyc30PfEhu4CRgamM/cxpGUzs+TX30tSlJ0lD VvGjdxHTCvbOhWy/O3rHe5jkXokeV6gsqwAJa2BHxc1EOVzImVRUbhEKpv3tCAq7VE LiYuBBPTNy3ChHdT8peaj4U0OlvaeF+1pVYEZvysyYYtu/u2G17ymCaPTH9bFfX+rF 8ortPbjzat2llqBuIBiXboXZqvVO7JTXEC1wQptS63E9KA5so+KIyIOA7Ji794Bc9y tVUGlLjJv4D4qyz5Jil1Zg3bnFlBp1x9spVHxlSm9nRnmdeChHYcweM4XTCdBEQGrE qzJZo8eTIUlZA== From: Alexey Gladkov To: Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Masahiro Yamada , Nathan Chancellor , Nicolas Schier Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, Alexey Gladkov Subject: [PATCH v3 5/6] kbuild: Move modules.builtin.modinfo to another makefile Date: Tue, 27 May 2025 11:07:59 +0200 Message-ID: <1910073cfee59df4a3edb7f724214eeb4b8a3faa.1748335606.git.legion@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The creation of modules.builtin.modinfo is going to depend on .vmlinux.export.o so it is worth moving its creation closer to it. Signed-off-by: Alexey Gladkov --- scripts/Makefile.vmlinux | 24 ++++++++++++++++++++++++ scripts/Makefile.vmlinux_o | 26 +------------------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index b64862dc6f08..250c0492b7e0 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -97,6 +97,30 @@ ifdef CONFIG_BUILDTIME_TABLE_SORT $(vmlinux-final): scripts/sorttable endif =20 +# modules.builtin.modinfo +# ------------------------------------------------------------------------= --- + +OBJCOPYFLAGS_modules.builtin.modinfo :=3D -j .modinfo -O binary + +targets +=3D modules.builtin.modinfo +modules.builtin.modinfo: vmlinux.o FORCE + $(call if_changed,objcopy) + +# modules.builtin +# ------------------------------------------------------------------------= --- + +# The second line aids cases where multiple modules share the same object. + +quiet_cmd_modules_builtin =3D GEN $@ + cmd_modules_builtin =3D \ + tr '\0' '\n' < $< | \ + sed -n 's/^[[:alnum:]:_]*\.file=3D//p' | \ + tr ' ' '\n' | uniq | sed -e 's:^:kernel/:' -e 's/$$/.ko/' > $@ + +targets +=3D modules.builtin +modules.builtin: modules.builtin.modinfo FORCE + $(call if_changed,modules_builtin) + # modules.builtin.ranges # ------------------------------------------------------------------------= --- ifdef CONFIG_BUILTIN_MODULE_RANGES diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o index b024ffb3e201..23c8751285d7 100644 --- a/scripts/Makefile.vmlinux_o +++ b/scripts/Makefile.vmlinux_o @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only =20 PHONY :=3D __default -__default: vmlinux.o modules.builtin.modinfo modules.builtin +__default: vmlinux.o =20 include include/config/auto.conf include $(srctree)/scripts/Kbuild.include @@ -73,30 +73,6 @@ vmlinux.o: $(initcalls-lds) vmlinux.a $(KBUILD_VMLINUX_L= IBS) FORCE =20 targets +=3D vmlinux.o =20 -# modules.builtin.modinfo -# ------------------------------------------------------------------------= --- - -OBJCOPYFLAGS_modules.builtin.modinfo :=3D -j .modinfo -O binary - -targets +=3D modules.builtin.modinfo -modules.builtin.modinfo: vmlinux.o FORCE - $(call if_changed,objcopy) - -# modules.builtin -# ------------------------------------------------------------------------= --- - -# The second line aids cases where multiple modules share the same object. - -quiet_cmd_modules_builtin =3D GEN $@ - cmd_modules_builtin =3D \ - tr '\0' '\n' < $< | \ - sed -n 's/^[[:alnum:]:_]*\.file=3D//p' | \ - tr ' ' '\n' | uniq | sed -e 's:^:kernel/:' -e 's/$$/.ko/' > $@ - -targets +=3D modules.builtin -modules.builtin: modules.builtin.modinfo FORCE - $(call if_changed,modules_builtin) - # Add FORCE to the prerequisites of a target to force it to be always rebu= ilt. # ------------------------------------------------------------------------= --- =20 --=20 2.49.0 From nobody Tue Dec 16 07:33:06 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 48DE624DD0B; Tue, 27 May 2025 09:08:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336908; cv=none; b=eyFz2MzXU/yRczFXc6NKolVXG0QlXKQJ8z1NnqP3XsBhcdAOg+AMfpvqbCzxK7I9195tt9MRx0X8GlfN4pWp8nqpP78MRbP8J9KOH3Svs571ZD4O01zgQgdxB6h33FLYE2Gef5jkH1Tz0648/qs34ujRjMZ+hGm+27LVEmg5Jvk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748336908; c=relaxed/simple; bh=mJ+u0dFjvmLhWGCyPBZC6SR0CjXWkRKtEUQyqfmbyZA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m+ZgNo2vGd67S3yE5uL+m0+h4XrywrT0iOolsG189b1v46ZHdg/+4vvimI1zhkUMoDqUotHXNnIOvceXzV5fSgWEINoixn1mZdnzRP0BS/PTln8aaFjyRXfThWugM/eAcLV5JtaxtSU7D3qnOpkgclq17xOvSPFpvEIups68JNo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=StCqwQGu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="StCqwQGu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D05D9C4CEEE; Tue, 27 May 2025 09:08:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748336908; bh=mJ+u0dFjvmLhWGCyPBZC6SR0CjXWkRKtEUQyqfmbyZA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=StCqwQGuNrVgFgShnwE9QA4NR2Dc6TP3BZ+3NBDt9lBj2J/Y5y/Y0pw54N9LsiTsu cPqHMsTFaFMYWBK1PFHHJjhdU1i/CEoUgWGUhx0sbtdImVBn+XZ8ofQYGzH3qiWvYa B7gFuzqiz/KF52I6rncyuqaCNL7t28FeoV4Y5PiL90mD7gtOnpOLeg8fHE3Ux0b2g0 qax7PF4zT+hjYtsJnqBpFpWlhBrxVnRZ9LkMrDAF4KVBhXMQTPDHAudQS7Eo9gev1p 1NPk8b2Ese3JKM/YGHWQjfTuAl4N/gFFN9JU2v7l1TpdZ4FWmfx8npDFsfuMBQxwaI fkkAlwl/e1+Sg== From: Alexey Gladkov To: Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Masahiro Yamada , Nathan Chancellor , Nicolas Schier Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, Alexey Gladkov Subject: [PATCH v3 6/6] kbuild: Create modules.builtin.modinfo for modpost results Date: Tue, 27 May 2025 11:08:00 +0200 Message-ID: <6e34b761f118c2b2a4d05cabe9ad89ee8e1dd4c6.1748335606.git.legion@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Create modules.builtin.modinfo as a combination of modinfo from vmlinux and the result of generating modalias by modpost. Signed-off-by: Alexey Gladkov --- scripts/Makefile.vmlinux | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.vmlinux b/scripts/Makefile.vmlinux index 250c0492b7e0..8fed895fd858 100644 --- a/scripts/Makefile.vmlinux +++ b/scripts/Makefile.vmlinux @@ -70,6 +70,18 @@ endif ifdef CONFIG_MODULES targets +=3D .vmlinux.export.o $(vmlinux-final): .vmlinux.export.o + +# .module.builtin.modinfo.modpost +# ------------------------------------------------------------------------= --- +__default: .modules.builtin.modinfo.modpost + +OBJCOPYFLAGS_.modules.builtin.modinfo.modpost :=3D -j .modinfo -O binary + +targets +=3D .modules.builtin.modinfo.modpost +.modules.builtin.modinfo.modpost: .vmlinux.export.o FORCE + $(call if_changed,objcopy) + +modules.builtin.modinfo: .modules.builtin.modinfo.modpost endif =20 ifdef CONFIG_ARCH_WANTS_PRE_LINK_VMLINUX @@ -97,14 +109,26 @@ ifdef CONFIG_BUILDTIME_TABLE_SORT $(vmlinux-final): scripts/sorttable endif =20 +# .module.builtin.modinfo.vmlinux +# ------------------------------------------------------------------------= --- +__default: .modules.builtin.modinfo.vmlinux + +OBJCOPYFLAGS_.modules.builtin.modinfo.vmlinux :=3D -j .modinfo -O binary + +targets +=3D .modules.builtin.modinfo.vmlinux +.modules.builtin.modinfo.vmlinux: vmlinux.o FORCE + $(call if_changed,objcopy) + # modules.builtin.modinfo # ------------------------------------------------------------------------= --- =20 -OBJCOPYFLAGS_modules.builtin.modinfo :=3D -j .modinfo -O binary +quiet_cmd_modules_builtin_modinfo =3D GEN $@ + cmd_modules_builtin_modinfo =3D \ + cat $< $(wildcard .modules.builtin.modinfo.modpost) > $@ =20 targets +=3D modules.builtin.modinfo -modules.builtin.modinfo: vmlinux.o FORCE - $(call if_changed,objcopy) +modules.builtin.modinfo: .modules.builtin.modinfo.vmlinux FORCE + $(call if_changed,modules_builtin_modinfo) =20 # modules.builtin # ------------------------------------------------------------------------= --- --=20 2.49.0 From nobody Tue Dec 16 07:33:06 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 887B1192D87; Tue, 27 May 2025 13:17:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748351820; cv=none; b=TFo8lAWGEiF75s5hUS38PuFt0Hi59omm9aswxGVV5dL4M2N9aXUrTbzujx4ydOJvjnNqOrUeHS7Jb8NVUTLeRVHl+ICjF/f4kpeT57g3VbcfsSP3js3S2lFvJoI9GFpPjmOJVLzEUmNCCb2ZpQ4dQegwtgig1FpfHeW+1ng9+NA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748351820; c=relaxed/simple; bh=n/H8Wa7Ftb0H4j1QNhebHw57Ogax0FKs1fXVb4lhuj4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dRmsrITM+4CasV8IQivDSO1s0TIdmc/fxY8/6AW4UpYM/AidLuY6Id2ZJaiqJymvtJCy3z8kmX27wjq6XYuuaXkQ78ASWk1hTDOGlNRkE+l7qTr8+X5Gpv/SdmxXHxIEY2MxSJp29vuwpH5rBtsAMc5ikdPtOLnzT5ebE/UtObo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HhvOlfHu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HhvOlfHu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0312C4CEE9; Tue, 27 May 2025 13:16:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748351820; bh=n/H8Wa7Ftb0H4j1QNhebHw57Ogax0FKs1fXVb4lhuj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HhvOlfHun5eWDOutHEK8j3nc/KMUkcJkrhBYNOzh/fWupluJQqOw3m0iDqlrHeL47 2GkHK98Km3bB4Ew5ABQYgufA8eoUWV01ox21ePYM7KH4zXcppG19a2NWL6Sk5yr12d mwlyJy4ek9R1cep8okRA2oNYKNGCradFPRRz2cBz0fNIo3x2zRLfKPM5Ut7cI+qjI6 0ROMPJNI6o2TGeDhKd5O85aOFVrxf9I1Ijvfda1eak3k6aSEUyrcdSVK4/hFdO9xzh 7b5F2P9IKpM7m8f8ZAsz/731rwQpHnCnfjjTNIfRXFQGcI3RULLceCKEuYPdK9ifYl MJFdDRsnFrQDA== From: Alexey Gladkov To: James Bottomley , Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Khalid Aziz , "Martin K. Petersen" Cc: linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-scsi@vger.kernel.org, Alexey Gladkov Subject: [PATCH v3 7/6] scsi: Always define MODULE_DEVICE_TABLE Date: Tue, 27 May 2025 15:15:44 +0200 Message-ID: <20250527131544.63330-1-legion@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since MODULE_DEVICE_TABLE no longer depends on whether the module is built separately or compiled into the kernel, it now makes sense to always define DEVICE_TABLE. In this case, even if the module is in the kernel, correct module.builtin.modaliases will be generated. Suggested-by: James Bottomley Signed-off-by: Alexey Gladkov --- drivers/scsi/BusLogic.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 8ce2ac9293a3..08e12a3d6703 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -3715,7 +3715,6 @@ static void __exit blogic_exit(void) =20 __setup("BusLogic=3D", blogic_setup); =20 -#ifdef MODULE /*static const struct pci_device_id blogic_pci_tbl[] =3D { { PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, @@ -3732,7 +3731,6 @@ static const struct pci_device_id blogic_pci_tbl[] = =3D { {0, }, }; MODULE_DEVICE_TABLE(pci, blogic_pci_tbl); -#endif =20 module_init(blogic_init); module_exit(blogic_exit); --=20 2.49.0