Compiling and using Kpath does not restart the update Linux-kernel

Source: Internet
Author: User


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.

    1. Kpatch-build produces hot patches. Generate HotPatch by contrasting kernel differences that contain patches and do not contain patches.

    2. Hot Patch Module Kernel module file: Contains metadata for replacement functions and source functions.

    3. 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.

    4. 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:

    1. Some functions do not support hot patches, such as (Schedule (), Sys_poll (), Sys_select (), Sys_read (), Sys_nanosleep ())

    2. The initialization function does not support hot patches, such as __init

    3. Modifying statically allocated data is not supported

    4. Functions in VDSO are not supported for patch

    5. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.