Hi Kazu, On Tue, Nov 14, 2023 at 2:41 PM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab@xxxxxxx> wrote: > > On 2023/11/13 22:09, Tao Liu wrote: > > >> A few slight comments: > >> > >> - lm->mod_init_module_ptr should has the address if available, this can > >> be used? > > Sorry I didn't get your point. The value here is only used as a flag > > to indicate if the .init. section has been freed or not. Since the > > value is important, other place in crash also used it and read it > > there, symbol.c:store_module_symbols_v2() . Do you mean to share the > > value in different places so crash only read it once? > > Yes. For dumpfiles, it's always ok to use lm->mod_init_module_ptr. For > live systems, if there is a change in module load status when "mod" > command is run, reinit_modules() is executed. I think that a > contradiction rarely happens. If it happens, crash will has internal > contradictions (e.g. between "help -s" output and its load status) with > the readmem() in add_symbol_file_kallsyms(). > > So I would prefer using lm->mod_init_module_ptr for consistency. > Agreed, thanks for the explanation. Will get it updated in v2. Thanks, Tao Liu > Thanks, > Kazu > > >> - STRNEQ() is more preferable than direct strncmp() > >> > > Agreed, will get it updated in v2. > > > > Thanks, > > Tao Liu > > > >> Thanks, > >> Kazu -- Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s Contribution Guidelines: https://github.com/crash-utility/crash/wiki