|
Message-ID: <20181211211105.GA5196@pi3.com.pl> Date: Tue, 11 Dec 2018 22:11:05 +0100 From: Adam Zabrocki <pi3@....com.pl> To: lkrg-users@...ts.openwall.com Subject: Re: modules/self-defense/hiding/p_hiding.h:103:37: error: ‘struct module’ has no member named ‘target_list’ Hi, >From the error which you've pasted: > > error: ‘struct module’ has no member named ‘target_list’ it looks like 'target_list' is not visible in 'struct module' in your kernel definition. I've checked 4.19.8 kernel source and it looks like, this situation is only possible if you compile kernel without CONFIG_MODULE_UNLOAD: https://elixir.bootlin.com/linux/v4.19.8/source/include/linux/module.h#L463 Can you confirm this is the case for your kernel config? Thanks, Adam On Tue, Dec 11, 2018 at 09:36:04PM +0100, bryn1u85 wrote: > Hey guys, > > I have a weird problem during on compilation on Centos 7. Someone can help > me ? > > [root@...ton lkrg-0.5]# uname -a > > Linux proton.edu.pl 4.19.8 #1 SMP Tue Dec 11 14:03:18 EST 2018 x86_64 > > x86_64 x86_64 GNU/Linux > > [root@...ton lkrg-0.5]# > > > [root@...ton lkrg-0.5]# make -j8 > > make -C /lib/modules/4.19.8/build M=/root/lkrg-0.5 modules > > make[1]: Wejście do katalogu `/usr/src/kernels/4.19.8' > > CC [M] /root/lkrg-0.5/src/modules/self-defense/hiding/p_hiding.o > > CC [M] > > /root/lkrg-0.5/src/modules/exploit_detection/p_rb_ed_trees/p_rb_ed_pids/p_rb_ed_pids_tree.o > > CC [M] > > /root/lkrg-0.5/src/modules/exploit_detection/syscalls/p_sys_execve/p_sys_execve.o > > CC [M] > > /root/lkrg-0.5/src/modules/exploit_detection/syscalls/p_sys_execveat/p_sys_execveat.o > > CC [M] > > /root/lkrg-0.5/src/modules/exploit_detection/syscalls/p_do_exit/p_do_exit.o > > CC [M] > > /root/lkrg-0.5/src/modules/exploit_detection/syscalls/p_call_usermodehelper/p_call_usermodehelper.o > > CC [M] > > /root/lkrg-0.5/src/modules/exploit_detection/syscalls/p_do_fork/p_do_fork.o > > CC [M] > > /root/lkrg-0.5/src/modules/exploit_detection/syscalls/p_sys_setuid/p_sys_setuid.o > > In file included from > > /root/lkrg-0.5/src/modules/self-defense/hiding/../../../p_lkrg_main.h:23:0, > > from > > /root/lkrg-0.5/src/modules/self-defense/hiding/p_hiding.c:18: > > /root/lkrg-0.5/src/modules/self-defense/hiding/p_hiding.c: In function > > ‘p_unhide_itself’: > > /root/lkrg-0.5/src/modules/self-defense/hiding/../../../modules/self-defense/hiding/p_hiding.h:103:37: > > error: ‘struct module’ has no member named ‘target_list’ > > list_for_each_entry(p_use, &p_mod->target_list, target_list) { > > \ > > ^ > > ./include/linux/kernel.h:996:26: note: in definition of macro > > ‘container_of’ > > void *__mptr = (void *)(ptr); \ > > ^ > > ./include/linux/list.h:407:2: note: in expansion of macro ‘list_entry’ > > list_entry((ptr)->next, type, member) > > ^ > > ./include/linux/list.h:494:13: note: in expansion of macro > > ‘list_first_entry’ > > for (pos = list_first_entry(head, typeof(*pos), member); \ > > ^ > > /root/lkrg-0.5/src/modules/self-defense/hiding/../../../modules/self-defense/hiding/p_hiding.h:103:4: > > note: in expansion of macro ‘list_for_each_entry’ > > list_for_each_entry(p_use, &p_mod->target_list, target_list) { > > \ > > ^ > > /root/lkrg-0.5/src/modules/self-defense/hiding/p_hiding.c:80:4: note: in > > expansion of macro ‘P_UNHIDE_FROM_KOBJ’ > > P_UNHIDE_FROM_KOBJ(p_find_me,p_tmp_kset,p_tmp_ktype); > > ^ > > In file included from ./include/linux/export.h:45:0, > > from ./include/linux/linkage.h:7, > > from ./include/linux/kernel.h:7, > > from > > /root/lkrg-0.5/src/modules/self-defense/hiding/../../../p_lkrg_main.h:23, > > from > > /root/lkrg-0.5/src/modules/self-defense/hiding/p_hiding.c:18: > > /root/lkrg-0.5/src/modules/self-defense/hiding/../../../modules/self-defense/hiding/p_hiding.h:103:37: > > error: ‘struct module’ has no member named ‘target_list’ > > list_for_each_entry(p_use, &p_mod->target_list, target_list) { > > \ > > ^ > > ./include/linux/compiler.h:335:18: note: in definition of macro > > ‘__compiletime_assert’ > > int __cond = !(condition); \ > > ^ > > ./include/linux/compiler.h:358:2: note: in expansion of macro > > ‘_compiletime_assert’ > > _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) > > ^ > > ./include/linux/build_bug.h:45:37: note: in expansion of macro > > ‘compiletime_assert’ > > #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > > ^ > > ./include/linux/kernel.h:997:2: note: in expansion of macro > > ‘BUILD_BUG_ON_MSG’ > > BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ > > ^ > > ./include/linux/kernel.h:997:20: note: in expansion of macro ‘__same_type’ > > BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ > > ^ > > ./include/linux/list.h:396:2: note: in expansion of macro ‘container_of’ > > container_of(ptr, type, member) > > ^ > > ./include/linux/list.h:407:2: note: in expansion of macro ‘list_entry’ > > list_entry((ptr)->next, type, member) > > ^ > > ./include/linux/list.h:494:13: note: in expansion of macro > > ‘list_first_entry’ > > for (pos = list_first_entry(head, typeof(*pos), member); \ > > ^ > > /root/lkrg-0.5/src/modules/self-defense/hiding/../../../modules/self-defense/hiding/p_hiding.h:103:4: > > note: in expansion of macro ‘list_for_each_entry’ > > list_for_each_entry(p_use, &p_mod->target_list, target_list) { > > \ > > ^ > > /root/lkrg-0.5/src/modules/self-defense/hiding/p_hiding.c:80:4: note: in > > expansion of macro ‘P_UNHIDE_FROM_KOBJ’ > > P_UNHIDE_FROM_KOBJ(p_find_me,p_tmp_kset,p_tmp_ktype); > > ^ > > /root/lkrg-0.5/src/modules/self-defense/hiding/../../../modules/self-defense/hiding/p_hiding.h:103:37: > > error: ‘struct module’ has no member named ‘target_list’ > > list_for_each_entry(p_use, &p_mod->target_list, target_list) { > > \ > > ^ > > ./include/linux/compiler.h:335:18: note: in definition of macro > > ‘__compiletime_assert’ > > int __cond = !(condition); \ > > ^ > > ./include/linux/compiler.h:358:2: note: in expansion of macro > > ‘_compiletime_assert’ > > _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) > > ^ > > ./include/linux/build_bug.h:45:37: note: in expansion of macro > > ‘compiletime_assert’ > > #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) > > ^ > > ./include/linux/kernel.h:997:2: note: in expansion of macro > > ‘BUILD_BUG_ON_MSG’ > > BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ > > ^ > > ./include/linux/kernel.h:998:6: note: in expansion of macro ‘__same_type’ > > !__same_type(*(ptr), void), \ > > ^ > > ./include/linux/list.h:396:2: note: in expansion of macro ‘container_of’ > > container_of(ptr, type, member) > > ^ > > ./include/linux/list.h:407:2: note: in expansion of macro ‘list_entry’ > > list_entry((ptr)->next, type, member) > > ^ > > ./include/linux/list.h:494:13: note: in expansion of macro > > ‘list_first_entry’ > > for (pos = list_first_entry(head, typeof(*pos), member); \ > > ^ > > /root/lkrg-0.5/src/modules/self-defense/hiding/../../../modules/self-defense/hiding/p_hiding.h:103:4: > > note: in expansion of macro ‘list_for_each_entry’ > > list_for_each_entry(p_use, &p_mod->target_list, target_list) { > > \ > > ^ > > /root/lkrg-0.5/src/modules/self-defense/hiding/p_hiding.c:80:4: note: in > > expansion of macro ‘P_UNHIDE_FROM_KOBJ’ > > P_UNHIDE_FROM_KOBJ(p_find_me,p_tmp_kset,p_tmp_ktype); > > ^ > > In file included from ./include/linux/module.h:9:0, > > from > > /root/lkrg-0.5/src/modules/self-defense/hiding/../../../p_lkrg_main.h:25, > > from > > /root/lkrg-0.5/src/modules/self-defense/hiding/p_hiding.c:18: > > /root/lkrg-0.5/src/modules/self-defense/hiding/../../../modules/self-defense/hiding/p_hiding.h:103:37: > > error: ‘struct module’ has no member named ‘target_list’ > > list_for_each_entry(p_use, &p_mod->target_list, target_list) { > > \ > > ^ > > ./include/linux/list.h:495:24: note: in definition of macro > > ‘list_for_each_entry’ > > &pos->member != (head); \ > > ^ > > /root/lkrg-0.5/src/modules/self-defense/hiding/p_hiding.c:80:4: note: in > > expansion of macro ‘P_UNHIDE_FROM_KOBJ’ > > P_UNHIDE_FROM_KOBJ(p_find_me,p_tmp_kset,p_tmp_ktype); > > ^ > > make[2]: *** [/root/lkrg-0.5/src/modules/self-defense/hiding/p_hiding.o] > > Błąd 1 > > make[2]: *** Oczekiwanie na niezakończone zadania.... > > make[1]: *** [_module_/root/lkrg-0.5] Błąd 2 > > make[1]: Opuszczenie katalogu `/usr/src/kernels/4.19.8' > > make: *** [all] Błąd 2 > > [root@...ton lkrg-0.5]# > > > Thanks ! -- pi3 (pi3ki31ny) - pi3 (at) itsec pl http://pi3.com.pl
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.