Yum Install Ncurses-devel-y
TAR-XVF LINUX-4.9.3.TAR.XZ
CD linux-4.9.3/
Make Menuconfig
Make all
Make Modules_install
Make install
The Kpatch consists of four components.
Kpatch-build produces hot patches. Generate HotPatch by contrasting kernel differences that contain patches and do not contain patches.
Hot Patch Module Kernel module file: Contains metadata for replacement functions and source functions.
Kpatch Core Module kernel modules file that provides the ability to register new functions. Use the kernel kernel ftrace subsystem to redirect the original function via a hook.
Kpatch utility manages hot patches. You can configure which patches are loaded at startup. The same kernel, even if restarted, still contains the hot patch that was hit.
How to use Kpatch for hot patches
Currently supports fedora20,rhel7,ubuntu14.04,debian8.0,debian7.*
Detailed use procedure See Https://github.com/dynup/kpatch
Limit:
Some functions do not support hot patches, such as (Schedule (), Sys_poll (), Sys_select (), Sys_read (), Sys_nanosleep ())
The initialization function does not support hot patches, such as __init
Modifying statically allocated data is not supported
Functions in VDSO are not supported for patch
Kpatch and Ftrace and Kprobes are incompatible
Yum Install Kexec-tools-y
Latestkernel= ' Ls-t/boot/vmlinuz-* | Sed "s/\/boot\/vmlinuz-//g" | Head-n1 '
Echo ${latestkernel}
4.9.3
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/8C/DD/wKiom1h7qJSwuWrlAAAMnMa0tCk459.png "title=" 1.png "alt=" Wkiom1h7qjswuwrlaaamnma0tck459.png "/>
Kexec-l/boot/vmlinuz-${latestkernel}--initrd=/boot/initramfs-${latestkernel}.img--append= "' Cat/proc/cmdline '"
Kexec-e
After execution, the terminal will be disconnected because the socket is reset and reconnected.
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/8C/DA/wKioL1h7qqzgF7L8AABIkvPWt2E751.png "title=" 1.png "alt=" Wkiol1h7qqzgf7l8aabikvpwt2e751.png "/>
This article is from the "Silence" blog, make sure to keep this source http://silencezone.blog.51cto.com/3613477/1892180
Compiling and using Kpath does not restart the update Linux-kernel