lkrg-org / lkrg

Linux Kernel Runtime Guard
https://lkrg.org
Other
402 stars 72 forks source link

Compilation warning #264

Closed jvoisin closed 1 year ago

jvoisin commented 1 year ago

I get the following warnings on eaf83476463e22b065a0ab9ee896fd1a563fc44d. Nothing horrible, but it would still be nice to get it fixed or silenced.

In file included from ./include/linux/srcu.h:21,
                 from ./include/linux/notifier.h:16,
                 from ./arch/x86/include/asm/uprobes.h:13,
                 from ./include/linux/uprobes.h:49,
                 from ./include/linux/mm_types.h:16,
                 from ./include/linux/buildid.h:5,
                 from ./include/linux/module.h:14,
                 from /opt/lkrg/src/modules/exploit_detection/../../p_lkrg_main.h:26,
                 from /opt/lkrg/src/modules/exploit_detection/p_exploit_detection.c:18:
In function ‘p_ed_wq_valid_cache_delete’,
    inlined from ‘p_exploit_detection_exit’ at /opt/lkrg/src/modules/exploit_detection/p_exploit_detection.c:2062:4:
./include/linux/workqueue.h:640:3: warning: call to ‘__warn_flushing_systemwide_wq’ declared with attribute warning: Please avoid flushing system-wide workqueues. [-Wattribute-warning]
  640 |   __warn_flushing_systemwide_wq();   \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/lkrg/src/modules/exploit_detection/p_exploit_detection.c:382:4: note: in expansion of macro ‘flush_workqueue’
  382 |    flush_workqueue(system_unbound_wq);
      |    ^~~~~~~~~~~~~~~
solardiz commented 1 year ago

This is a duplicate of #232, but thanks for the reminder.

jvoisin commented 1 year ago

Oops, you're absolutely right, sorry for the noise.

solardiz commented 1 year ago

@jvoisin Maybe this is your opportunity to contribute a fix, although the related code review I suggested in #232 is non-trivial.