mirror of
https://github.com/dynup/kpatch
synced 2024-12-16 10:24:33 +00:00
827a143caf
This feature is implemented as: ``` [root@localhost kpatch]# insmod ./kpatch-meminfo.ko [root@localhost kpatch]# ls /sys/kernel/kpatch/patches/kpatch_meminfo/functions/meminfo_proc_show/ new_addr old_addr [root@localhost kpatch]# cat /sys/kernel/kpatch/patches/kpatch_meminfo/functions/meminfo_proc_show/new_addr 0xffffffffa05211e0 [root@localhost kpatch]# cat /sys/kernel/kpatch/patches/kpatch_meminfo/functions/meminfo_proc_show/old_addr 0xffffffff8125d0e0 ``` The patch module init function will allocate and init kpatch_func_obj with customized kobj_type func_ktype. The attribute new_addr and old_addr of kpatch_func_obj is attached to this func_ktype, so that these files could be created by kobject_add automatically. Signed-off-by: Jincheng Miao <jincheng.miao@gmail.com> |
||
---|---|---|
.. | ||
core | ||
patch | ||
Makefile |