Skip to content

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

Open
lyriclake wants to merge 10000 commits intodevelopfrom
dlpx/test/___develop___/lyriclake/79c5e768c969fcc8e4f3954f7ebca9f5a134c41d
Open

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

Conversation

@lyriclake
Copy link

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/

piso77 and others added 30 commits January 20, 2026 20:18
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Ignore: yes
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2034048
Properties: no-test-build
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Ignore: yes
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2034551
Properties: no-test-build
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Ignore: yes
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2035600
Properties: no-test-build
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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Ignore: yes
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2037267
Properties: no-test-build
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Ignore: yes
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2037628
Properties: no-test-build
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: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2037968
Properties: no-test-build
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Ignore: yes
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2038692
Properties: no-test-build
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Ignore: yes
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2039200
Properties: no-test-build
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
It matches the parent.

Ignore: yes
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
nukelet and others added 30 commits February 3, 2026 17:30
…b.in

Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
Starting with 25.10/questing the generic kernel no longer splits modules
into linux-modules and linux-modules-extra. This was done by changing
the setup but also ripped out all generic code to produce modules-extra.
This is a problem for HWE kernels because those should match the
packaging of the GA kernel of their target series.

This patch reverts the generic changes made in questing by:
  168ea3c ("UBUNTU: [Packaging] Drop support for modules-extra")

(copied from n:hwe-6.17)

Ignore: yes
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
…l in SRCPKGNAME-tools-$(abi_release)

BugLink: https://bugs.launchpad.net/bugs/2117147

The tools perf and bpftool are not built on Noble HWE 6.14 kernels
because the kernel packaging rules introduced in Plucky on which Noble
HWE 6.14 kernels are based expect perf and bpftool to be split out into
their own packages linux-perf and bpftool, which are only built by the
primary kernel.

Resolve this by adding a flag `do_tools_noble_hwe` to return to building
perf and bpftool into the SRCPKGNAME-tools-$(abi_release) package, which
are exec'd by the wrapper scripts provided by the linux-tools-common
package produced by the Noble primary kernel.

Signed-off-by: Jacob Martin <jacob.martin@canonical.com>
[smb: Imported from hwe-6.14]
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
[vpeixoto: imported from n:hwe-6.17]
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
Enable do_tools_noble_hwe to build bpftool and perf tools into the
linux-oracle-6.17-tools-$(abi_release) package so they can be used by
the linux-tools-common wrapper scripts in Noble.

Signed-off-by: Vinicius Peixoto <vinicius.peixoto@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>
[vpeixoto: cherry-picked from n:hwe-6.17]
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@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: Stefan Bader <stefan.bader@canonical.com>
[vpeixoto: picked from n:hwe-6.17, fixed context conflicts in
control.stub.in by keeping debian.oracle-6.17/control.stub.in unchanged]
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
Inherit configs from debian.oracle, thus trimming the oracle-6.17
annotation file.

Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
Ignore: yes
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2133191
Properties: no-test-build
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
…ernel-versions (main/d2025.11.04)

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
Ignore: yes
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/2138899
Properties: no-test-build
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
…ernel-versions (main/2026.01.12)

BugLink: https://bugs.launchpad.net/bugs/1786013
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@canonical.com>
Signed-off-by: Vinicius Peixoto <vinicius.peixoto@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.
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.