mirror of https://github.com/dynup/kpatch
Testing: Add testcase for correlating static local variable
This patch adds a reproducer testcase for correlating static local variables added in .rodata* section, ahead of .toc section. This testcase is for issue seen on PowerPC. For more details on the issue refer pull request: 793. It add's the testcase for: - Fedora-27 Kernel version 4.15.10-300 - Centos-7 Kernel version 3.10.0-693 and - Ubuntu-16.04 Kernel version 4.13.0-25.29 Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
This commit is contained in:
parent
ff8b2510af
commit
bfacf5d15c
|
@ -0,0 +1,23 @@
|
|||
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
|
||||
index a9d587a..23336ed 100644
|
||||
--- a/net/ipv6/netfilter.c
|
||||
+++ b/net/ipv6/netfilter.c
|
||||
@@ -106,6 +106,8 @@ static int nf_ip6_reroute(struct sk_buff *skb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#include "kpatch-macros.h"
|
||||
+
|
||||
static int nf_ip6_route(struct net *net, struct dst_entry **dst,
|
||||
struct flowi *fl, bool strict)
|
||||
{
|
||||
@@ -119,6 +121,9 @@ static int nf_ip6_route(struct net *net, struct dst_entry **dst,
|
||||
struct dst_entry *result;
|
||||
int err;
|
||||
|
||||
+ if (!jiffies)
|
||||
+ printk("kpatch nf_ip6_route foo\n");
|
||||
+
|
||||
result = ip6_route_output(net, sk, &fl->u.ip6);
|
||||
err = result->error;
|
||||
if (err)
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
|
||||
index 9bf2604..026ac6c 100644
|
||||
--- a/net/ipv6/netfilter.c
|
||||
+++ b/net/ipv6/netfilter.c
|
||||
@@ -109,6 +109,8 @@ static int nf_ip6_reroute(struct net *net, struct sk_buff *skb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#include "kpatch-macros.h"
|
||||
+
|
||||
static int nf_ip6_route(struct net *net, struct dst_entry **dst,
|
||||
struct flowi *fl, bool strict)
|
||||
{
|
||||
@@ -122,6 +124,9 @@ static int nf_ip6_route(struct net *net, struct dst_entry **dst,
|
||||
struct dst_entry *result;
|
||||
int err;
|
||||
|
||||
+ if (!jiffies)
|
||||
+ printk("kpatch nf_ip6_route foo\n");
|
||||
+
|
||||
result = ip6_route_output(net, sk, &fl->u.ip6);
|
||||
err = result->error;
|
||||
if (err)
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
|
||||
index 39970e2..85e750d 100644
|
||||
--- a/net/ipv6/netfilter.c
|
||||
+++ b/net/ipv6/netfilter.c
|
||||
@@ -108,6 +108,8 @@ static int nf_ip6_reroute(struct net *net, struct sk_buff *skb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#include "kpatch-macros.h"
|
||||
+
|
||||
static int nf_ip6_route(struct net *net, struct dst_entry **dst,
|
||||
struct flowi *fl, bool strict)
|
||||
{
|
||||
@@ -121,6 +123,9 @@ static int nf_ip6_route(struct net *net, struct dst_entry **dst,
|
||||
struct dst_entry *result;
|
||||
int err;
|
||||
|
||||
+ if (!jiffies)
|
||||
+ printk("kpatch nf_ip6_route foo\n");
|
||||
+
|
||||
result = ip6_route_output(net, sk, &fl->u.ip6);
|
||||
err = result->error;
|
||||
if (err)
|
Loading…
Reference in New Issue