Skip to content

DLPX-96594 fix linux-kernel updates to 6.17: export tcp symbols needed by connstat#53

Merged
lyriclake merged 0 commit intodevelopfrom
dlpx/test/___develop___/lyriclake/b596972bd81bcfc28da3e6709759c8ba658ef8ee
Mar 11, 2026
Merged

DLPX-96594 fix linux-kernel updates to 6.17: export tcp symbols needed by connstat#53
lyriclake merged 0 commit intodevelopfrom
dlpx/test/___develop___/lyriclake/b596972bd81bcfc28da3e6709759c8ba658ef8ee

Conversation

@lyriclake
Copy link
Copy Markdown
Contributor

Problem

After updating to kernel 6.17, connstat was failing to build with:

19:40:07  ERROR: modpost: "tcp_seq_start" [connstat.ko] undefined!
19:40:07  ERROR: modpost: "tcp_seq_stop" [connstat.ko] undefined!
19:40:07  ERROR: modpost: "tcp_seq_next" [connstat.ko] undefined!

The culprit is the upstream kernel commit:

commit 6dc4c25
Author: Eric Dumazet edumazet@google.com
Date: Wed Feb 12 13:24:17 2025 +0000

tcp: use EXPORT_IPV6_MOD_GPL
Use EXPORT_IPV6_MOD_GPL for symbols that don't need
to be exported unless CONFIG_IPV6=m
tcp_hashinfo and tcp_openreq_init_rwin() are no longer
used from any module anyway.
Signed-off-by: Eric Dumazet edumazet@google.com
Reviewed-by: Kuniyuki Iwashima kuniyu@amazon.com
Reviewed-by: Mateusz Polchlopek mateusz.polchlopek@intel.com
Link: https://patch.msgid.link/20250212132418.1524422-4-edumazet@google.com
Signed-off-by: Jakub Kicinski kuba@kernel.org

which only exports the needed symbols if CONFIG_IPV6=m (the default is CONFIG_IPV6=y).

This means the symbols are now exported if ipv6 support is build as a kernel module (m), but not when ipv6 support is built into the kernel (y). See debian/master/config/annotations:

CONFIG_IPV6     policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 'riscv64': 'y', 's390x': 'y'}>
CONFIG_IPV6     note<'if this is a module we get a module load for every ipv6 packet'>

Solution

Rather than modifying our kernel build to make ipv6 a kernel module, I decided to patch tcp_ipv6.c to always export the 3 symbols connstat needs, partially reverting the upstream commit. This seemed like a less invasive / potentially impactful change.

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 84d3d556ed80..c20fff856746 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2831,7 +2831,7 @@ void *tcp_seq_start(struct seq_file *seq, loff_t *pos)
        st->last_pos = *pos;
        return rc;
 }
-EXPORT_IPV6_MOD(tcp_seq_start);
+EXPORT_SYMBOL(tcp_seq_start);

 void *tcp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 {
@@ -2862,7 +2862,7 @@ void *tcp_seq_next(struct seq_file *seq, void *v, loff_t *pos)
        st->last_pos = *pos;
        return rc;
 }
-EXPORT_IPV6_MOD(tcp_seq_next);
+EXPORT_SYMBOL(tcp_seq_next);

 void tcp_seq_stop(struct seq_file *seq, void *v)
 {
@@ -2880,7 +2880,7 @@ void tcp_seq_stop(struct seq_file *seq, void *v)
                break;
        }
 }
-EXPORT_IPV6_MOD(tcp_seq_stop);
+EXPORT_SYMBOL(tcp_seq_stop);

 static void get_openreq4(const struct request_sock *req,
                         struct seq_file *f, int i)

Testing Done

https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/13331/

@lyriclake lyriclake changed the title Dlpx/test/ develop /lyriclake/b596972bd81bcfc28da3e6709759c8ba658ef8ee DLPX-96594 fix linux-kernel updates to 6.17: export tcp symbols needed by connstat Feb 26, 2026
@sebroy sebroy self-requested a review March 5, 2026 18:53
@lyriclake lyriclake force-pushed the dlpx/test/___develop___/lyriclake/b596972bd81bcfc28da3e6709759c8ba658ef8ee branch 2 times, most recently from 82fe35c to 322259a Compare March 5, 2026 20:59
@lyriclake lyriclake force-pushed the dlpx/test/___develop___/lyriclake/b596972bd81bcfc28da3e6709759c8ba658ef8ee branch 4 times, most recently from f2fb7f1 to f682502 Compare March 10, 2026 01:16
@lyriclake lyriclake merged commit f682502 into develop Mar 11, 2026
3 of 4 checks passed
@lyriclake lyriclake deleted the dlpx/test/___develop___/lyriclake/b596972bd81bcfc28da3e6709759c8ba658ef8ee branch March 11, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants