linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/1] fix module sysfs patch defect
@ 2024-09-06 11:57 Chunhui Li
  2024-09-06 11:57 ` [PATCH v3 1/1] module: abort module loading when sysfs setup suffer errors Chunhui Li
  0 siblings, 1 reply; 5+ messages in thread
From: Chunhui Li @ 2024-09-06 11:57 UTC (permalink / raw)
  To: Luis Chamberlain, Matthias Brugger, AngeloGioacchino Del Regno
  Cc: linux-modules, linux-kernel, linux-arm-kernel, linux-mediatek,
	wsd_upstream, Chunhui Li

Hi Maintainer,

I have update the patch base on your feedback, please help review again.

V3:
-Fix initial value;
-Remove unnecessary checks about mod->sects_attrs
-Check sysfs_creat_* return value as error code
-Reorder the reveral of successful operations before exiting

We will use the information recorded in mod->sects_attrs for debugging.
   When a panic occurs in a .ko, we can use gdb to load the symbols of the .ko file
along with the coredump, and use the text segment address and init.text segment address
in mod->sects_attrs to debug. 
   If there is an error in add_sysfs_setup and the .ko is still loaded and runs normally,
when the ko suffer panic later, we would not be able to access the loading addresses
of the ko, which would prevent us from being able to debug effectively.
   Therefore, it is desired that if there is an error during load module, it should prevent
the ko from being inserted with insmod. This ensures that as long as the .ko is
successfully loaded, all necessary information for debugging is available.

Thanks for your time.


Chunhui Li (1):
  module: abort module loading when sysfs setup suffer errors

 kernel/module/sysfs.c | 57 +++++++++++++++++++++++++++----------------
 1 file changed, 36 insertions(+), 21 deletions(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-07 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-06 11:57 [PATCH v3 0/1] fix module sysfs patch defect Chunhui Li
2024-09-06 11:57 ` [PATCH v3 1/1] module: abort module loading when sysfs setup suffer errors Chunhui Li
2024-09-06 23:26   ` Luis Chamberlain
2024-09-07 12:55   ` kernel test robot
2024-09-07 22:19   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).