mirror of
https://github.com/dynup/kpatch
synced 2025-01-02 02:32:01 +00:00
f42a4127f5
Rebase the integration test cases on top of RHEL 8.0 kernel version 4.18.0-80.el8. Suggested-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> [JT: adapt data-new-LOADED to new meminfo format, use common template for multiple.test] Signed-off-by: Julien Thierry <jthierry@redhat.com>
37 lines
947 B
Diff
37 lines
947 B
Diff
diff --git a/fs/proc/cmdline.c b/fs/proc/cmdline.c
|
|
index fa762c5..cc67970 100644
|
|
--- a/fs/proc/cmdline.c
|
|
+++ b/fs/proc/cmdline.c
|
|
@@ -17,3 +17,10 @@ static int __init proc_cmdline_init(void)
|
|
return 0;
|
|
}
|
|
fs_initcall(proc_cmdline_init);
|
|
+
|
|
+#include <linux/printk.h>
|
|
+void kpatch_print_message(void)
|
|
+{
|
|
+ if (!jiffies)
|
|
+ printk("hello there!\n");
|
|
+}
|
|
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
|
|
index 2fb0484..7dd8350 100644
|
|
--- a/fs/proc/meminfo.c
|
|
+++ b/fs/proc/meminfo.c
|
|
@@ -20,6 +20,8 @@
|
|
#include <asm/pgtable.h>
|
|
#include "internal.h"
|
|
|
|
+void kpatch_print_message(void);
|
|
+
|
|
void __attribute__((weak)) arch_report_meminfo(struct seq_file *m)
|
|
{
|
|
}
|
|
@@ -53,6 +55,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
|
|
|
|
available = si_mem_available();
|
|
|
|
+ kpatch_print_message();
|
|
show_val_kb(m, "MemTotal: ", i.totalram);
|
|
show_val_kb(m, "MemFree: ", i.freeram);
|
|
show_val_kb(m, "MemAvailable: ", available);
|