Re: [PATCH v3] kprobes: Fix possible use-after-free issue on kprobe registration

2024-04-10 Thread Google
On Wed, 10 Apr 2024 09:58:02 +0800 Zheng Yejian wrote: > When unloading a module, its state is changing MODULE_STATE_LIVE -> > MODULE_STATE_GOING -> MODULE_STATE_UNFORMED. Each change will take > a time. `is_module_text_address()` and `__module_text_address()` > works with MODULE_STATE_LIVE and

[PATCH v3] kprobes: Fix possible use-after-free issue on kprobe registration

2024-04-09 Thread Zheng Yejian
When unloading a module, its state is changing MODULE_STATE_LIVE -> MODULE_STATE_GOING -> MODULE_STATE_UNFORMED. Each change will take a time. `is_module_text_address()` and `__module_text_address()` works with MODULE_STATE_LIVE and MODULE_STATE_GOING. If we use `is_module_text_address()` and