Skip to content

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

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

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

Conversation

@lyriclake
Copy link
Contributor

@lyriclake lyriclake commented Feb 26, 2026

Problem

Difference in this PR compared to other kernel variants
One of the cherry-picked delphix patches didn't apply cleanly here. Resolving this required re-applying the following config/annotations patch for 6.17:

diff --git a/debian.hwe-6.17/config/annotations b/debian.hwe-6.17/config/annotations
index 1459f1eee912..9b0ea4bf641b 100644
--- a/debian.hwe-6.17/config/annotations
+++ b/debian.hwe-6.17/config/annotations
@@ -1,7 +1,7 @@
 # Menu: HEADER
 # FORMAT: 4
-# ARCH: amd64 arm64 armhf ppc64el riscv64 s390x
-# FLAVOUR: amd64-generic arm64-generic arm64-generic-64k armhf-generic ppc64el-generic riscv64-generic s390x-generic
+# ARCH: amd64
+# FLAVOUR: amd64-generic

 include "../../debian.master/config/annotations"

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/

@sebroy sebroy self-requested a review March 5, 2026 18:50
@lyriclake lyriclake force-pushed the dlpx/test/___develop___/lyriclake/7f1ecaf956f173c9f979b5bbb8e9516efe1435b7 branch 2 times, most recently from 11d3acf to 9611b22 Compare March 5, 2026 20:57
@lyriclake lyriclake force-pushed the dlpx/test/___develop___/lyriclake/7f1ecaf956f173c9f979b5bbb8e9516efe1435b7 branch from 9611b22 to 4d5103a Compare March 6, 2026 20:26
@lyriclake lyriclake merged commit 4d5103a into develop Mar 11, 2026
3 of 4 checks passed
@lyriclake lyriclake deleted the dlpx/test/___develop___/lyriclake/7f1ecaf956f173c9f979b5bbb8e9516efe1435b7 branch March 11, 2026 17:53
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