Re: [PATCH V4 net-next 5/5] icmp: add response to RFC 8335 PROBE messages

5 messages, 3 authors, 2021-03-20 · open the first message on its own page

Re: [PATCH V4 net-next 5/5] icmp: add response to RFC 8335 PROBE messages

From: Andreas Roeseler <hidden>
Date: 2021-03-18 03:12:43

On Mon, 2021-03-15 at 04:35 +0800, kernel test robot wrote:
Hi Andreas,

[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Andreas-Roeseler/add-support-for-RFC-8335-PROBE/20210315-005052
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 6f
1629093399303bf19d6fcd5144061d1e25ec23
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
 -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # 
https://github.com/0day-ci/linux/commit/54d9928f1734e7b3511b945a2ce912b931a07776
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andreas-Roeseler/add-
support-for-RFC-8335-PROBE/20210315-005052
        git checkout 54d9928f1734e7b3511b945a2ce912b931a07776
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0
make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <redacted>

All errors (new ones prefixed by >>):

   mips-linux-ld: net/ipv4/icmp.o: in function `icmp_echo':
quoted
quoted
icmp.c:(.text.icmp_echo+0x658): undefined reference to
`ipv6_dev_find'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
I'm still learning the ropes of kernel development and I was wondering
if someone could help me figure out what is causing this error.

The file compiles when compiling with allyesconfig or olddefconfig, but
it cannot find the ipv6_dev_find() function when compiling with
allmodconfig and returns the error seen above. I am including
<include/net/addrconf.h> which declares ipv6_dev_find(), and the
function is defined and exported using EXPORT_SYMBOL in
<net/ipv6/addrconf.c>. I've tried declaring the function via extern in
<include/net/icmp.h> and in <net/ipv4/icmp.c>, but neither have
resolved the error and checkpatch.pl explicitly warns against using
extern calls in .c files.

Is there something that I'm not understanding about compiling kernel
components modularly? How do I avoid this error?

Re: [PATCH V4 net-next 5/5] icmp: add response to RFC 8335 PROBE messages

From: David Miller <davem@davemloft.net>
Date: 2021-03-18 03:20:28

From: Andreas Roeseler <redacted>
Date: Wed, 17 Mar 2021 22:11:47 -0500
On Mon, 2021-03-15 at 04:35 +0800, kernel test robot wrote:
Is there something that I'm not understanding about compiling kernel
components modularly? How do I avoid this error?
You cannot reference module exported symbols from statically linked code.
y

Re: [PATCH V4 net-next 5/5] icmp: add response to RFC 8335 PROBE messages

From: David Ahern <hidden>
Date: 2021-03-18 03:25:52

On 3/17/21 9:19 PM, David Miller wrote:
From: Andreas Roeseler <redacted>
Date: Wed, 17 Mar 2021 22:11:47 -0500
quoted
On Mon, 2021-03-15 at 04:35 +0800, kernel test robot wrote:
Is there something that I'm not understanding about compiling kernel
components modularly? How do I avoid this error?
quoted
You cannot reference module exported symbols from statically linked code.
y
Look at ipv6_stub to see how it exports IPv6 functions for v4 code.
There are a few examples under net/ipv4.

Re: [PATCH V4 net-next 5/5] icmp: add response to RFC 8335 PROBE messages

From: Andreas Roeseler <hidden>
Date: 2021-03-20 16:02:19

On Wed, 2021-03-17 at 21:24 -0600, David Ahern wrote:
On 3/17/21 9:19 PM, David Miller wrote:
quoted
From: Andreas Roeseler <redacted>
Date: Wed, 17 Mar 2021 22:11:47 -0500
quoted
On Mon, 2021-03-15 at 04:35 +0800, kernel test robot wrote:
Is there something that I'm not understanding about compiling
kernel
components modularly? How do I avoid this error?
quoted
You cannot reference module exported symbols from statically linked
code.
y
Look at ipv6_stub to see how it exports IPv6 functions for v4 code.
There are a few examples under net/ipv4.
Thanks for the advice. I've been able to make some progress but I still
have some questions that I have been unable to find online.

What steps are required to include a function into the ipv6_stub
struct? I've added the declaration of the function to the struct, but
when I attempt to call it using <ipv6_stub->ipv6_dev_find()> the kernel
locks up. Additionally, a typo in the declaration isn't flagged during
compilation. Are there other places where I need to edit the ipv6_stub
struct or include various headers? The examples I have looked at are
<fib_semantics.c>, <nexthop.c>, and <udp.c> in the <net/ipv4> folder
and they don't seem to do anything on the caller side of ipv6_stub, so
I think I am not adding the function to ipv6_stub properly. I have been
able to call other functions that currently exist in ipv6_stub, but not
the one I  am attempting to add, so am I missing a step?

I've noticed that some functions such as <ipv6_route_input> aren't
exported using EXPORT_SYMBOL when it is defined in
<net/ipv6/af_inet6.c>, but it is still loaded into ipv6_stub. How can
this be? Is there a different way to include symbols into ipv6_stub
based on whether or not they are explicitly exported using
EXPORT_SYMBOL?

Re: [PATCH V4 net-next 5/5] icmp: add response to RFC 8335 PROBE messages

From: David Ahern <hidden>
Date: 2021-03-20 16:43:54

On 3/20/21 10:01 AM, Andreas Roeseler wrote:
On Wed, 2021-03-17 at 21:24 -0600, David Ahern wrote:
quoted
On 3/17/21 9:19 PM, David Miller wrote:
quoted
From: Andreas Roeseler <redacted>
Date: Wed, 17 Mar 2021 22:11:47 -0500
quoted
On Mon, 2021-03-15 at 04:35 +0800, kernel test robot wrote:
Is there something that I'm not understanding about compiling
kernel
components modularly? How do I avoid this error?
quoted
You cannot reference module exported symbols from statically linked
code.
y
Look at ipv6_stub to see how it exports IPv6 functions for v4 code.
There are a few examples under net/ipv4.
Thanks for the advice. I've been able to make some progress but I still
have some questions that I have been unable to find online.

What steps are required to include a function into the ipv6_stub
struct? I've added the declaration of the function to the struct, but
when I attempt to call it using <ipv6_stub->ipv6_dev_find()> the kernel
locks up. Additionally, a typo in the declaration isn't flagged during
compilation. Are there other places where I need to edit the ipv6_stub
struct or include various headers? The examples I have looked at are
<fib_semantics.c>, <nexthop.c>, and <udp.c> in the <net/ipv4> folder
and they don't seem to do anything on the caller side of ipv6_stub, so
I think I am not adding the function to ipv6_stub properly. I have been
able to call other functions that currently exist in ipv6_stub, but not
the one I  am attempting to add, so am I missing a step?
you probably did not add the default in net/ipv6/addrconf_core.c.
I've noticed that some functions such as <ipv6_route_input> aren't
exported using EXPORT_SYMBOL when it is defined in
<net/ipv6/af_inet6.c>, but it is still loaded into ipv6_stub. How can
this be? Is there a different way to include symbols into ipv6_stub
based on whether or not they are explicitly exported using
EXPORT_SYMBOL?
take a look at 1aefd3de7bc6 as an example of how to add a new stub.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help