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:
Jessica Yu 2017-02-14 21:27:18 -08:00 committed by GitHub
commit 874b917dcb
12 changed files with 106 additions and 113 deletions

View File

@ -1 +1 @@
4.8.6-300.fc25.x86_64 4.9.7-201.fc25.x86_64

View File

@ -1,11 +1,10 @@
This is a test for #658: a kernel panic seen when patching an exported This is a test for #658: a kernel panic seen when patching an exported
function (e.g., kmalloc) which is used by patch_init(). function (e.g., kmalloc) which is used by patch_init().
--- ---
diff --git a/mm/slub.c b/mm/slub.c diff -Nupr src.orig/mm/slub.c src/mm/slub.c
index 067598a..b517aec 100644 --- src.orig/mm/slub.c 2016-12-11 14:17:54.000000000 -0500
--- a/mm/slub.c +++ src/mm/slub.c 2017-02-08 21:02:17.946870598 -0500
+++ b/mm/slub.c @@ -3719,6 +3719,9 @@ void *__kmalloc(size_t size, gfp_t flags
@@ -3719,6 +3719,9 @@ void *__kmalloc(size_t size, gfp_t flags)
struct kmem_cache *s; struct kmem_cache *s;
void *ret; void *ret;

View File

@ -1,8 +1,8 @@
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.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.orig/fs/proc/meminfo.c 2017-02-08 21:06:25.943876606 -0500
+++ src/fs/proc/meminfo.c 2016-11-30 19:39:58.934737234 +0000 +++ src/fs/proc/meminfo.c 2017-02-08 21:08:07.154879058 -0500
@@ -23,6 +23,8 @@ void __attribute__((weak)) arch_report_m @@ -42,6 +42,8 @@ static void show_val_kb(struct seq_file
{ seq_write(m, " kB\n", 4);
} }
+static int foo = 5; +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) static int meminfo_proc_show(struct seq_file *m, void *v)
{ {
struct sysinfo i; struct sysinfo i;
@@ -112,6 +114,7 @@ static int meminfo_proc_show(struct seq_ @@ -153,6 +155,7 @@ static int meminfo_proc_show(struct seq_
"CmaTotal: %8lu kB\n" show_val_kb(m, "CmaFree: ",
"CmaFree: %8lu kB\n" global_page_state(NR_FREE_CMA_PAGES));
#endif #endif
+ "kpatch: %d" + seq_printf(m, "kpatch: %d\n", foo);
,
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
);
hugetlb_report_meminfo(m); hugetlb_report_meminfo(m);

View File

@ -1,7 +1,7 @@
diff -Nupr src.orig/mm/mmap.c src/mm/mmap.c 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.orig/mm/mmap.c 2017-02-08 20:48:33.821850633 -0500
+++ src/mm/mmap.c 2016-11-30 19:40:17.029737234 +0000 +++ src/mm/mmap.c 2017-02-08 20:48:56.682851187 -0500
@@ -1429,6 +1429,7 @@ static inline int accountable_mapping(st @@ -1582,6 +1582,7 @@ static inline int accountable_mapping(st
return (vm_flags & (VM_NORESERVE | VM_SHARED | VM_WRITE)) == VM_WRITE; 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 mmap_region(struct file *file, unsigned long addr,
unsigned long len, vm_flags_t vm_flags, unsigned long pgoff) 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; struct rb_node **rb_link, *rb_parent;
unsigned long charged = 0; unsigned long charged = 0;

View File

@ -1,7 +1,7 @@
diff -Nupr src.orig/fs/aio.c src/fs/aio.c 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.orig/fs/aio.c.orig 2017-02-08 21:10:29.963882517 -0500
+++ src/fs/aio.c 2016-11-30 19:40:22.706737234 +0000 +++ src/fs/aio.c 2017-02-08 21:10:51.501883039 -0500
@@ -271,9 +271,16 @@ static int __init aio_setup(void) @@ -271,10 +271,17 @@ static int __init aio_setup(void)
} }
__initcall(aio_setup); __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) static void put_aio_ring_file(struct kioctx *ctx)
{ {
struct file *aio_ring_file = ctx->aio_ring_file; struct file *aio_ring_file = ctx->aio_ring_file;
struct address_space *i_mapping;
+ kpatch_aio_foo(); + kpatch_aio_foo();
if (aio_ring_file) { if (aio_ring_file) {
truncate_setsize(aio_ring_file->f_inode, 0); truncate_setsize(aio_ring_file->f_inode, 0);

View File

@ -1,7 +1,7 @@
diff -Nupr src.orig/net/ipv4/fib_frontend.c src/net/ipv4/fib_frontend.c 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.orig/net/ipv4/fib_frontend.c 2017-02-08 21:47:41.895936587 -0500
+++ src/net/ipv4/fib_frontend.c 2016-11-30 19:40:34.782737234 +0000 +++ src/net/ipv4/fib_frontend.c 2017-02-08 21:48:15.908937411 -0500
@@ -730,6 +730,7 @@ errout: @@ -721,6 +721,7 @@ errout:
return err; 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) static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh)
{ {
struct net *net = sock_net(skb->sk); 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); + KPATCH_PRINTK("[inet_rtm_newroute]: err is %d\n", err);
errout: errout:
return err; return err;
} }
diff -Nupr src.orig/net/ipv4/fib_semantics.c src/net/ipv4/fib_semantics.c 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.orig/net/ipv4/fib_semantics.c 2017-02-08 21:49:22.766939031 -0500
+++ src/net/ipv4/fib_semantics.c 2016-11-30 19:40:34.783737234 +0000 +++ 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, @@ -991,6 +991,7 @@ fib_convert_metrics(struct fib_info *fi,
return 0; 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); err = fib_convert_metrics(fi, cfg);
if (err) if (err)
@@ -1118,6 +1123,8 @@ struct fib_info *fib_create_info(struct @@ -1119,6 +1124,9 @@ struct fib_info *fib_create_info(struct
nh->nh_weight = 1;
#endif #endif
} }
+ KPATCH_PRINTK("[fib_create_info]: 5 create error err is %d\n",err); + 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); + KPATCH_PRINTK("[fib_create_info]: 6 create error err is %d\n",err);
+
if (fib_props[cfg->fc_type].error) { if (fib_props[cfg->fc_type].error) {
if (cfg->fc_gw || cfg->fc_oif || cfg->fc_mp) 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; 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) if (cfg->fc_scope > RT_SCOPE_HOST)
goto err_inval; 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) if (linkdown == fi->fib_nhs)
fi->fib_flags |= RTNH_F_LINKDOWN; 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)) if (fi->fib_prefsrc && !fib_valid_prefsrc(cfg, fi->fib_prefsrc))
goto err_inval; 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_info_update_nh_saddr(net, nexthop_nh);
fib_add_weight(fi, nexthop_nh); fib_add_weight(fi, nexthop_nh);
} endfor_nexthops(fi) } 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); fib_rebalance(fi);
@@ -1182,6 +1192,7 @@ link_it: @@ -1182,6 +1193,7 @@ link_it:
ofi->fib_treeref++; ofi->fib_treeref++;
return ofi; return ofi;
} }
@ -101,7 +102,7 @@ diff -Nupr src.orig/net/ipv4/fib_semantics.c src/net/ipv4/fib_semantics.c
fi->fib_treeref++; fi->fib_treeref++;
atomic_inc(&fi->fib_clntref); 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); hlist_add_head(&nexthop_nh->nh_hash, head);
} endfor_nexthops(fi) } endfor_nexthops(fi)
spin_unlock_bh(&fib_info_lock); 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; return fi;
err_inval: err_inval:
@@ -1215,6 +1227,7 @@ failure: @@ -1215,6 +1228,7 @@ failure:
fi->fib_dead = 1; fi->fib_dead = 1;
free_fib_info(fi); 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); return ERR_PTR(err);
} }
diff -Nupr src.orig/net/ipv4/fib_trie.c src/net/ipv4/fib_trie.c 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.orig/net/ipv4/fib_trie.c 2017-02-08 21:53:18.182944734 -0500
+++ src/net/ipv4/fib_trie.c 2016-11-30 19:40:34.783737234 +0000 +++ src/net/ipv4/fib_trie.c 2017-02-09 16:43:09.835587031 -0500
@@ -1076,6 +1076,7 @@ static int fib_insert_alias(struct trie @@ -1106,6 +1106,7 @@ static int fib_insert_alias(struct trie
} }
/* Caller must hold RTNL. */ /* Caller must hold RTNL. */
+#include "kpatch-macros.h" +#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; @@ -1130,11 +1131,14 @@ int fib_table_insert(struct net *net, st
@@ -1099,11 +1100,14 @@ int fib_table_insert(struct fib_table *t
if ((plen < KEYLENGTH) && (key << plen)) if ((plen < KEYLENGTH) && (key << plen))
return -EINVAL; return -EINVAL;

View File

@ -1,6 +1,6 @@
diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c 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.orig/fs/proc/cmdline.c 2017-02-08 21:31:22.297912856 -0500
+++ src/fs/proc/cmdline.c 2016-11-30 19:40:37.629737234 +0000 +++ src/fs/proc/cmdline.c 2017-02-08 21:39:53.633925243 -0500
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
static int cmdline_proc_show(struct seq_file *m, void *v) 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 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.orig/fs/proc/meminfo.c 2017-02-08 21:06:25.943876606 -0500
+++ src/fs/proc/meminfo.c 2016-11-30 19:40:37.629737234 +0000 +++ src/fs/proc/meminfo.c 2017-02-08 21:40:25.550926017 -0500
@@ -99,7 +99,7 @@ static int meminfo_proc_show(struct seq_ @@ -132,7 +132,7 @@ static int meminfo_proc_show(struct seq_
"Committed_AS: %8lu kB\n" seq_printf(m, "VmallocTotal: %8lu kB\n",
"VmallocTotal: %8lu kB\n" (unsigned long)VMALLOC_TOTAL >> 10);
"VmallocUsed: %8lu kB\n" show_val_kb(m, "VmallocUsed: ", 0ul);
- "VmallocChunk: %8lu kB\n" - show_val_kb(m, "VmallocChunk: ", 0ul);
+ "VMALLOCCHUNK: %8lu kB\n" + show_val_kb(m, "VMALLOCCHUNK: ", 0ul);
#ifdef CONFIG_MEMORY_FAILURE #ifdef CONFIG_MEMORY_FAILURE
"HardwareCorrupted: %5lu kB\n" seq_printf(m, "HardwareCorrupted: %5lu kB\n",
#endif
diff -Nupr src.orig/include/linux/kernel.h src/include/linux/kernel.h 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.orig/include/linux/kernel.h 2017-02-08 21:42:09.228928528 -0500
+++ src/include/linux/kernel.h 2016-11-30 19:40:37.630737234 +0000 +++ src/include/linux/kernel.h 2017-02-08 21:42:10.994928571 -0500
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
#define _LINUX_KERNEL_H #define _LINUX_KERNEL_H

View File

@ -1,15 +1,16 @@
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.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.orig/fs/proc/meminfo.c 2017-02-08 21:06:25.943876606 -0500
+++ src/fs/proc/meminfo.c 2016-11-30 19:40:40.686737234 +0000 +++ src/fs/proc/meminfo.c 2017-02-08 21:37:44.992922127 -0500
@@ -32,6 +32,7 @@ static int meminfo_proc_show(struct seq_ @@ -51,6 +51,8 @@ static int meminfo_proc_show(struct seq_
unsigned long pages[NR_LRU_LISTS]; unsigned long pages[NR_LRU_LISTS];
int lru; int lru;
+ printk("a\n"); + printk("a\n");
/* +
* display in kilobytes. si_meminfo(&i);
*/ si_swapinfo(&i);
@@ -196,6 +197,7 @@ static const struct file_operations memi 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) static int __init proc_meminfo_init(void)
{ {

View File

@ -1,12 +1,12 @@
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.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.orig/fs/proc/meminfo.c 2017-02-08 21:06:25.943876606 -0500
+++ src/fs/proc/meminfo.c 2016-11-30 19:40:46.959737234 +0000 +++ fs/proc/meminfo.c 2017-02-08 21:35:26.574918774 -0500
@@ -99,7 +99,7 @@ static int meminfo_proc_show(struct seq_ @@ -132,7 +132,7 @@ static int meminfo_proc_show(struct seq_
"Committed_AS: %8lu kB\n" seq_printf(m, "VmallocTotal: %8lu kB\n",
"VmallocTotal: %8lu kB\n" (unsigned long)VMALLOC_TOTAL >> 10);
"VmallocUsed: %8lu kB\n" show_val_kb(m, "VmallocUsed: ", 0ul);
- "VmallocChunk: %8lu kB\n" - show_val_kb(m, "VmallocChunk: ", 0ul);
+ "VMALLOCCHUNK: %8lu kB\n" + show_val_kb(m, "VMALLOCCHUNK: ", 0ul);
#ifdef CONFIG_MEMORY_FAILURE #ifdef CONFIG_MEMORY_FAILURE
"HardwareCorrupted: %5lu kB\n" seq_printf(m, "HardwareCorrupted: %5lu kB\n",
#endif

View File

@ -1,6 +1,6 @@
diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c 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.orig/fs/proc/cmdline.c 2017-02-08 21:31:22.297912856 -0500
+++ src/fs/proc/cmdline.c 2016-11-30 19:41:02.546737234 +0000 +++ src/fs/proc/cmdline.c 2017-02-08 21:32:08.510913975 -0500
@@ -27,3 +27,10 @@ static int __init proc_cmdline_init(void @@ -27,3 +27,10 @@ static int __init proc_cmdline_init(void
return 0; return 0;
} }
@ -13,8 +13,8 @@ diff -Nupr src.orig/fs/proc/cmdline.c src/fs/proc/cmdline.c
+ printk("hello there!\n"); + printk("hello there!\n");
+} +}
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.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.orig/fs/proc/meminfo.c 2017-02-08 21:06:25.943876606 -0500
+++ src/fs/proc/meminfo.c 2016-11-30 19:41:02.547737234 +0000 +++ src/fs/proc/meminfo.c 2017-02-08 21:33:26.498915865 -0500
@@ -19,6 +19,8 @@ @@ -19,6 +19,8 @@
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include "internal.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) void __attribute__((weak)) arch_report_meminfo(struct seq_file *m)
{ {
} }
@@ -53,6 +55,7 @@ static int meminfo_proc_show(struct seq_ @@ -65,6 +67,7 @@ static int meminfo_proc_show(struct seq_
/*
* Tagged format, for easy grepping and expansion. available = si_mem_available();
*/
+ kpatch_print_message(); + kpatch_print_message();
seq_printf(m, show_val_kb(m, "MemTotal: ", i.totalram);
"MemTotal: %8lu kB\n" show_val_kb(m, "MemFree: ", i.freeram);
"MemFree: %8lu kB\n" show_val_kb(m, "MemAvailable: ", available);

View File

@ -1,7 +1,7 @@
diff -Nupr src.orig/arch/x86/kvm/x86.c src/arch/x86/kvm/x86.c 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.orig/arch/x86/kvm/x86.c 2017-02-08 20:48:33.312850621 -0500
+++ src/arch/x86/kvm/x86.c 2016-11-30 19:41:08.801737234 +0000 +++ src/arch/x86/kvm/x86.c 2017-02-08 20:49:15.030851631 -0500
@@ -241,6 +241,8 @@ static void shared_msr_update(unsigned s @@ -250,6 +250,8 @@ static void shared_msr_update(unsigned s
void kvm_define_shared_msr(unsigned slot, u32 msr) void kvm_define_shared_msr(unsigned slot, u32 msr)
{ {

View File

@ -1,7 +1,7 @@
diff -Nupr src.orig/fs/proc/array.c src/fs/proc/array.c 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.orig/fs/proc/array.c 2017-02-08 21:17:58.244893377 -0500
+++ src/fs/proc/array.c 2016-11-30 19:41:11.931737234 +0000 +++ src/fs/proc/array.c 2017-02-08 21:26:21.670905573 -0500
@@ -352,13 +352,20 @@ static inline void task_seccomp(struct s @@ -348,12 +348,19 @@ static inline void task_seccomp(struct s
#endif #endif
} }
@ -11,10 +11,9 @@ diff -Nupr src.orig/fs/proc/array.c src/fs/proc/array.c
{ {
+ int *newpid; + int *newpid;
+ +
seq_printf(m, "voluntary_ctxt_switches:\t%lu\n" seq_put_decimal_ull(m, "voluntary_ctxt_switches:\t", p->nvcsw);
"nonvoluntary_ctxt_switches:\t%lu\n", seq_put_decimal_ull(m, "\nnonvoluntary_ctxt_switches:\t", p->nivcsw);
p->nvcsw, seq_putc(m, '\n');
p->nivcsw);
+ +
+ newpid = kpatch_shadow_get(p, "newpid"); + newpid = kpatch_shadow_get(p, "newpid");
+ if (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) static void task_cpus_allowed(struct seq_file *m, struct task_struct *task)
diff -Nupr src.orig/kernel/exit.c src/kernel/exit.c 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.orig/kernel/exit.c 2017-02-08 21:26:31.119905802 -0500
+++ src/kernel/exit.c 2016-11-30 19:41:11.932737234 +0000 +++ src/kernel/exit.c 2017-02-08 21:27:11.347906776 -0500
@@ -725,6 +725,7 @@ static void check_stack_usage(void) @@ -725,6 +725,7 @@ static void check_stack_usage(void)
static inline void check_stack_usage(void) {} static inline void check_stack_usage(void) {}
#endif #endif
+#include "kpatch.h" +#include "kpatch.h"
void do_exit(long code) void __noreturn do_exit(long code)
{ {
struct task_struct *tsk = current; 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_task_work(tsk);
exit_thread(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 * Flush inherited counters to the parent - before the parent
* gets woken up by child-exit notifications. * gets woken up by child-exit notifications.
diff -Nupr src.orig/kernel/fork.c src/kernel/fork.c 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.orig/kernel/fork.c 2017-02-08 21:27:34.629907340 -0500
+++ src/kernel/fork.c 2016-11-30 19:41:11.931737234 +0000 +++ src/kernel/fork.c 2017-02-08 21:28:31.182908710 -0500
@@ -1749,6 +1749,7 @@ struct task_struct *fork_idle(int cpu) @@ -1904,6 +1904,7 @@ struct task_struct *fork_idle(int cpu)
* It copies the process, and if successful kick-starts * It copies the process, and if successful kick-starts
* it and waits for it to finish using the VM if required. * 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, long _do_fork(unsigned long clone_flags,
unsigned long stack_start, unsigned long stack_start,
unsigned long stack_size, 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)) { if (!IS_ERR(p)) {
struct completion vfork; struct completion vfork;
struct pid *pid; struct pid *pid;