mirror of
https://github.com/dynup/kpatch
synced 2025-03-25 04:16:39 +00:00
Merge pull request #674 from joe-lawrence/rebase_tests_4.9.7-201.fc25.x86_64
testing - rebase for integration tests for Fedora 25
This commit is contained in:
commit
874b917dcb
@ -1 +1 @@
|
||||
4.8.6-300.fc25.x86_64
|
||||
4.9.7-201.fc25.x86_64
|
||||
|
@ -1,11 +1,10 @@
|
||||
This is a test for #658: a kernel panic seen when patching an exported
|
||||
function (e.g., kmalloc) which is used by patch_init().
|
||||
---
|
||||
diff --git a/mm/slub.c b/mm/slub.c
|
||||
index 067598a..b517aec 100644
|
||||
--- a/mm/slub.c
|
||||
+++ b/mm/slub.c
|
||||
@@ -3719,6 +3719,9 @@ void *__kmalloc(size_t size, gfp_t flags)
|
||||
diff -Nupr src.orig/mm/slub.c src/mm/slub.c
|
||||
--- src.orig/mm/slub.c 2016-12-11 14:17:54.000000000 -0500
|
||||
+++ src/mm/slub.c 2017-02-08 21:02:17.946870598 -0500
|
||||
@@ -3719,6 +3719,9 @@ void *__kmalloc(size_t size, gfp_t flags
|
||||
struct kmem_cache *s;
|
||||
void *ret;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
|
||||
--- src.orig/fs/proc/meminfo.c 2016-11-30 19:39:49.317737234 +0000
|
||||
+++ src/fs/proc/meminfo.c 2016-11-30 19:39:58.934737234 +0000
|
||||
@@ -23,6 +23,8 @@ void __attribute__((weak)) arch_report_m
|
||||
{
|
||||
--- src.orig/fs/proc/meminfo.c 2017-02-08 21:06:25.943876606 -0500
|
||||
+++ src/fs/proc/meminfo.c 2017-02-08 21:08:07.154879058 -0500
|
||||
@@ -42,6 +42,8 @@ static void show_val_kb(struct seq_file
|
||||
seq_write(m, " kB\n", 4);
|
||||
}
|
||||
|
||||
+static int foo = 5;
|
||||
@ -10,19 +10,11 @@ diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
|
||||
static int meminfo_proc_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct sysinfo i;
|
||||
@@ -112,6 +114,7 @@ static int meminfo_proc_show(struct seq_
|
||||
"CmaTotal: %8lu kB\n"
|
||||
"CmaFree: %8lu kB\n"
|
||||
@@ -153,6 +155,7 @@ static int meminfo_proc_show(struct seq_
|
||||
show_val_kb(m, "CmaFree: ",
|
||||
global_page_state(NR_FREE_CMA_PAGES));
|
||||
#endif
|
||||
+ "kpatch: %d"
|
||||
,
|
||||
K(i.totalram),
|
||||
K(i.freeram),
|
||||
@@ -172,6 +175,7 @@ static int meminfo_proc_show(struct seq_
|
||||
, K(totalcma_pages)
|
||||
, K(global_page_state(NR_FREE_CMA_PAGES))
|
||||
#endif
|
||||
+ ,foo
|
||||
);
|
||||
+ seq_printf(m, "kpatch: %d\n", foo);
|
||||
|
||||
hugetlb_report_meminfo(m);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Nupr src.orig/mm/mmap.c src/mm/mmap.c
|
||||
--- src.orig/mm/mmap.c 2016-11-30 19:39:45.200737234 +0000
|
||||
+++ src/mm/mmap.c 2016-11-30 19:40:17.029737234 +0000
|
||||
@@ -1429,6 +1429,7 @@ static inline int accountable_mapping(st
|
||||
--- src.orig/mm/mmap.c 2017-02-08 20:48:33.821850633 -0500
|
||||
+++ src/mm/mmap.c 2017-02-08 20:48:56.682851187 -0500
|
||||
@@ -1582,6 +1582,7 @@ static inline int accountable_mapping(st
|
||||
return (vm_flags & (VM_NORESERVE | VM_SHARED | VM_WRITE)) == VM_WRITE;
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ diff -Nupr src.orig/mm/mmap.c src/mm/mmap.c
|
||||
unsigned long mmap_region(struct file *file, unsigned long addr,
|
||||
unsigned long len, vm_flags_t vm_flags, unsigned long pgoff)
|
||||
{
|
||||
@@ -1438,6 +1439,9 @@ unsigned long mmap_region(struct file *f
|
||||
@@ -1591,6 +1592,9 @@ unsigned long mmap_region(struct file *f
|
||||
struct rb_node **rb_link, *rb_parent;
|
||||
unsigned long charged = 0;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Nupr src.orig/fs/aio.c src/fs/aio.c
|
||||
--- src.orig/fs/aio.c 2016-11-30 19:39:49.237737234 +0000
|
||||
+++ src/fs/aio.c 2016-11-30 19:40:22.706737234 +0000
|
||||
@@ -271,9 +271,16 @@ static int __init aio_setup(void)
|
||||
--- src.orig/fs/aio.c.orig 2017-02-08 21:10:29.963882517 -0500
|
||||
+++ src/fs/aio.c 2017-02-08 21:10:51.501883039 -0500
|
||||
@@ -271,10 +271,17 @@ static int __init aio_setup(void)
|
||||
}
|
||||
__initcall(aio_setup);
|
||||
|
||||
@ -14,7 +14,8 @@ diff -Nupr src.orig/fs/aio.c src/fs/aio.c
|
||||
static void put_aio_ring_file(struct kioctx *ctx)
|
||||
{
|
||||
struct file *aio_ring_file = ctx->aio_ring_file;
|
||||
struct address_space *i_mapping;
|
||||
+ kpatch_aio_foo();
|
||||
|
||||
if (aio_ring_file) {
|
||||
truncate_setsize(aio_ring_file->f_inode, 0);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Nupr src.orig/net/ipv4/fib_frontend.c src/net/ipv4/fib_frontend.c
|
||||
--- src.orig/net/ipv4/fib_frontend.c 2016-11-30 19:39:45.253737234 +0000
|
||||
+++ src/net/ipv4/fib_frontend.c 2016-11-30 19:40:34.782737234 +0000
|
||||
@@ -730,6 +730,7 @@ errout:
|
||||
--- src.orig/net/ipv4/fib_frontend.c 2017-02-08 21:47:41.895936587 -0500
|
||||
+++ src/net/ipv4/fib_frontend.c 2017-02-08 21:48:15.908937411 -0500
|
||||
@@ -721,6 +721,7 @@ errout:
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -9,17 +9,17 @@ diff -Nupr src.orig/net/ipv4/fib_frontend.c src/net/ipv4/fib_frontend.c
|
||||
static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
{
|
||||
struct net *net = sock_net(skb->sk);
|
||||
@@ -748,6 +749,7 @@ static int inet_rtm_newroute(struct sk_b
|
||||
@@ -739,6 +740,7 @@ static int inet_rtm_newroute(struct sk_b
|
||||
}
|
||||
|
||||
err = fib_table_insert(tb, &cfg);
|
||||
err = fib_table_insert(net, tb, &cfg);
|
||||
+ KPATCH_PRINTK("[inet_rtm_newroute]: err is %d\n", err);
|
||||
errout:
|
||||
return err;
|
||||
}
|
||||
diff -Nupr src.orig/net/ipv4/fib_semantics.c src/net/ipv4/fib_semantics.c
|
||||
--- src.orig/net/ipv4/fib_semantics.c 2016-11-30 19:39:45.252737234 +0000
|
||||
+++ src/net/ipv4/fib_semantics.c 2016-11-30 19:40:34.783737234 +0000
|
||||
--- src.orig/net/ipv4/fib_semantics.c 2017-02-08 21:49:22.766939031 -0500
|
||||
+++ src/net/ipv4/fib_semantics.c 2017-02-08 21:53:08.628944503 -0500
|
||||
@@ -991,6 +991,7 @@ fib_convert_metrics(struct fib_info *fi,
|
||||
return 0;
|
||||
}
|
||||
@ -60,16 +60,17 @@ diff -Nupr src.orig/net/ipv4/fib_semantics.c src/net/ipv4/fib_semantics.c
|
||||
|
||||
err = fib_convert_metrics(fi, cfg);
|
||||
if (err)
|
||||
@@ -1118,6 +1123,8 @@ struct fib_info *fib_create_info(struct
|
||||
nh->nh_weight = 1;
|
||||
@@ -1119,6 +1124,9 @@ struct fib_info *fib_create_info(struct
|
||||
#endif
|
||||
}
|
||||
|
||||
+ KPATCH_PRINTK("[fib_create_info]: 5 create error err is %d\n",err);
|
||||
+ KPATCH_PRINTK("[fib_create_info]: 6 create error err is %d\n",err);
|
||||
|
||||
+
|
||||
if (fib_props[cfg->fc_type].error) {
|
||||
if (cfg->fc_gw || cfg->fc_oif || cfg->fc_mp)
|
||||
@@ -1135,6 +1142,7 @@ struct fib_info *fib_create_info(struct
|
||||
goto err_inval;
|
||||
@@ -1135,6 +1143,7 @@ struct fib_info *fib_create_info(struct
|
||||
goto err_inval;
|
||||
}
|
||||
}
|
||||
@ -77,7 +78,7 @@ diff -Nupr src.orig/net/ipv4/fib_semantics.c src/net/ipv4/fib_semantics.c
|
||||
|
||||
if (cfg->fc_scope > RT_SCOPE_HOST)
|
||||
goto err_inval;
|
||||
@@ -1163,6 +1171,7 @@ struct fib_info *fib_create_info(struct
|
||||
@@ -1163,6 +1172,7 @@ struct fib_info *fib_create_info(struct
|
||||
if (linkdown == fi->fib_nhs)
|
||||
fi->fib_flags |= RTNH_F_LINKDOWN;
|
||||
}
|
||||
@ -85,7 +86,7 @@ diff -Nupr src.orig/net/ipv4/fib_semantics.c src/net/ipv4/fib_semantics.c
|
||||
|
||||
if (fi->fib_prefsrc && !fib_valid_prefsrc(cfg, fi->fib_prefsrc))
|
||||
goto err_inval;
|
||||
@@ -1171,6 +1180,7 @@ struct fib_info *fib_create_info(struct
|
||||
@@ -1171,6 +1181,7 @@ struct fib_info *fib_create_info(struct
|
||||
fib_info_update_nh_saddr(net, nexthop_nh);
|
||||
fib_add_weight(fi, nexthop_nh);
|
||||
} endfor_nexthops(fi)
|
||||
@ -93,7 +94,7 @@ diff -Nupr src.orig/net/ipv4/fib_semantics.c src/net/ipv4/fib_semantics.c
|
||||
|
||||
fib_rebalance(fi);
|
||||
|
||||
@@ -1182,6 +1192,7 @@ link_it:
|
||||
@@ -1182,6 +1193,7 @@ link_it:
|
||||
ofi->fib_treeref++;
|
||||
return ofi;
|
||||
}
|
||||
@ -101,7 +102,7 @@ diff -Nupr src.orig/net/ipv4/fib_semantics.c src/net/ipv4/fib_semantics.c
|
||||
|
||||
fi->fib_treeref++;
|
||||
atomic_inc(&fi->fib_clntref);
|
||||
@@ -1205,6 +1216,7 @@ link_it:
|
||||
@@ -1205,6 +1217,7 @@ link_it:
|
||||
hlist_add_head(&nexthop_nh->nh_hash, head);
|
||||
} endfor_nexthops(fi)
|
||||
spin_unlock_bh(&fib_info_lock);
|
||||
@ -109,7 +110,7 @@ diff -Nupr src.orig/net/ipv4/fib_semantics.c src/net/ipv4/fib_semantics.c
|
||||
return fi;
|
||||
|
||||
err_inval:
|
||||
@@ -1215,6 +1227,7 @@ failure:
|
||||
@@ -1215,6 +1228,7 @@ failure:
|
||||
fi->fib_dead = 1;
|
||||
free_fib_info(fi);
|
||||
}
|
||||
@ -118,17 +119,17 @@ diff -Nupr src.orig/net/ipv4/fib_semantics.c src/net/ipv4/fib_semantics.c
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
diff -Nupr src.orig/net/ipv4/fib_trie.c src/net/ipv4/fib_trie.c
|
||||
--- src.orig/net/ipv4/fib_trie.c 2016-11-30 19:39:45.252737234 +0000
|
||||
+++ src/net/ipv4/fib_trie.c 2016-11-30 19:40:34.783737234 +0000
|
||||
@@ -1076,6 +1076,7 @@ static int fib_insert_alias(struct trie
|
||||
--- src.orig/net/ipv4/fib_trie.c 2017-02-08 21:53:18.182944734 -0500
|
||||
+++ src/net/ipv4/fib_trie.c 2017-02-09 16:43:09.835587031 -0500
|
||||
@@ -1106,6 +1106,7 @@ static int fib_insert_alias(struct trie
|
||||
}
|
||||
|
||||
/* Caller must hold RTNL. */
|
||||
+#include "kpatch-macros.h"
|
||||
int fib_table_insert(struct fib_table *tb, struct fib_config *cfg)
|
||||
int fib_table_insert(struct net *net, struct fib_table *tb,
|
||||
struct fib_config *cfg)
|
||||
{
|
||||
struct trie *t = (struct trie *)tb->tb_data;
|
||||
@@ -1099,11 +1100,14 @@ int fib_table_insert(struct fib_table *t
|
||||
@@ -1130,11 +1131,14 @@ int fib_table_insert(struct net *net, st
|
||||
if ((plen < KEYLENGTH) && (key << plen))
|
||||
return -EINVAL;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c
|
||||
--- src.orig/fs/proc/cmdline.c 2016-11-30 19:39:49.317737234 +0000
|
||||
+++ src/fs/proc/cmdline.c 2016-11-30 19:40:37.629737234 +0000
|
||||
--- src.orig/fs/proc/cmdline.c 2017-02-08 21:31:22.297912856 -0500
|
||||
+++ src/fs/proc/cmdline.c 2017-02-08 21:39:53.633925243 -0500
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
static int cmdline_proc_show(struct seq_file *m, void *v)
|
||||
@ -11,20 +11,20 @@ diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c
|
||||
}
|
||||
|
||||
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
|
||||
--- src.orig/fs/proc/meminfo.c 2016-11-30 19:39:49.317737234 +0000
|
||||
+++ src/fs/proc/meminfo.c 2016-11-30 19:40:37.629737234 +0000
|
||||
@@ -99,7 +99,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"
|
||||
--- src.orig/fs/proc/meminfo.c 2017-02-08 21:06:25.943876606 -0500
|
||||
+++ src/fs/proc/meminfo.c 2017-02-08 21:40:25.550926017 -0500
|
||||
@@ -132,7 +132,7 @@ static int meminfo_proc_show(struct seq_
|
||||
seq_printf(m, "VmallocTotal: %8lu kB\n",
|
||||
(unsigned long)VMALLOC_TOTAL >> 10);
|
||||
show_val_kb(m, "VmallocUsed: ", 0ul);
|
||||
- show_val_kb(m, "VmallocChunk: ", 0ul);
|
||||
+ show_val_kb(m, "VMALLOCCHUNK: ", 0ul);
|
||||
|
||||
#ifdef CONFIG_MEMORY_FAILURE
|
||||
"HardwareCorrupted: %5lu kB\n"
|
||||
#endif
|
||||
seq_printf(m, "HardwareCorrupted: %5lu kB\n",
|
||||
diff -Nupr src.orig/include/linux/kernel.h src/include/linux/kernel.h
|
||||
--- src.orig/include/linux/kernel.h 2016-11-30 19:39:45.003737234 +0000
|
||||
+++ src/include/linux/kernel.h 2016-11-30 19:40:37.630737234 +0000
|
||||
--- src.orig/include/linux/kernel.h 2017-02-08 21:42:09.228928528 -0500
|
||||
+++ src/include/linux/kernel.h 2017-02-08 21:42:10.994928571 -0500
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _LINUX_KERNEL_H
|
||||
|
||||
|
@ -1,15 +1,16 @@
|
||||
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
|
||||
--- src.orig/fs/proc/meminfo.c 2016-11-30 19:39:49.317737234 +0000
|
||||
+++ src/fs/proc/meminfo.c 2016-11-30 19:40:40.686737234 +0000
|
||||
@@ -32,6 +32,7 @@ static int meminfo_proc_show(struct seq_
|
||||
--- src.orig/fs/proc/meminfo.c 2017-02-08 21:06:25.943876606 -0500
|
||||
+++ src/fs/proc/meminfo.c 2017-02-08 21:37:44.992922127 -0500
|
||||
@@ -51,6 +51,8 @@ static int meminfo_proc_show(struct seq_
|
||||
unsigned long pages[NR_LRU_LISTS];
|
||||
int lru;
|
||||
|
||||
+ printk("a\n");
|
||||
/*
|
||||
* display in kilobytes.
|
||||
*/
|
||||
@@ -196,6 +197,7 @@ static const struct file_operations memi
|
||||
+
|
||||
si_meminfo(&i);
|
||||
si_swapinfo(&i);
|
||||
committed = percpu_counter_read_positive(&vm_committed_as);
|
||||
@@ -175,6 +177,7 @@ static const struct file_operations memi
|
||||
|
||||
static int __init proc_meminfo_init(void)
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
|
||||
--- src.orig/fs/proc/meminfo.c 2016-11-30 19:39:49.317737234 +0000
|
||||
+++ src/fs/proc/meminfo.c 2016-11-30 19:40:46.959737234 +0000
|
||||
@@ -99,7 +99,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"
|
||||
--- src.orig/fs/proc/meminfo.c 2017-02-08 21:06:25.943876606 -0500
|
||||
+++ fs/proc/meminfo.c 2017-02-08 21:35:26.574918774 -0500
|
||||
@@ -132,7 +132,7 @@ static int meminfo_proc_show(struct seq_
|
||||
seq_printf(m, "VmallocTotal: %8lu kB\n",
|
||||
(unsigned long)VMALLOC_TOTAL >> 10);
|
||||
show_val_kb(m, "VmallocUsed: ", 0ul);
|
||||
- show_val_kb(m, "VmallocChunk: ", 0ul);
|
||||
+ show_val_kb(m, "VMALLOCCHUNK: ", 0ul);
|
||||
|
||||
#ifdef CONFIG_MEMORY_FAILURE
|
||||
"HardwareCorrupted: %5lu kB\n"
|
||||
#endif
|
||||
seq_printf(m, "HardwareCorrupted: %5lu kB\n",
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c
|
||||
--- src.orig/fs/proc/cmdline.c 2016-11-30 19:39:49.317737234 +0000
|
||||
+++ src/fs/proc/cmdline.c 2016-11-30 19:41:02.546737234 +0000
|
||||
--- src.orig/fs/proc/cmdline.c 2017-02-08 21:31:22.297912856 -0500
|
||||
+++ src/fs/proc/cmdline.c 2017-02-08 21:32:08.510913975 -0500
|
||||
@@ -27,3 +27,10 @@ static int __init proc_cmdline_init(void
|
||||
return 0;
|
||||
}
|
||||
@ -13,8 +13,8 @@ diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c
|
||||
+ 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 19:39:49.317737234 +0000
|
||||
+++ src/fs/proc/meminfo.c 2016-11-30 19:41:02.547737234 +0000
|
||||
--- src.orig/fs/proc/meminfo.c 2017-02-08 21:06:25.943876606 -0500
|
||||
+++ src/fs/proc/meminfo.c 2017-02-08 21:33:26.498915865 -0500
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <asm/pgtable.h>
|
||||
#include "internal.h"
|
||||
@ -24,11 +24,11 @@ diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
|
||||
void __attribute__((weak)) arch_report_meminfo(struct seq_file *m)
|
||||
{
|
||||
}
|
||||
@@ -53,6 +55,7 @@ static int meminfo_proc_show(struct seq_
|
||||
/*
|
||||
* Tagged format, for easy grepping and expansion.
|
||||
*/
|
||||
@@ -65,6 +67,7 @@ static int meminfo_proc_show(struct seq_
|
||||
|
||||
available = si_mem_available();
|
||||
|
||||
+ kpatch_print_message();
|
||||
seq_printf(m,
|
||||
"MemTotal: %8lu kB\n"
|
||||
"MemFree: %8lu kB\n"
|
||||
show_val_kb(m, "MemTotal: ", i.totalram);
|
||||
show_val_kb(m, "MemFree: ", i.freeram);
|
||||
show_val_kb(m, "MemAvailable: ", available);
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Nupr src.orig/arch/x86/kvm/x86.c src/arch/x86/kvm/x86.c
|
||||
--- src.orig/arch/x86/kvm/x86.c 2016-11-30 19:39:46.590737234 +0000
|
||||
+++ src/arch/x86/kvm/x86.c 2016-11-30 19:41:08.801737234 +0000
|
||||
@@ -241,6 +241,8 @@ static void shared_msr_update(unsigned s
|
||||
--- src.orig/arch/x86/kvm/x86.c 2017-02-08 20:48:33.312850621 -0500
|
||||
+++ src/arch/x86/kvm/x86.c 2017-02-08 20:49:15.030851631 -0500
|
||||
@@ -250,6 +250,8 @@ static void shared_msr_update(unsigned s
|
||||
|
||||
void kvm_define_shared_msr(unsigned slot, u32 msr)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Nupr src.orig/fs/proc/array.c src/fs/proc/array.c
|
||||
--- src.orig/fs/proc/array.c 2016-11-30 19:39:49.317737234 +0000
|
||||
+++ src/fs/proc/array.c 2016-11-30 19:41:11.931737234 +0000
|
||||
@@ -352,13 +352,20 @@ static inline void task_seccomp(struct s
|
||||
--- src.orig/fs/proc/array.c 2017-02-08 21:17:58.244893377 -0500
|
||||
+++ src/fs/proc/array.c 2017-02-08 21:26:21.670905573 -0500
|
||||
@@ -348,12 +348,19 @@ static inline void task_seccomp(struct s
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -11,10 +11,9 @@ diff -Nupr src.orig/fs/proc/array.c src/fs/proc/array.c
|
||||
{
|
||||
+ int *newpid;
|
||||
+
|
||||
seq_printf(m, "voluntary_ctxt_switches:\t%lu\n"
|
||||
"nonvoluntary_ctxt_switches:\t%lu\n",
|
||||
p->nvcsw,
|
||||
p->nivcsw);
|
||||
seq_put_decimal_ull(m, "voluntary_ctxt_switches:\t", p->nvcsw);
|
||||
seq_put_decimal_ull(m, "\nnonvoluntary_ctxt_switches:\t", p->nivcsw);
|
||||
seq_putc(m, '\n');
|
||||
+
|
||||
+ newpid = kpatch_shadow_get(p, "newpid");
|
||||
+ if (newpid)
|
||||
@ -23,17 +22,17 @@ diff -Nupr src.orig/fs/proc/array.c src/fs/proc/array.c
|
||||
|
||||
static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
|
||||
diff -Nupr src.orig/kernel/exit.c src/kernel/exit.c
|
||||
--- src.orig/kernel/exit.c 2016-11-30 19:39:45.166737234 +0000
|
||||
+++ src/kernel/exit.c 2016-11-30 19:41:11.932737234 +0000
|
||||
--- src.orig/kernel/exit.c 2017-02-08 21:26:31.119905802 -0500
|
||||
+++ src/kernel/exit.c 2017-02-08 21:27:11.347906776 -0500
|
||||
@@ -725,6 +725,7 @@ static void check_stack_usage(void)
|
||||
static inline void check_stack_usage(void) {}
|
||||
#endif
|
||||
|
||||
+#include "kpatch.h"
|
||||
void do_exit(long code)
|
||||
void __noreturn do_exit(long code)
|
||||
{
|
||||
struct task_struct *tsk = current;
|
||||
@@ -828,6 +829,8 @@ void do_exit(long code)
|
||||
@@ -828,6 +829,8 @@ void __noreturn do_exit(long code)
|
||||
exit_task_work(tsk);
|
||||
exit_thread(tsk);
|
||||
|
||||
@ -43,9 +42,9 @@ diff -Nupr src.orig/kernel/exit.c src/kernel/exit.c
|
||||
* Flush inherited counters to the parent - before the parent
|
||||
* gets woken up by child-exit notifications.
|
||||
diff -Nupr src.orig/kernel/fork.c src/kernel/fork.c
|
||||
--- src.orig/kernel/fork.c 2016-11-30 19:39:45.165737234 +0000
|
||||
+++ src/kernel/fork.c 2016-11-30 19:41:11.931737234 +0000
|
||||
@@ -1749,6 +1749,7 @@ struct task_struct *fork_idle(int cpu)
|
||||
--- src.orig/kernel/fork.c 2017-02-08 21:27:34.629907340 -0500
|
||||
+++ src/kernel/fork.c 2017-02-08 21:28:31.182908710 -0500
|
||||
@@ -1904,6 +1904,7 @@ struct task_struct *fork_idle(int cpu)
|
||||
* It copies the process, and if successful kick-starts
|
||||
* it and waits for it to finish using the VM if required.
|
||||
*/
|
||||
@ -53,7 +52,7 @@ diff -Nupr src.orig/kernel/fork.c src/kernel/fork.c
|
||||
long _do_fork(unsigned long clone_flags,
|
||||
unsigned long stack_start,
|
||||
unsigned long stack_size,
|
||||
@@ -1787,6 +1788,13 @@ long _do_fork(unsigned long clone_flags,
|
||||
@@ -1943,6 +1944,13 @@ long _do_fork(unsigned long clone_flags,
|
||||
if (!IS_ERR(p)) {
|
||||
struct completion vfork;
|
||||
struct pid *pid;
|
||||
|
Loading…
Reference in New Issue
Block a user