mirror of https://github.com/dynup/kpatch
35 lines
1005 B
Diff
35 lines
1005 B
Diff
|
diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c
|
||
|
--- src.orig/fs/proc/cmdline.c 2016-11-30 20:10:24.498178250 +0000
|
||
|
+++ src/fs/proc/cmdline.c 2016-11-30 20:31:53.195178250 +0000
|
||
|
@@ -27,3 +27,10 @@ static int __init proc_cmdline_init(void
|
||
|
return 0;
|
||
|
}
|
||
|
module_init(proc_cmdline_init);
|
||
|
+
|
||
|
+#include <linux/printk.h>
|
||
|
+void kpatch_print_message(void)
|
||
|
+{
|
||
|
+ if (!jiffies)
|
||
|
+ printk("hello there!\n");
|
||
|
+}
|
||
|
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
|
||
|
--- src.orig/fs/proc/meminfo.c 2016-11-30 20:10:24.499178250 +0000
|
||
|
+++ src/fs/proc/meminfo.c 2016-11-30 20:32:38.308178250 +0000
|
||
|
@@ -16,6 +16,8 @@
|
||
|
#include <asm/pgtable.h>
|
||
|
#include "internal.h"
|
||
|
|
||
|
+void kpatch_print_message(void);
|
||
|
+
|
||
|
void __attribute__((weak)) arch_report_meminfo(struct seq_file *m)
|
||
|
{
|
||
|
}
|
||
|
@@ -85,6 +87,7 @@ static int meminfo_proc_show(struct seq_
|
||
|
/*
|
||
|
* Tagged format, for easy grepping and expansion.
|
||
|
*/
|
||
|
+ kpatch_print_message();
|
||
|
seq_printf(m,
|
||
|
"MemTotal: %8lu kB\n"
|
||
|
"MemFree: %8lu kB\n"
|