kpatch/test/integration/linux-5.10.11/new-globals.patch
Artem Savkov 0baefa561b test/integration: add upstream 5.10.11 patches
Add patches rebased on top of upstream 5.10.11 tarball. Integration
tests for these can be ran as this:

make PATCH_DIR="linux-5.10.11" KPATCHBUILD_OPTS="-s /path/to/src/linux-5.10.11" integration-slow

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2021-02-17 12:59:54 +01:00

35 lines
1.1 KiB
Diff

diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c
--- src.orig/fs/proc/cmdline.c 2021-01-28 04:47:10.915473099 -0500
+++ src/fs/proc/cmdline.c 2021-01-28 05:04:23.106898578 -0500
@@ -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 -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
--- src.orig/fs/proc/meminfo.c 2021-01-28 04:47:10.916473090 -0500
+++ src/fs/proc/meminfo.c 2021-01-28 05:04:23.141898268 -0500
@@ -19,6 +19,8 @@
#include <asm/page.h>
#include "internal.h"
+void kpatch_print_message(void);
+
void __attribute__((weak)) arch_report_meminfo(struct seq_file *m)
{
}
@@ -55,6 +57,7 @@ static int meminfo_proc_show(struct seq_
sreclaimable = global_node_page_state_pages(NR_SLAB_RECLAIMABLE_B);
sunreclaim = global_node_page_state_pages(NR_SLAB_UNRECLAIMABLE_B);
+ kpatch_print_message();
show_val_kb(m, "MemTotal: ", i.totalram);
show_val_kb(m, "MemFree: ", i.freeram);
show_val_kb(m, "MemAvailable: ", available);