hideproc-lkm icon indicating copy to clipboard operation
hideproc-lkm copied to clipboard

make gives error ‘struct upid’ has no member named ‘pid_chain’

Open adwait-thattey opened this issue 6 years ago • 3 comments

Hello, I tried to "make" the module but I am getting the following list of errors

error: ‘struct upid’ has no member named ‘pid_chain’

I tried a lot of things but none seem to work. What could be the issue?
Help appreciated.

Full Error Dump :

make -C /lib/modules/4.15.0-42-generic/build M=/home/coderdude/Desktop/hideproc-lkm modules make[1]: Entering directory '/usr/src/linux-headers-4.15.0-42-generic' CC [M] /home/coderdude/Desktop/hideproc-lkm/hideproc.o In file included from ./include/linux/init.h:5:0, from /home/coderdude/Desktop/hideproc-lkm/hideproc.c:1: /home/coderdude/Desktop/hideproc-lkm/hideproc.c: In function ‘hideproc_init’: ./include/linux/kernel.h:947:51: error: ‘struct upid’ has no member named ‘pid_chain’ BUILD_BUG_ON_MSG(!__same_type((ptr), ((type )0)->member) &&
^ ./include/linux/compiler.h:310:19: note: in definition of macro ‘__compiletime_assert’ bool __cond = !(condition);
^~~~~~~~~ ./include/linux/compiler.h:333:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, _compiletime_assert, LINE) ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:47:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:20: note: in expansion of macro ‘__same_type’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:755:13: note: in expansion of macro ‘hlist_entry_safe’ for (pos = hlist_entry_safe((head)->first, typeof(
(pos)), member);
^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:119:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/compiler_types.h:58:0, from ././include/linux/kconfig.h:74, from :0: ./include/linux/compiler-gcc.h:170:2: error: ‘struct upid’ has no member named ‘pid_chain’ __builtin_offsetof(a, b) ^ ./include/linux/stddef.h:17:32: note: in expansion of macro ‘__compiler_offsetof’ #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^~~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:950:21: note: in expansion of macro ‘offsetof’ ((type )(__mptr - offsetof(type, member))); }) ^~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:755:13: note: in expansion of macro ‘hlist_entry_safe’ for (pos = hlist_entry_safe((head)->first, typeof(
(pos)), member);
^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:119:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/module.h:9:0, from /home/coderdude/Desktop/hideproc-lkm/hideproc.c:2: ./include/linux/list.h:757:35: error: ‘struct upid’ has no member named ‘pid_chain’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^ ./include/linux/list.h:744:12: note: in definition of macro ‘hlist_entry_safe’ ({ typeof(ptr) ____ptr = (ptr);
^~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:119:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ ./include/linux/list.h:757:35: error: ‘struct upid’ has no member named ‘pid_chain’ pos = hlist_entry_safe((pos)->member.next, typeof((pos)), member)) ^ ./include/linux/list.h:744:28: note: in definition of macro ‘hlist_entry_safe’ ({ typeof(ptr) ____ptr = (ptr);
^~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:119:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/list.h:9:0, from ./include/linux/module.h:9, from /home/coderdude/Desktop/hideproc-lkm/hideproc.c:2: ./include/linux/kernel.h:946:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] void __mptr = (void )(ptr);
^ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:757:13: note: in expansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:119:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/init.h:5:0, from /home/coderdude/Desktop/hideproc-lkm/hideproc.c:1: ./include/linux/kernel.h:947:32: error: invalid type argument of unary ‘
’ (have ‘int’) BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~ ./include/linux/compiler.h:310:19: note: in definition of macro ‘__compiletime_assert’ bool __cond = !(condition);
^~~~~~~~~ ./include/linux/compiler.h:333:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, _compiletime_assert, LINE) ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:47:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:20: note: in expansion of macro ‘__same_type’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:757:13: note: in expansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:119:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:51: error: ‘struct upid’ has no member named ‘pid_chain’ BUILD_BUG_ON_MSG(!__same_type((ptr), ((type )0)->member) &&
^ ./include/linux/compiler.h:310:19: note: in definition of macro ‘__compiletime_assert’ bool __cond = !(condition);
^~~~~~~~~ ./include/linux/compiler.h:333:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, _compiletime_assert, LINE) ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:47:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:20: note: in expansion of macro ‘__same_type’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:757:13: note: in expansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:119:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:948:18: error: invalid type argument of unary ‘
’ (have ‘int’) !__same_type((ptr), void),
^~~~~~ ./include/linux/compiler.h:310:19: note: in definition of macro ‘__compiletime_assert’ bool __cond = !(condition);
^~~~~~~~~ ./include/linux/compiler.h:333:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, _compiletime_assert, LINE) ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:47:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~~~~~~ ./include/linux/kernel.h:948:6: note: in expansion of macro ‘__same_type’ !__same_type(
(ptr), void),
^~~~~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:757:13: note: in expansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof((pos)), member)) ^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:119:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/compiler_types.h:58:0, from ././include/linux/kconfig.h:74, from :0: ./include/linux/compiler-gcc.h:170:2: error: ‘struct upid’ has no member named ‘pid_chain’ __builtin_offsetof(a, b) ^ ./include/linux/stddef.h:17:32: note: in expansion of macro ‘__compiler_offsetof’ #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^~~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:950:21: note: in expansion of macro ‘offsetof’ ((type )(__mptr - offsetof(type, member))); }) ^~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:757:13: note: in expansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:119:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/init.h:5:0, from /home/coderdude/Desktop/hideproc-lkm/hideproc.c:1: ./include/linux/kernel.h:947:51: error: ‘struct upid’ has no member named ‘pid_chain’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^ ./include/linux/compiler.h:310:19: note: in definition of macro ‘__compiletime_assert’ bool __cond = !(condition);
^~~~~~~~~ ./include/linux/compiler.h:333:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, _compiletime_assert, LINE) ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:47:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:20: note: in expansion of macro ‘__same_type’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:755:13: note: in expansion of macro ‘hlist_entry_safe’ for (pos = hlist_entry_safe((head)->first, typeof(
(pos)), member);
^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:140:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/compiler_types.h:58:0, from ././include/linux/kconfig.h:74, from :0: ./include/linux/compiler-gcc.h:170:2: error: ‘struct upid’ has no member named ‘pid_chain’ __builtin_offsetof(a, b) ^ ./include/linux/stddef.h:17:32: note: in expansion of macro ‘__compiler_offsetof’ #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^~~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:950:21: note: in expansion of macro ‘offsetof’ ((type )(__mptr - offsetof(type, member))); }) ^~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:755:13: note: in expansion of macro ‘hlist_entry_safe’ for (pos = hlist_entry_safe((head)->first, typeof(
(pos)), member);
^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:140:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/module.h:9:0, from /home/coderdude/Desktop/hideproc-lkm/hideproc.c:2: ./include/linux/list.h:757:35: error: ‘struct upid’ has no member named ‘pid_chain’ pos = hlist_entry_safe((pos)->member.next, typeof((pos)), member)) ^ ./include/linux/list.h:744:12: note: in definition of macro ‘hlist_entry_safe’ ({ typeof(ptr) ____ptr = (ptr);
^~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:140:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ ./include/linux/list.h:757:35: error: ‘struct upid’ has no member named ‘pid_chain’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^ ./include/linux/list.h:744:28: note: in definition of macro ‘hlist_entry_safe’ ({ typeof(ptr) ____ptr = (ptr);
^~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:140:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/list.h:9:0, from ./include/linux/module.h:9, from /home/coderdude/Desktop/hideproc-lkm/hideproc.c:2: ./include/linux/kernel.h:946:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] void __mptr = (void )(ptr);
^ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:757:13: note: in expansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:140:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/init.h:5:0, from /home/coderdude/Desktop/hideproc-lkm/hideproc.c:1: ./include/linux/kernel.h:947:32: error: invalid type argument of unary ‘
’ (have ‘int’) BUILD_BUG_ON_MSG(!__same_type((ptr), ((type )0)->member) &&
^~~~~~ ./include/linux/compiler.h:310:19: note: in definition of macro ‘__compiletime_assert’ bool __cond = !(condition);
^~~~~~~~~ ./include/linux/compiler.h:333:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, _compiletime_assert, LINE) ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:47:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:20: note: in expansion of macro ‘__same_type’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:757:13: note: in expansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:140:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:51: error: ‘struct upid’ has no member named ‘pid_chain’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^ ./include/linux/compiler.h:310:19: note: in definition of macro ‘__compiletime_assert’ bool __cond = !(condition);
^~~~~~~~~ ./include/linux/compiler.h:333:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, _compiletime_assert, LINE) ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:47:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:20: note: in expansion of macro ‘__same_type’ BUILD_BUG_ON_MSG(!__same_type(
(ptr), ((type )0)->member) &&
^~~~~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:757:13: note: in expansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:140:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:948:18: error: invalid type argument of unary ‘’ (have ‘int’) !__same_type((ptr), void),
^~~~~~ ./include/linux/compiler.h:310:19: note: in definition of macro ‘__compiletime_assert’ bool __cond = !(condition);
^~~~~~~~~ ./include/linux/compiler.h:333:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, _compiletime_assert, LINE) ^~~~~~~~~~~~~~~~~~~ ./include/linux/build_bug.h:47:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:947:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(!__same_type((ptr), ((type )0)->member) &&
^~~~~~~~~~~~~~~~ ./include/linux/kernel.h:948:6: note: in expansion of macro ‘__same_type’ !__same_type(
(ptr), void),
^~~~~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:757:13: note: in expansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:140:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ In file included from ./include/linux/compiler_types.h:58:0, from ././include/linux/kconfig.h:74, from :0: ./include/linux/compiler-gcc.h:170:2: error: ‘struct upid’ has no member named ‘pid_chain’ __builtin_offsetof(a, b) ^ ./include/linux/stddef.h:17:32: note: in expansion of macro ‘__compiler_offsetof’ #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^~~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:950:21: note: in expansion of macro ‘offsetof’ ((type )(__mptr - offsetof(type, member))); }) ^~~~~~~~ ./include/linux/list.h:734:40: note: in expansion of macro ‘container_of’ #define hlist_entry(ptr, type, member) container_of(ptr,type,member) ^~~~~~~~~~~~ ./include/linux/list.h:745:15: note: in expansion of macro ‘hlist_entry’ ____ptr ? hlist_entry(____ptr, type, member) : NULL;
^~~~~~~~~~~ ./include/linux/list.h:757:13: note: in expansion of macro ‘hlist_entry_safe’ pos = hlist_entry_safe((pos)->member.next, typeof(
(pos)), member)) ^~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:140:5: note: in expansion of macro ‘hlist_for_each_entry’ hlist_for_each_entry(pupid, phlist, pid_chain) { ^~~~~~~~~~~~~~~~~~~~ /home/coderdude/Desktop/hideproc-lkm/hideproc.c:144:41: error: ‘struct upid’ has no member named ‘pid_chain’ toremove[toremove_idx++] = &(pupid->pid_chain); ^~ scripts/Makefile.build:339: recipe for target '/home/coderdude/Desktop/hideproc-lkm/hideproc.o' failed make[2]: *** [/home/coderdude/Desktop/hideproc-lkm/hideproc.o] Error 1 Makefile:1551: recipe for target 'module/home/coderdude/Desktop/hideproc-lkm' failed make[1]: *** [module/home/coderdude/Desktop/hideproc-lkm] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-42-generic' Makefile:3: recipe for target 'all' failed make: *** [all] Error 2

adwait-thattey avatar Dec 09 '18 17:12 adwait-thattey

Hi,

Can you post the output of uname -r?

Thx

Iansus avatar Dec 09 '18 18:12 Iansus

4.15.0-42-generic

I am using lubuntu 18.04

gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)

adwait-thattey avatar Dec 09 '18 19:12 adwait-thattey

As stated in the repo description, this only had been tested on 4.9. Changes in kernel structures may accurate before and after.

Iansus avatar Dec 09 '18 22:12 Iansus