Skip to contentSkip to conversation

Kernel build failure from d9282e48c6088

DISCUSSION Colin Foster 2 participants 2 messages Nov 19, 2022 – Nov 20, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Just a heads up, commit d9282e48c6088 ("tcp: Add listening address to SYN flood message") breaks if CONFIG_IPV6 isn't enabled.

A simple change from an if() to a macro and I'm on my merry way. Not sure if you want anything more than that.

In file included from ./include/asm-generic/bug.h:22,

                 from ./arch/arm/include/asm/bug.h:60,
                 from ./include/linux/bug.h:5,
                 from ./include/linux/mmdebug.h:5,
                 from ./include/linux/mm.h:6,
                 from net/ipv4/tcp_input.c:67:
net/ipv4/tcp_input.c: In function ‘tcp_syn_flood_action’:
./include/net/sock.h:387:37: error: ‘const struct sock_common’ has no member named ‘skc_v6_rcv_saddr’; did you mean ‘skc_rcv_saddr’?
  387 | #define sk_v6_rcv_saddr __sk_common.skc_v6_rcv_saddr
      |                                     ^~~~~~~~~~~~~~~~
./include/linux/printk.h:429:19: note: in definition of macro ‘printk_index_wrap’
  429 |   _p_func(_fmt, ##__VA_ARGS__);    \
      |                   ^~~~~~~~~~~
./include/linux/printk.h:530:2: note: in expansion of macro ‘printk’
  530 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
      |  ^~~~~~
./include/linux/net.h:272:3: note: in expansion of macro ‘pr_info’
  272 |   function(__VA_ARGS__);    \
      |   ^~~~~~~~
./include/linux/net.h:288:2: note: in expansion of macro ‘net_ratelimited_function’
  288 |  net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~

./include/linux/net.h:288:43: note: in expansion of macro ‘sk_v6_rcv_saddr’
288 | net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
net/ipv4/tcp_input.c:6847:4: note: in expansion of macro ‘net_info_ratelimited’

 6847 |    net_info_ratelimited("%s: Possible SYN flooding on port [%pI6c]:%u. %s.\n",
      |    ^~~~~~~~~~~~~~~~~~~~

CC net/ipv4/icmp.o
make[3]: *** [scripts/Makefile.build:250: net/ipv4/tcp_input.o] Error 1 make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:500: net/ipv4] Error 2 make[1]: *** [scripts/Makefile.build:500: net] Error 2
make: *** [Makefile:1992: .] Error 2

#1 lore raw

Yes, Geert sent a patch:

https://lore.kernel.org/netdev/d1ecf500f07e063d4e8e34f4045ddca55416c686.1668507036.git.geert+renesas@glider.be/

Jamie

Quoted 42 lines · Colin Foster

Just a heads up, commit d9282e48c6088 ("tcp: Add listening address to SYN flood message") breaks if CONFIG_IPV6 isn't enabled.

A simple change from an if() to a macro and I'm on my merry way. Not sure if you want anything more than that.

In file included from ./include/asm-generic/bug.h:22,

                 from ./arch/arm/include/asm/bug.h:60,
                 from ./include/linux/bug.h:5,
                 from ./include/linux/mmdebug.h:5,
                 from ./include/linux/mm.h:6,
                 from net/ipv4/tcp_input.c:67:
net/ipv4/tcp_input.c: In function ‘tcp_syn_flood_action’:
./include/net/sock.h:387:37: error: ‘const struct sock_common’ has no member named ‘skc_v6_rcv_saddr’; did you mean ‘skc_rcv_saddr’?
  387 | #define sk_v6_rcv_saddr __sk_common.skc_v6_rcv_saddr
      |                                     ^~~~~~~~~~~~~~~~
./include/linux/printk.h:429:19: note: in definition of macro ‘printk_index_wrap’
  429 |   _p_func(_fmt, ##__VA_ARGS__);    \
      |                   ^~~~~~~~~~~
./include/linux/printk.h:530:2: note: in expansion of macro ‘printk’
  530 |  printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
      |  ^~~~~~
./include/linux/net.h:272:3: note: in expansion of macro ‘pr_info’
  272 |   function(__VA_ARGS__);    \
      |   ^~~~~~~~
./include/linux/net.h:288:2: note: in expansion of macro ‘net_ratelimited_function’
  288 |  net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~~~~~~~~~~

./include/linux/net.h:288:43: note: in expansion of macro ‘sk_v6_rcv_saddr’
288 | net_ratelimited_function(pr_info, fmt, ##__VA_ARGS__)
| ^~~~~~~~~~~
net/ipv4/tcp_input.c:6847:4: note: in expansion of macro ‘net_info_ratelimited’

 6847 |    net_info_ratelimited("%s: Possible SYN flooding on port [%pI6c]:%u. %s.\n",
      |    ^~~~~~~~~~~~~~~~~~~~

CC net/ipv4/icmp.o
make[3]: *** [scripts/Makefile.build:250: net/ipv4/tcp_input.o] Error 1 make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:500: net/ipv4] Error 2 make[1]: *** [scripts/Makefile.build:500: net] Error 2
make: *** [Makefile:1992: .] Error 2