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

TOA arm64 编译报错 #9

Open ken2008huang opened 3 years ago

ken2008huang commented 3 years ago

TOA arm64 编译报错 +pte_t lookup_address(unsigned long addr, unsigned int level) +{

pxunl commented 3 years ago

@ken2008huang 重新实现lookup_address还不行哦 报错:_PAGE_RW这个找不到定义。 求问最后解决了吗

laurretang commented 1 year ago

我也遇到类似的问题,请问最后解决了吗? make -C /lib/modules/4.18.0-193.1.2.el8.aarch64/build M=/root/toa modules EXTRA_CFLAGS="-DTOA_DBG_MSG" make[1]: Entering directory `/usr/src/kernels/linux-4.18.0-193.1.2.el8_2'

WARNING: Symbol version dump ./Module.symvers is missing; modules will have no dependencies and modversions.

CC [M] /root/toa/toa.o /root/toa/toa.c: In function ‘is_ro_addr’: /root/toa/toa.c:104:5: error: implicit declaration of function ‘lookup_address’ [-Werror=implicit-function-declaration] pte_t pte = lookup_address(addr, &level); ^ /root/toa/toa.c:104:18: warning: initialization makes pointer from integer without a cast [enabled by default] pte_t pte = lookup_address(addr, &level); ^ /root/toa/toa.c:105:21: error: ‘_PAGE_RW’ undeclared (first use in this function) if (pte->pte &~ _PAGE_RW) ^ /root/toa/toa.c:105:21: note: each undeclared identifier is reported only once for each function it appears in /root/toa/toa.c: In function ‘set_addr_rw’: /root/toa/toa.c:116:18: warning: initialization makes pointer from integer without a cast [enabled by default] pte_t pte = lookup_address(addr, &level); ^ /root/toa/toa.c:118:21: error: ‘_PAGE_RW’ undeclared (first use in this function) if (pte->pte &~ _PAGE_RW) pte->pte |= _PAGE_RW; ^ /root/toa/toa.c: In function ‘set_addr_ro’: /root/toa/toa.c:124:18: warning: initialization makes pointer from integer without a cast [enabled by default] pte_t pte = lookup_address(addr, &level); ^ /root/toa/toa.c:126:27: error: ‘_PAGE_RW’ undeclared (first use in this function) pte->pte = pte->pte &~_PAGE_RW; ^ cc1: some warnings being treated as errors make[2]: [/root/toa/toa.o] Error 1 make[1]: [module/root/toa] Error 2 make[1]: Leaving directory `/usr/src/kernels/linux-4.18.0-193.1.2.el8_2'