Skip to content

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

Open
lyriclake wants to merge 10000 commits intodevelopfrom
dlpx/test/___develop___/lyriclake/10c0458fc39003a980219ff3238ecb8bfae15f09
Open

DLPX-96594 fix linux-kernel updates to 6.17: export tcp symbols needed by connstat#70
lyriclake wants to merge 10000 commits intodevelopfrom
dlpx/test/___develop___/lyriclake/10c0458fc39003a980219ff3238ecb8bfae15f09

Conversation

@lyriclake
Copy link

@lyriclake lyriclake commented Feb 26, 2026

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/

Thadeu Lima de Souza Cascardo and others added 30 commits January 22, 2026 14:18
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Ignore: yes
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2041867
Properties: no-test-build
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Ignore: yes
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2045254
Properties: no-test-build
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2052774
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
…/d2024.02.07)

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2061092
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2061429
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
…rsions (main/d2024.04.04)

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Ignore: yes
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2061868
Properties: no-test-build
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
magalilemes and others added 25 commits January 22, 2026 15:57
BugLink: https://bugs.launchpad.net/bugs/2127953

Enable do_tools_noble_hwe to build bpftool and perf tools into the
linux-aws-6.17-tools-$(abi_release) package so they can be used by
the linux-tools-common wrapper scripts in Noble.

Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2131154

This reverts commit 14a0781 as this
would require newer kexec tools in Noble. This was found with backported
nvidia kernels but also affects the HWE kernel.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
[magalilemes: picked from n:hwe-6.17]
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
The changes made in Questing to enable cross compiling the tools do not
work with the current test compile infrastrucure. This appears to be an
issue with the package resolver used.
So at least for the time being lets change back to allow cross compiling
only for the kernel and not the tools.

Ignore: yes
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Ignore: yes
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2132344
Properties: no-test-build
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
…el-versions (main/d2025.11.04)

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Ignore: yes
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2133790
Properties: no-test-build
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Ignore: yes
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Ignore: yes
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2138491
Properties: no-test-build
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
This is a placeholder commit to separate the Ubuntu kernel source and
our patches. Used by kernel_merge_with_upstream() in the linux-pkg repo.
@lyriclake lyriclake changed the base branch from upstreams/develop to develop February 26, 2026 19:02
@lyriclake lyriclake force-pushed the dlpx/test/___develop___/lyriclake/10c0458fc39003a980219ff3238ecb8bfae15f09 branch 2 times, most recently from 20f1d54 to 42eb6c4 Compare February 26, 2026 19:32
@lyriclake lyriclake force-pushed the dlpx/test/___develop___/lyriclake/10c0458fc39003a980219ff3238ecb8bfae15f09 branch from 42eb6c4 to 75e8d74 Compare February 26, 2026 21:21
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.