TIME_WAIT : tcp_tw_reuse https://blog.csdn.net/mystyle_/article/details/119176327
setsockopt https://blog.csdn.net/sinc00/article/details/46989777 https://www.cnblogs.com/cthon/p/9270778.html
eBPF syscall hook https://bbs.kanxue.com/thread-274901.htm
system call table https://github.com/A7um/syscallhook
Kernel-Symbol-Table https://www.cnblogs.com/LittleHann/p/4127096.html
Linux下Hook方式汇总 https://zhuanlan.zhihu.com/p/198960996
https://blog.csdn.net/faxiang1230/article/details/103370497 splicing http://www.ksplice.com/doc/ksplice.pdf
https://poppopret.org/2013/01/07/suterusu-rootkit-inline-kernel-function-hooking-on-x86-and-arm/#arm
代理协议 proxy_protocol https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt FROM https://www.jianshu.com/p/cc8d592582c9
进程调度 https://deepinout.com/linux-kernel-api/linux-kernel-api-process-scheduling/linux-kernel-api-wake_up_process.html
内核空间:kthread_create kthread_stop wake_up_process
用户空间:schedule();
进程调度相关:
https://www.apispace.com/news/post/27165.html int nice(int inc);nice value getpriority/setpriority函数 sched_getaffinity和sched_setaffinity
getrlimit() setrlimit()
资源限制 http://e.betheme.net/article/show-1355487.aspx?action=onClick 在Linux系统中,进程资源限制分为软限制(soft limit)和硬限制(hard limit)两种。
但是在linux内核5.x里,entrySYSCALL64的实现改了,不再试图用过call syscalltable[index]的方式进行系统调用,而是引入了一个dosyscall64的符号。具体的看下面截取的源码
https://blog.csdn.net/weixin_42915431/article/details/106507066 kallsyms_lookup_name | system.map | PAGE_OFFSET -> NR_close
https://www.cnblogs.com/bittorrent/p/3804141.html 读取/proc/kallsyms
https://zhuanlan.zhihu.com/p/480934356 设置 sys_call_table 数组为可写状态
https://blog.csdn.net/q759451733/article/details/124105195 不同版本 方式 kprobe
https://zhuanlan.zhihu.com/p/446785414 asmlinkage 与 寄存器传参 在内核态直接写入用户态内存 copy_to_user
https://blog.csdn.net/Haomione/article/details/122217131 copy_to_user copy_from_user
https://zhuanlan.zhihu.com/p/102957159 copy_to_user & copy_from_user 的说明
https://www.cnblogs.com/xinghuo123/p/13796932.html linux系统调用-SYSCALL_DEFINEx详解
https://blog.csdn.net/weixin_45930312/article/details/126255496 采用既有系统调用(文件系统 read/write)向内核传递可读写用户空间地址
https://blog.csdn.net/cwdben/article/details/119919094 linux内核模块与用户程序共享内存
内核热补丁 https://cloud.tencent.com/developer/article/1646414 klp_enable_patch 在内核代码中,就有热补丁的例子在samples/livepatch目录下
https://blog.csdn.net/qq_37858386/article/details/78444168 export 与 extern
kernel crypto https://www.kernel.org/doc/html/latest/crypto/index.html
C++ in kernel : https://olegkutkov.me/2019/11/10/cpp-in-linux-kernel/
https://blog.csdn.net/sinat_32960911/article/details/128582089 关于kernfs的说明:sysfs功能代码的抽离
https://www.kernel.org/doc/html/latest/filesystems/index.html Filesystems in the Linux kernel
ANSI escape codes :https://notes.burke.libbey.me/ansi-escape-codes/
https://blog.csdn.net/qq_40843865/article/details/102498310 删除操作 TODO -- 检查各种情况下的无子节点情况
https://www.geeksforgeeks.org/introduction-to-red-black-tree/ 所以说很多东西,我们都是知其然不知其所以然,内部的很多规律定则,我们并没有搞清楚,只是照葫芦画瓢
linux驱动15---linux内核静态库的编译与使用 分类: LINUX2016-05-05 10:48:11 有时会遇到这样的情况,跟其它厂商合作时,厂商只给了库及其头文件, 然后加入到内核源码中进行编译,下面就摸拟这种情况.
- linux 内核目录下编译靜态库 cong@msi:/work/qemu/linux-3.0.1$ mkdir -pv drivers/mylib/ ;;在driver/mylib目录下放静态库的代码 cong@msi:/work/qemu/linux-3.0.1$ cat drivers/mylib/Makefile ;;编译静态库的Makefile,只有一行 lib-y := mylib.o cong@msi:/work/qemu/linux-3.0.1$ cat drivers/mylib/mylib.c ;;静态库的内容,就一个打印函数 #include #include #include int mylib_func(void) { printk("mylib func\n"); return 0; } EXPORT_SYMBOL(mylib_func); cong@msi:/work/qemu/linux-3.0.1$ cat include/linux/mylib.h ;;静态库的头文件 #ifndef _MYLIB_H #define _MYLIB_H int mylib_func(void); #endif /* _MYLIB_H */ cong@msi:/work/qemu/linux-3.0.1$ vi drivers/Makefile ;;最后在上级目录drivers的Makefile加入 obj-y += mylib/ ;;自己的库的编译 make编译内核,则会在drivers/mylib/目录下编译出静态库来了 cong@msi:/work/qemu/linux-3.0.1$ ls drivers/mylib/ built-in.o lib.a Makefile modules.order mylib.c mylib.o 2.linux内核使用静态库 cong@msi:/work/qemu/linux-3.0.1$ cat drivers/hello/hello.c #include <linux/kernel.h> #include <linux/module.h> #include <linux/mylib.h> ;;加入静态库的头文件 static int __init hello_init(void) { int ret = 0; printk(KERN_INFO "next cong test mylib\n"); mylib_func(); ;;调用静态库的函数 return ret; } static void __exit hello_exit(void) { return ; } MODULE_AUTHOR(" cong"); MODULE_DESCRIPTION("test mylib"); MODULE_LICENSE("GPL"); module_init(hello_init); module_exit(hello_exit);
cong@msi:/work/qemu/linux-3.0.1$ cat drivers/hello/Makefile ;;加入调用静态库的函数 obj-y += hello.o ../mylib/lib.a
cong@msi:/work/qemu/linux-3.0.1$ vi drivers/Makefile obj-y += hello/
3.最后试一下去掉静态库源码,只保留库 cong@msi:/work/qemu/linux-3.0.1$ cp ./drivers/mylib/lib.a ./drivers/hello/ ;;将库copy到调用库的地方 cong@msi:/work/qemu/linux-3.0.1$ vi drivers/Makefile #obj-y += mylib/ ;; 去掉库的编译 cong@msi:/work/qemu/linux-3.0.1$ rm -rf drivers/mylib ;; 同时去掉库的源码
cong@msi:/work/qemu/linux-3.0.1$ vi drivers/hello/Makefile ;; 修改调用者的Makefile obj-y += hello.o lib.a
#JavaScript 字体解析 https://zhangzhipeng.net/2020/04/19/js%e8%a7%a3%e6%9e%90ttf%e5%ad%97%e4%bd%93%e6%96%87%e4%bb%b6/