[PATCH] kernel/module: disable cfi for do_mod_ctors

2024-05-06 Thread Joey Jiao
CFI failure when both CONFIG_CONSTRUCTORS and CFI_CLANG enabled. CFI failure at do_init_module+0x100/0x384 (target: tsan.module_ctor+0x0/0xa98 [module_name_xx]; expected type: 0xa540670c) Disable cfi for do_mod_ctors to avoid cfi check on mod->ctors[i](). Signed-off-by: Joey Jiao --- ker

[PATCH v5] module: Add CONFIG_MODULE_DISABLE_INIT_FREE option

2023-10-13 Thread Joey Jiao
could be loaded into previous freed init pages of a previous loaded module. It is important to note that this option is intended for fuzzing tests only and should not be set as the default configuration in production builds. Signed-off-by: Joey Jiao --- kernel/module/Kconfig | 13

[PATCH v4] module: Add CONFIG_MODULE_DISABLE_INIT_FREE option

2023-10-11 Thread Joey Jiao
. Signed-off-by: Joey Jiao --- kernel/module/Kconfig | 12 kernel/module/main.c | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig index 33a2e991f608..88206bc4c7d4 100644 --- a/kernel/module/Kconfig +++ b/kernel/module

[PATCH v3] module: Add CONFIG_MODULE_DISABLE_INIT_FREE option

2023-10-11 Thread Joey Jiao
. Signed-off-by: Joey Jiao --- kernel/module/Kconfig | 8 kernel/module/main.c | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig index 33a2e991f608..1cdbee4c51de 100644 --- a/kernel/module/Kconfig +++ b/kernel/module

[PATCH v2] module: Add CONFIG_MODULE_LOAD_IN_SEQUENCE option

2023-10-11 Thread Joey Jiao
When modprobe cmds are executed one by one, the final loaded modules are not in fixed sequence as expected. Add the option to make sure modules are in fixed sequence across reboot. Signed-off-by: Joey Jiao --- kernel/module/Kconfig | 11 +++ kernel/module/main.c | 3 ++- 2 files

Re: [PATCH] module: Add CONFIG_MODULE_LOAD_IN_SEQUENCE option

2023-10-11 Thread Joey Jiao
Thanks Luis, will recheck these two points. On Tue, Oct 10, 2023 at 07:21:13PM -0700, Luis Chamberlain wrote: > Please find a good email client to reply to patches. > > On Wed, Oct 11, 2023 at 01:57:58AM +0000, Joey Jiao (QUIC) wrote: > > Hi Luis, > > > > > How

RE: [PATCH] module: Add CONFIG_MODULE_LOAD_IN_SEQUENCE option

2023-10-10 Thread Joey Jiao (QUIC)
rZO8/m/WOyAKx8ZAgAJ for modprobe. THX Joey -Original Message- From: Luis Chamberlain On Behalf Of Luis Chamberlain Sent: Wednesday, October 11, 2023 6:36 AM To: Joey Jiao (QUIC) Cc: linux-modu...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [PATCH] modul

[PATCH] module: Add CONFIG_MODULE_LOAD_IN_SEQUENCE option

2023-10-08 Thread Joey Jiao
When modprobe cmds are executed one by one, the final loaded modules are not in fixed sequence as expected. Add the option to make sure modules are in fixed sequence across reboot. Signed-off-by: Joey Jiao --- kernel/module/Kconfig | 11 +++ kernel/module/main.c | 6 ++ 2 files