Huawei / TCP_option_address

A kernel module to obtain source IP address in the TCP option section.
GNU General Public License v2.0
184 stars 61 forks source link

Since Kernel 5.7 kallsyms_lookup_name is not longer exported so the module won't compile #10

Open spielkind opened 3 years ago

spielkind commented 3 years ago

Since Kernel 5.7 kallsyms_lookup_name is not longer exported so the module won't compile https://github.com/torvalds/linux/commit/0bd476e6c67190b5eb7b6e105c8db8ff61103281

❯ make
make CONFIG_TOA=m  -C /lib/modules/`uname -r`/build M=`pwd` modules EXTRA_CFLAGS="-DTOA_IPV6_ENABLE"
make[1]: Entering directory '/usr/lib/modules/5.14.3-arch1-1/build'
  CC [M]  /home/keutterling/dtag/git/github/TCP_option_address/src/toa.o
  MODPOST /home/keutterling/dtag/git/github/TCP_option_address/src/Module.symvers
ERROR: modpost: "kallsyms_lookup_name" [/home/keutterling/dtag/git/github/TCP_option_address/src/toa.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:150: /home/keutterling/dtag/git/github/TCP_option_address/src/Module.symvers] Error 1
make[2]: *** Deleting file '/home/keutterling/dtag/git/github/TCP_option_address/src/Module.symvers'
make[1]: *** [Makefile:1766: modules] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.14.3-arch1-1/build'
make: *** [Makefile:8: default] Error 2
netw0rm commented 2 years ago

have you installed linux-headers.

hallelujah-shih commented 1 year ago

Since Kernel 5.7 kallsyms_lookup_name is not longer exported so the module won't compile torvalds/linux@0bd476e

❯ make
make CONFIG_TOA=m  -C /lib/modules/`uname -r`/build M=`pwd` modules EXTRA_CFLAGS="-DTOA_IPV6_ENABLE"
make[1]: Entering directory '/usr/lib/modules/5.14.3-arch1-1/build'
  CC [M]  /home/keutterling/dtag/git/github/TCP_option_address/src/toa.o
  MODPOST /home/keutterling/dtag/git/github/TCP_option_address/src/Module.symvers
ERROR: modpost: "kallsyms_lookup_name" [/home/keutterling/dtag/git/github/TCP_option_address/src/toa.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:150: /home/keutterling/dtag/git/github/TCP_option_address/src/Module.symvers] Error 1
make[2]: *** Deleting file '/home/keutterling/dtag/git/github/TCP_option_address/src/Module.symvers'
make[1]: *** [Makefile:1766: modules] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.14.3-arch1-1/build'
make: *** [Makefile:8: default] Error 2

https://lwn.net/Articles/813350/ 看这意思,就是为了堵住这个口子,老哥解决了吗?

Lxy12138 commented 1 year ago

Since Kernel 5.7 kallsyms_lookup_name is not longer exported so the module won't compile torvalds/linux@0bd476e

❯ make
make CONFIG_TOA=m  -C /lib/modules/`uname -r`/build M=`pwd` modules EXTRA_CFLAGS="-DTOA_IPV6_ENABLE"
make[1]: Entering directory '/usr/lib/modules/5.14.3-arch1-1/build'
  CC [M]  /home/keutterling/dtag/git/github/TCP_option_address/src/toa.o
  MODPOST /home/keutterling/dtag/git/github/TCP_option_address/src/Module.symvers
ERROR: modpost: "kallsyms_lookup_name" [/home/keutterling/dtag/git/github/TCP_option_address/src/toa.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:150: /home/keutterling/dtag/git/github/TCP_option_address/src/Module.symvers] Error 1
make[2]: *** Deleting file '/home/keutterling/dtag/git/github/TCP_option_address/src/Module.symvers'
make[1]: *** [Makefile:1766: modules] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.14.3-arch1-1/build'
make: *** [Makefile:8: default] Error 2

https://lwn.net/Articles/813350/ 看这意思,就是为了堵住这个口子,老哥解决了吗?

可以参考这个项目,https://github.com/4ltern4te/kallsyms_lookup_name_finder/blob/main/kallsyms_lookup_name_finder.c