Live Patches: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Der Seiteninhalt wurde durch einen anderen Text ersetzt: „*fedora“)
Markierung: Ersetzt
Zeile 1: Zeile 1:
=fedora=
+
*[[fedora]]
==Tools==
 
*dnf -y install git make
 
==Clone kpatch==
 
*git clone https://github.com/dynup/kpatch
 
==Alles was gebraucht wird, wird installiert==
 
*make dependencies
 
==Der Patch==
 
*cat meminfo-string.patch
 
<pre>
 
Index: src/fs/proc/meminfo.c
 
===================================================================
 
--- src.orig/fs/proc/meminfo.c
 
+++ src/fs/proc/meminfo.c
 
@@ -95,7 +95,7 @@ static int meminfo_proc_show(struct seq_
 
"Committed_AS:  %8lu kB\n"
 
"VmallocTotal:  %8lu kB\n"
 
"VmallocUsed:    %8lu kB\n"
 
- "VmallocChunk:  %8lu kB\n"
 
+ "VMALLOCCHUNK:  %8lu kB\n"
 
#ifdef CONFIG_MEMORY_FAILURE
 
"HardwareCorrupted: %5lu kB\n"
 
#endif
 
</pre>
 
 
 
==Patch kompilieren==
 
*kpatch-build meminfo-string.patch
 
<pre>
 
Fedora distribution detected
 
Downloading kernel source for 6.2.9-300.fc38.x86_64
 
</pre>
 
 
 
==Kontrolle==
 
*grep -i chunk /proc/meminfo
 
VMALLOCCHUNK:  0 kB
 
 
 
==Patch laden==
 
*kpatch load kpatch-meminfo-string.ko
 
loading patch module: livepatch-meminfo-string.ko
 
==Patch hat gezogen==
 
*grep -i chunk /proc/meminfo
 
VMALLOCCHUNK:  34359337092 kB
 

Version vom 26. Juni 2023, 19:59 Uhr