The TCP Option Address (TOA) module is a kernel module that obtains the source IPv4 address from the option section of a TCP header.
此分支用于适配kylin v10 aarch64系统。
创建次分支的原因是官方版本在kylin v10 aarch64上编译失败(centos 7.x aarch64上同样编译失败)。
对应的bug TOA arm64 编译报错 #9
#......
/root/toa/toa.c:104:5: error: implicit declaration of function ‘lookup_address’ [-Werror=implicit-function-declaration]
#......
/root/toa/toa.c:118:21: error: ‘_PAGE_RW’ undeclared (first use in this function)
if (pte->pte &~ _PAGE_RW) pte->pte |= _PAGE_RW;
#......
- 更换了去除写保护的方法,将lookup_address换成了apply_to_page_range;
- Kylin v10 sp1的kallsyms中没有暴露init_mm地址,增加了从/boot/System.map中解析地址的能力。
Kylin-Server-10-SP1-Release-Build04-20200711-arm64
Kylin-Server-10-SP2-Release-Build09-20210524-arm64
The development environment for compiling the kernel module consists of:
- kernel headers and the module library
- the gcc compiler
- GNU Make tool
Download and decompress the source package:
https://github.com/Huawei/TCP_option_address/archive/master.zip
Enter the source code directory and compile the module:
cd src
make
Load the kernel module:
sudo insmod toa.ko
TOA is distributed under the terms of the GNU General Public License v2.0. The full terms and conditions of this license are detailed in the LICENSE file.