<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Androw</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Androw"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Androw"/>
	<updated>2026-05-05T20:53:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Kernel_live_patching&amp;diff=22186</id>
		<title>Kernel live patching</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Kernel_live_patching&amp;diff=22186"/>
		<updated>2022-08-06T12:33:43Z</updated>

		<summary type="html">&lt;p&gt;Androw: 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;hr /&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>