<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/index.php?action=history&amp;feed=atom&amp;title=Kernel_live_patching</id>
	<title>Kernel live patching - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/index.php?action=history&amp;feed=atom&amp;title=Kernel_live_patching"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Kernel_live_patching&amp;action=history"/>
	<updated>2026-05-05T22:21:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Kernel_live_patching&amp;diff=24439&amp;oldid=prev</id>
		<title>Sertonix: + Category:Kernel</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Kernel_live_patching&amp;diff=24439&amp;oldid=prev"/>
		<updated>2023-08-25T01:21:18Z</updated>

		<summary type="html">&lt;p&gt;+ &lt;a href=&quot;/wiki/Category:Kernel&quot; title=&quot;Category:Kernel&quot;&gt;Category:Kernel&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:21, 25 August 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot;&gt;Line 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Check that the patch has been loaded: &amp;lt;code&amp;gt;grep -i chunk /proc/meminfo&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Check that the patch has been loaded: &amp;lt;code&amp;gt;grep -i chunk /proc/meminfo&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Disable the patch: &amp;lt;code&amp;gt;doas kpatch unload kpatch-some.ko&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;# Disable the patch: &amp;lt;code&amp;gt;doas kpatch unload kpatch-some.ko&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Kernel]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sertonix</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Kernel_live_patching&amp;diff=22186&amp;oldid=prev</id>
		<title>Androw: Created page with &quot;Kernel Live Patching (KLP) enables the capacity to apply patch to the kernel without rebooting the system.  To use KLP, you should follow the following steps: * Run a livepatc...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Kernel_live_patching&amp;diff=22186&amp;oldid=prev"/>
		<updated>2022-08-06T12:33:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Kernel Live Patching (KLP) enables the capacity to apply patch to the kernel without rebooting the system.  To use KLP, you should follow the following steps: * Run a livepatc...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Kernel Live Patching (KLP) enables the capacity to apply patch to the kernel without rebooting the system.&lt;br /&gt;
&lt;br /&gt;
To use KLP, you should follow the following steps:&lt;br /&gt;
* Run a livepatching enabled kernel&lt;br /&gt;
* Obtain the source tree of the kernel&lt;br /&gt;
* Prepare and build the patch&lt;br /&gt;
* Apply the patch&lt;br /&gt;
&lt;br /&gt;
You can use Kernel Live Patching in Alpine Linux by running a modified kernel.&lt;br /&gt;
&lt;br /&gt;
= Building the kernel =&lt;br /&gt;
&lt;br /&gt;
# Obtain the source&lt;br /&gt;
# Enable the following flag CONFIG_LIVEPATCH and CONFIG_DEBUG_INFO&lt;br /&gt;
# Build the kernel: &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;&lt;br /&gt;
# Install: &amp;lt;code&amp;gt;doas make modules_install &amp;amp;&amp;amp; doas make install&amp;lt;/code&amp;gt;&lt;br /&gt;
# Rebuild initramfs&lt;br /&gt;
# Update bootloader&lt;br /&gt;
# Reboot: &amp;lt;code&amp;gt;doas reboot&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Patching the kernel =&lt;br /&gt;
&lt;br /&gt;
# Install kpatch: &amp;lt;code&amp;gt;doas apk add kpatch&amp;lt;/code&amp;gt;&lt;br /&gt;
# Prepare the patch. You can create a file some.patch containing something around the following (it can need update depending on the kernel version):&lt;br /&gt;
&lt;br /&gt;
 Index: src/fs/proc/meminfo.c&lt;br /&gt;
 ===================================================================&lt;br /&gt;
 --- src.orig/fs/proc/meminfo.c&lt;br /&gt;
 +++ src/fs/proc/meminfo.c&lt;br /&gt;
 @@ -95,7 +95,7 @@ static int meminfo_proc_show(struct seq_&lt;br /&gt;
  		&amp;quot;Committed_AS:   %8lu kB\n&amp;quot;&lt;br /&gt;
  		&amp;quot;VmallocTotal:   %8lu kB\n&amp;quot;&lt;br /&gt;
  		&amp;quot;VmallocUsed:    %8lu kB\n&amp;quot;&lt;br /&gt;
 -		&amp;quot;VmallocChunk:   %8lu kB\n&amp;quot;&lt;br /&gt;
 +		&amp;quot;VMALLOCCHUNK:   %8lu kB\n&amp;quot;&lt;br /&gt;
  #ifdef CONFIG_MEMORY_FAILURE&lt;br /&gt;
  		&amp;quot;HardwareCorrupted: %5lu kB\n&amp;quot;&lt;br /&gt;
  #endif&lt;br /&gt;
&lt;br /&gt;
# Build the patch: &amp;lt;code&amp;gt;kpatch-build -s /path/to/kernel/source some.patch&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Enabling the patch =&lt;br /&gt;
&lt;br /&gt;
# Enable the patch: &amp;lt;code&amp;gt;doas insmod kpatch-some.ko&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;doas kpatch load kpatch-some.ko&amp;lt;/code&amp;gt;&lt;br /&gt;
# Check that the patch has been loaded: &amp;lt;code&amp;gt;grep -i chunk /proc/meminfo&amp;lt;/code&amp;gt;&lt;br /&gt;
# Disable the patch: &amp;lt;code&amp;gt;doas kpatch unload kpatch-some.ko&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Androw</name></author>
	</entry>
</feed>