2021-02-04 02:41:27

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the net-next tree

Hi all,

After merging the net-next tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

ERROR: modpost: "ip6_dst_check" [vmlinux] is a static EXPORT_SYMBOL
ERROR: modpost: "ipv4_dst_check" [vmlinux] is a static EXPORT_SYMBOL
ERROR: modpost: "ipv4_mtu" [vmlinux] is a static EXPORT_SYMBOL
ERROR: modpost: "ip6_mtu" [vmlinux] is a static EXPORT_SYMBOL

Caused by commits

f67fbeaebdc0 ("net: use indirect call helpers for dst_mtu")
bbd807dfbf20 ("net: indirect call helpers for ipv4/ipv6 dst_check functions")

I have used the net-next tree from next-20210203 fot today.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-02-04 04:02:40

by Brian Vazquez

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the net-next tree

Hi Stephen, thanks for the report. I'm having trouble trying to
compile for ppc, but I believe this should fix the problem, could you
test this patch, please? Thanks!

diff --git a/include/linux/indirect_call_wrapper.h
b/include/linux/indirect_call_wrapper.h
index 54c02c84906a..077f96be65c6 100644
--- a/include/linux/indirect_call_wrapper.h
+++ b/include/linux/indirect_call_wrapper.h
@@ -36,6 +36,7 @@

#define INDIRECT_CALLABLE_DECLARE(f) f
#define INDIRECT_CALLABLE_SCOPE
+#define INDIRECT_CALLABLE_EXPORT(f) EXPORT_SYMBOL(f)

#else
#define INDIRECT_CALL_1(f, f1, ...) f(__VA_ARGS__)
@@ -44,6 +45,7 @@
#define INDIRECT_CALL_4(f, f4, f3, f2, f1, ...) f(__VA_ARGS__)
#define INDIRECT_CALLABLE_DECLARE(f)
#define INDIRECT_CALLABLE_SCOPE static
+#define INDIRECT_CALLABLE_EXPORT(f)
#endif

/*
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 9e6537709794..9dd8ff3887b7 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1206,7 +1206,7 @@ INDIRECT_CALLABLE_SCOPE struct dst_entry
*ipv4_dst_check(struct dst_entry *dst,
return NULL;
return dst;
}
-EXPORT_SYMBOL(ipv4_dst_check);
+INDIRECT_CALLABLE_EXPORT(ipv4_dst_check);

static void ipv4_send_dest_unreach(struct sk_buff *skb)
{
@@ -1337,7 +1337,7 @@ INDIRECT_CALLABLE_SCOPE unsigned int
ipv4_mtu(const struct dst_entry *dst)

return mtu - lwtunnel_headroom(dst->lwtstate, mtu);
}
-EXPORT_SYMBOL(ipv4_mtu);
+INDIRECT_CALLABLE_EXPORT(ipv4_mtu);

static void ip_del_fnhe(struct fib_nh_common *nhc, __be32 daddr)
{
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f447f82e6819..75d6a0db1fa6 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2644,7 +2644,7 @@ INDIRECT_CALLABLE_SCOPE struct dst_entry
*ip6_dst_check(struct dst_entry *dst,

return dst_ret;
}
-EXPORT_SYMBOL(ip6_dst_check);
+INDIRECT_CALLABLE_EXPORT(ip6_dst_check);

static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)
{
@@ -3115,7 +3115,7 @@ INDIRECT_CALLABLE_SCOPE unsigned int
ip6_mtu(const struct dst_entry *dst)

return mtu - lwtunnel_headroom(dst->lwtstate, mtu);
}
-EXPORT_SYMBOL(ip6_mtu);
+INDIRECT_CALLABLE_EXPORT(ip6_mtu);

/* MTU selection:
* 1. mtu on route is locked - use it


On Wed, Feb 3, 2021 at 5:33 PM Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> After merging the net-next tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> ERROR: modpost: "ip6_dst_check" [vmlinux] is a static EXPORT_SYMBOL
> ERROR: modpost: "ipv4_dst_check" [vmlinux] is a static EXPORT_SYMBOL
> ERROR: modpost: "ipv4_mtu" [vmlinux] is a static EXPORT_SYMBOL
> ERROR: modpost: "ip6_mtu" [vmlinux] is a static EXPORT_SYMBOL
>
> Caused by commits
>
> f67fbeaebdc0 ("net: use indirect call helpers for dst_mtu")
> bbd807dfbf20 ("net: indirect call helpers for ipv4/ipv6 dst_check functions")
>
> I have used the net-next tree from next-20210203 fot today.
>
> --
> Cheers,
> Stephen Rothwell

2021-02-04 09:41:31

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the net-next tree

Hi Brian,

On Wed, 3 Feb 2021 19:52:08 -0800 Brian Vazquez <[email protected]> wrote:
>
> Hi Stephen, thanks for the report. I'm having trouble trying to
> compile for ppc, but I believe this should fix the problem, could you
> test this patch, please? Thanks!

That fixed it, thanks (though the patch was badly wrapped and
whitespace damaged :-))

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-02-04 12:22:43

by Joachim Wiberg

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the net-next tree

Hi everyone,

On Thu, Feb 04, 2021 at 20:38, Stephen Rothwell <[email protected]> wrote:
> On Wed, 3 Feb 2021 19:52:08 -0800 Brian Vazquez <[email protected]> wrote:
>> Hi Stephen, thanks for the report. I'm having trouble trying to
>> compile for ppc, but I believe this should fix the problem, could you
>> test this patch, please? Thanks!
> That fixed it, thanks (though the patch was badly wrapped and
> whitespace damaged :-))

can confirm, that patch fixes building from latest net-next also for me.

Here's an updated version.

Regards
/Joachim

diff --git a/include/linux/indirect_call_wrapper.h b/include/linux/indirect_call_wrapper.h
index 54c02c84906a..551e515b405b 100644
--- a/include/linux/indirect_call_wrapper.h
+++ b/include/linux/indirect_call_wrapper.h
@@ -36,6 +36,7 @@

#define INDIRECT_CALLABLE_DECLARE(f) f
#define INDIRECT_CALLABLE_SCOPE
+#define INDIRECT_CALLABLE_EXPORT(f) EXPORT_SYMBOL(f)

#else
#define INDIRECT_CALL_1(f, f1, ...) f(__VA_ARGS__)
@@ -44,6 +45,7 @@
#define INDIRECT_CALL_4(f, f4, f3, f2, f1, ...) f(__VA_ARGS__)
#define INDIRECT_CALLABLE_DECLARE(f)
#define INDIRECT_CALLABLE_SCOPE static
+#define INDIRECT_CALLABLE_EXPORT(f)
#endif

/*
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 9e6537709794..9dd8ff3887b7 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1206,7 +1206,7 @@ INDIRECT_CALLABLE_SCOPE struct dst_entry *ipv4_dst_check(struct dst_entry *dst,
return NULL;
return dst;
}
-EXPORT_SYMBOL(ipv4_dst_check);
+INDIRECT_CALLABLE_EXPORT(ipv4_dst_check);

static void ipv4_send_dest_unreach(struct sk_buff *skb)
{
@@ -1337,7 +1337,7 @@ INDIRECT_CALLABLE_SCOPE unsigned int ipv4_mtu(const struct dst_entry *dst)

return mtu - lwtunnel_headroom(dst->lwtstate, mtu);
}
-EXPORT_SYMBOL(ipv4_mtu);
+INDIRECT_CALLABLE_EXPORT(ipv4_mtu);

static void ip_del_fnhe(struct fib_nh_common *nhc, __be32 daddr)
{
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 8d9e053dc071..f0e9b07b92b7 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2644,7 +2644,7 @@ INDIRECT_CALLABLE_SCOPE struct dst_entry *ip6_dst_check(struct dst_entry *dst,

return dst_ret;
}
-EXPORT_SYMBOL(ip6_dst_check);
+INDIRECT_CALLABLE_EXPORT(ip6_dst_check);

static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)
{
@@ -3115,7 +3115,7 @@ INDIRECT_CALLABLE_SCOPE unsigned int ip6_mtu(const struct dst_entry *dst)

return mtu - lwtunnel_headroom(dst->lwtstate, mtu);
}
-EXPORT_SYMBOL(ip6_mtu);
+INDIRECT_CALLABLE_EXPORT(ip6_mtu);

/* MTU selection:
* 1. mtu on route is locked - use it

2021-02-04 15:44:07

by Vladimir Oltean

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the net-next tree

Hi Brian,

On Wed, Feb 03, 2021 at 07:52:08PM -0800, Brian Vazquez wrote:
> Hi Stephen, thanks for the report. I'm having trouble trying to
> compile for ppc, but I believe this should fix the problem, could you
> test this patch, please? Thanks!

Could you please submit the patch formally to net-next? Thanks.

2021-02-04 17:39:24

by Brian Vazquez

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the net-next tree

Hi all, I've just sent the patch series:
https://patchwork.kernel.org/project/netdevbpf/list/?series=428099.

Thanks,
Brian

On Thu, Feb 4, 2021 at 7:36 AM Vladimir Oltean <[email protected]> wrote:
>
> Hi Brian,
>
> On Wed, Feb 03, 2021 at 07:52:08PM -0800, Brian Vazquez wrote:
> > Hi Stephen, thanks for the report. I'm having trouble trying to
> > compile for ppc, but I believe this should fix the problem, could you
> > test this patch, please? Thanks!
>
> Could you please submit the patch formally to net-next? Thanks.