mirror of
https://github.com/openwall/lkrg.git
synced 2023-12-13 21:30:29 +01:00
Add dependency on CONFIG_OPTPROBES
If CONFIG_OPTPROBES is not enabled, don't try to sync with kprobe optimizer
This commit is contained in:
parent
7d45ab04d3
commit
7f9742103e
3 changed files with 6 additions and 0 deletions
|
@ -355,7 +355,9 @@ int p_create_database(void) {
|
|||
p_db.p_module_list_hash,p_db.p_module_kobj_hash);
|
||||
|
||||
P_SYM(p_state_init) = 1;
|
||||
#if defined(CONFIG_OPTPROBES)
|
||||
P_SYM(p_wait_for_kprobe_optimizer)();
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_GRKERNSEC)
|
||||
p_text_section_lock();
|
||||
|
|
|
@ -443,6 +443,7 @@ static int __init p_lkrg_register(void) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_OPTPROBES)
|
||||
P_SYM(p_wait_for_kprobe_optimizer) = (void (*)(void))P_SYM(p_kallsyms_lookup_name)("wait_for_kprobe_optimizer");
|
||||
|
||||
if (!P_SYM(p_wait_for_kprobe_optimizer)) {
|
||||
|
@ -451,6 +452,7 @@ static int __init p_lkrg_register(void) {
|
|||
p_ret = P_LKRG_GENERAL_ERROR;
|
||||
goto p_main_error;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Freeze all non-kernel processes
|
||||
while (P_SYM(p_freeze_processes)())
|
||||
|
|
|
@ -222,7 +222,9 @@ typedef struct _p_lkrg_global_symbols_structure {
|
|||
struct dyn_ftrace *(*p_ftrace_rec_iter_record)(struct ftrace_rec_iter *iter);
|
||||
struct mutex *p_ftrace_lock;
|
||||
#endif
|
||||
#if defined(CONFIG_OPTPROBES)
|
||||
void (*p_wait_for_kprobe_optimizer)(void);
|
||||
#endif
|
||||
struct module *p_find_me;
|
||||
unsigned int p_state_init;
|
||||
|
||||
|
|
Loading…
Reference in a new issue