integration: rhel-7.6 and 7.7 module-call-external fix unsupported sibling call

These patches cause the following error on ppc64le on both 7.7 and 7.6:
create-diff-object: ERROR: export.o: kpatch_no_sibling_calls_ppc64le: 3290: Found an unsupported sibling call at e_show()+0x100.  Add __attribute__((optimize("-fno-optimize-sibling-calls"))) to e_show() definition.

Adding -fno-optimize-sibling-calls breaks build on x86_64, so limit it
to ppc64le only.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
Artem Savkov 2020-01-20 16:19:36 +01:00
parent 68c04e8282
commit a48fb4a6f6
2 changed files with 30 additions and 20 deletions

View File

@ -1,17 +1,22 @@
Index: kernel-rhel7/fs/nfsd/export.c
===================================================================
--- kernel-rhel7.orig/fs/nfsd/export.c
+++ kernel-rhel7/fs/nfsd/export.c
@@ -1184,6 +1184,8 @@ static void exp_flags(struct seq_file *m
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 27459a453bb8..2247255877be 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1184,7 +1184,13 @@ static void exp_flags(struct seq_file *m, int flag, int fsid,
}
}
+extern char *kpatch_string(void);
+
+#ifdef CONFIG_PPC64
+static int __attribute__((optimize("-fno-optimize-sibling-calls"))) e_show(struct seq_file *m, void *p)
+#else
static int e_show(struct seq_file *m, void *p)
+#endif
{
struct cache_head *cp = p;
@@ -1193,6 +1195,7 @@ static int e_show(struct seq_file *m, vo
struct svc_export *exp = container_of(cp, struct svc_export, h);
@@ -1193,6 +1199,7 @@ static int e_show(struct seq_file *m, void *p)
if (p == SEQ_START_TOKEN) {
seq_puts(m, "# Version 1.1\n");
seq_puts(m, "# Path Client(Flags) # IPs\n");
@ -19,10 +24,10 @@ Index: kernel-rhel7/fs/nfsd/export.c
return 0;
}
Index: kernel-rhel7/net/netlink/af_netlink.c
===================================================================
--- kernel-rhel7.orig/net/netlink/af_netlink.c
+++ kernel-rhel7/net/netlink/af_netlink.c
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 592f64643491..21b87cb948c9 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2568,4 +2568,9 @@ panic:
panic("netlink_init: Cannot allocate nl_table\n");
}

View File

@ -1,17 +1,22 @@
Index: kernel/fs/nfsd/export.c
===================================================================
--- kernel.orig/fs/nfsd/export.c
+++ kernel/fs/nfsd/export.c
@@ -1184,6 +1184,8 @@ static void exp_flags(struct seq_file *m
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 27459a453bb8..2247255877be 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1184,7 +1184,13 @@ static void exp_flags(struct seq_file *m, int flag, int fsid,
}
}
+extern char *kpatch_string(void);
+
+#ifdef CONFIG_PPC64
+static int __attribute__((optimize("-fno-optimize-sibling-calls"))) e_show(struct seq_file *m, void *p)
+#else
static int e_show(struct seq_file *m, void *p)
+#endif
{
struct cache_head *cp = p;
@@ -1193,6 +1195,7 @@ static int e_show(struct seq_file *m, vo
struct svc_export *exp = container_of(cp, struct svc_export, h);
@@ -1193,6 +1199,7 @@ static int e_show(struct seq_file *m, void *p)
if (p == SEQ_START_TOKEN) {
seq_puts(m, "# Version 1.1\n");
seq_puts(m, "# Path Client(Flags) # IPs\n");
@ -19,10 +24,10 @@ Index: kernel/fs/nfsd/export.c
return 0;
}
Index: kernel/net/netlink/af_netlink.c
===================================================================
--- kernel.orig/net/netlink/af_netlink.c
+++ kernel/net/netlink/af_netlink.c
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 592f64643491..21b87cb948c9 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2568,4 +2568,9 @@ panic:
panic("netlink_init: Cannot allocate nl_table\n");
}