west-chamber-dkms fails to build after ip_route_me_harder() signature change

Bug #1912783 reported by Kleber Sacilotto de Souza
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
west-chamber (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
High
Unassigned
Focal
Fix Released
High
Unassigned
Groovy
Fix Released
High
Unassigned

Bug Description

[Impact]
Focal linux 5.4.0-57.63 and Groovy linux 5.8.0-44.50 backported from upstream stable releases the following commit, which broke the build of west-chamber dkms modules on Groovy, Focal and Bionic for all 5.4 and 5.8 kernels based on this release:

"netfilter: use actual socket sk rather than skb sk when routing harder" (Upstream commit 46d6c5ae953cc0be38efd0e469284df7c4328cf8).

This is the same issue found on xtables-addons (bug 1907109 and bug 1915177).

[Test case]
Install west-chamber-dkms package which builds the kernel modules.

[Fix]
The proposed fix is similar to what has been done for xtabled-addons and use a version of the API depending on the kernel version being built against.

However, the ABI version detection needs to be done differently between the 5.4 and the 5.8 kernels. For the 5.4 kernels the ABI change was applied as part of an upstream stable release which changed the SUBLEVEL version on the Makefile, so the detection can be done using the LINUX_VERSION_CODE macro. For the 5.8 kernels, this can't be done and another method is needed to check function declaration on the kernel headers. Therefore Focal also needs the same change as done in Groovy because of the HWE backport based on 5.8.

[Where problems could occur]
If any kernel version doesn't match the assumptions reflected by the ifdef's the modules can fail to build.

-----
Testing failing on:
amd64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/amd64/w/west-chamber/20210121_172911_d9f41@/log.gz
arm64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/arm64/w/west-chamber/20210113_011159_54cdf@/log.gz
armhf: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/armhf/w/west-chamber/20210113_010911_54cdf@/log.gz
ppc64el: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/ppc64el/w/west-chamber/20210113_010547_54cdf@/log.gz
s390x: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-focal/focal/s390x/w/west-chamber/20210113_010347_cc516@/log.gz

Build of the dkms is failing with the following error:

/usr/src/west-chamber-20100405+svn20111107.r124/extensions/xt_CUI.c:106:30: error: passing argument 2 of ‘ip_route_me_harder’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  106 | if (ip_route_me_harder(net, skb, addr_type))
      | ^~~
      | |
      | struct sk_buff *
In file included from ./include/linux/netfilter/x_tables.h:245,
                 from /usr/src/west-chamber-20100405+svn20111107.r124/extensions/xt_CUI.c:19:
./include/linux/netfilter_ipv4.h:19:54: note: expected ‘struct sock *’ but argument is of type ‘struct sk_buff *’
   19 | int ip_route_me_harder(struct net *net, struct sock *sk, struct sk_buff *skb, unsigned addr_type);
      |

Changed in west-chamber (Ubuntu):
status: New → Fix Released
Changed in west-chamber (Ubuntu Bionic):
status: New → In Progress
Changed in west-chamber (Ubuntu Focal):
status: New → Confirmed
Changed in west-chamber (Ubuntu Bionic):
status: In Progress → Confirmed
description: updated
description: updated
Changed in west-chamber (Ubuntu Bionic):
importance: Undecided → High
Changed in west-chamber (Ubuntu Focal):
importance: Undecided → High
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Attached is the debdiff for west-chamber west-chamber_20100405+svn20111107.r124-12ubuntu0.1 to fix the build issue on Focal.

The source packages can be found at:
https://kernel.ubuntu.com/~ksouza/lp1912783/

The package was built successfully on all arches on the following ppa:
https://launchpad.net/~kleber-souza/+archive/ubuntu/ppa/+sourcepub/12090844/+listing-archive-extra

Changed in west-chamber (Ubuntu Focal):
status: Confirmed → In Progress
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Attached is the debdiff for west-chamber 20100405+svn20111107.r124-8ubuntu0.1 to fix the build issue on Bionic.

The source packages can be found at:
https://kernel.ubuntu.com/~ksouza/lp1912783/bionic/

The package was built successfully on all arches on the following ppa:
https://launchpad.net/~kleber-souza/+archive/ubuntu/ppa/+sourcepub/12112870/+listing-archive-extra

Changed in west-chamber (Ubuntu Bionic):
status: Confirmed → In Progress
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Hi,

Please do not promote the proposed changes for Focal. Groovy received the same kernel patch that changed ip_route_me_harder() signature so it will need to be adapted for the HWE 5.8 kernel as well.

I will upload a new version for Focal soon.

summary: - west-chamber-dkms fails to build with linux 5.4.0-57.63
+ west-chamber-dkms fails to build after ip_route_me_harder() signature
+ change
description: updated
Changed in west-chamber (Ubuntu Groovy):
status: New → In Progress
Changed in west-chamber (Ubuntu Groovy):
importance: Undecided → High
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Attached is the debdiff for the proposed change for Groovy. Please note that this change depends on the proposed fixes for xtables-addons (bug 1915177).

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Attached is the debdiff for the proposed change for Focal. This is the backport of the proposed changes on Groovy. west-chamber on -release pocket for both series are already the same version, so keeping them in sync would be the easiest way to maintain it forward.

Please note that this change depends on the proposed fixes for xtables-addons (bug 1915177).

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :
Revision history for this message
Robie Basak (racb) wrote :

> Please note that this change depends on the proposed fixes for xtables-addons (bug 1915177).

Thank you for calling this out.

Your uploads of west-chamber look fine to me, except that I don't see any relationship with xtables-addons expressed. Exactly how does this change depend on the xtables-addons changes, and shouldn't this be expressed in packaging metadata if the ordering of updates matters?

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Hi Robie,

Thank you for raising that up. On Groovy, the new west-chambers-dkms can be installed with the current xtables-addons-dkms in -release (3.9-1). However, in Focal we really need the xtables-addons-dkms installed first otherwise the build breaks.

Should we update the xtables-addons-dkms version on west-chambers 'Depends:'?

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Attached is an update for the proposed package in Focal to depend on the update for xtables-addons.

This is not needed for Groovy.

Revision history for this message
Robie Basak (racb) wrote :

Thanks!

As discussed on IRC: the versioned Depends is also not needed for Bionic. I dropped the changelog version bump as this is not needed as the previous upload was never published.

I also ran update-maintainer since that hadn't been run.

I'm not sure who sponsored your previous upload, but as the change from the previous upload is trivial (just adding the versioned depends) I've sponsored this replacement.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Kleber, or anyone else affected,

Accepted west-chamber into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/west-chamber/20100405+svn20111107.r124-12ubuntu0.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in west-chamber (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-groovy
Revision history for this message
Chris Halse Rogers (raof) wrote :

Hello Kleber, or anyone else affected,

Accepted west-chamber into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/west-chamber/20100405+svn20111107.r124-12ubuntu0.2~20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in west-chamber (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Chris Halse Rogers (raof) wrote :

Does the bionic west-chamber-dkms also rely on a newer xtables-addons-dkms? I've seen focal and groovy mentioned, but not bionic?

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (west-chamber/20100405+svn20111107.r124-12ubuntu0.2)

All autopkgtests for the newly accepted west-chamber (20100405+svn20111107.r124-12ubuntu0.2) for groovy have finished running.
The following regressions have been reported in tests triggered by the package:

west-chamber/20100405+svn20111107.r124-12ubuntu0.2 (ppc64el, amd64, armhf, s390x, arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/groovy/update_excuses.html#west-chamber

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

The autopkgtests is failing with the following error:

  CC [M] /usr/src/west-chamber-20100405+svn20111107.r124/extensions/xt_CUI.o
In file included from /usr/src/west-chamber-20100405+svn20111107.r124/extensions/xt_CUI.c:25:
/usr/src/west-chamber-20100405+svn20111107.r124/extensions/compat_netfilter.h:4:10: fatal error: /usr/src/west-chamber-20100405+svn20111107.r124/extensions/config_features.h: Too many levels of symbolic links
    4 | #include "config_features.h"
      | ^~~~~~~~~~~~~~~~~~~
compilation terminated.

I cannot reproduce this issue locally, neither installing the dkms package manually nor running 'autopkgtest'.

I will investigate this.

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

The hint was here:

Warning: The pre_build script is not executable.

The debdiff includes a new script which is set as the dkms PRE_BUILD, however the debdiff can't represent the new file permissions and without running it the symbolic links to config_features.h are not set properly.

I will fix it on debian/rules and will upload a fix soon.

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Sorry for not catching the permission issue before, the way I was building and testing the package is not exactly the way it's done when the debdiff is applied while sponsoring it. Lesson learned.

I will attach debdiff's fixing this issue for groovy and focal.

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Attached debdiff for west-chamber on Groovy between versions 20100405+svn20111107.r124-12 and 20100405+svn20111107.r124-12ubuntu0.3.

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Attached debdiff for west-chamber on Focal between versions 20100405+svn20111107.r124-12 and 20100405+svn20111107.r124-12ubuntu0.3~20.04.1 (backported from Groovy).

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Hi SRU team,

Could you please consider the last two attached files to fix the issues on Groovy and Focal?

Could you also check if the upload for Bionic could be approved?

Thank you.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Kleber, or anyone else affected,

Accepted west-chamber into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/west-chamber/20100405+svn20111107.r124-8ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in west-chamber (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

I can confirm that west-chamber=20100405+svn20111107.r124-8ubuntu0.1 can be installed and compiled with the latest 4.15 and 5.4 kernels in bionic:

$ dkms status
west-chamber, 20100405+svn20111107.r124, 4.15.0-137-generic, x86_64: installed
west-chamber, 20100405+svn20111107.r124, 5.4.0-67-generic, x86_64: installed
xtables-addons, 3.0, 4.15.0-137-generic, x86_64: installed
xtables-addons, 3.0, 5.4.0-67-generic, x86_64: installed

The autopkgtests were also successful:

bionic/linux amd64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/amd64/w/west-chamber/20210311_104034_5e19d@/log.gz

bionic/linux-hwe-5.4 amd64: https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-bionic/bionic/amd64/w/west-chamber/20210311_104313_48486@/log.gz

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Kleber, or anyone else affected,

Accepted west-chamber into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/west-chamber/20100405+svn20111107.r124-12ubuntu0.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Kleber, or anyone else affected,

Accepted west-chamber into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/west-chamber/20100405+svn20111107.r124-12ubuntu0.3~20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

I can confirm that west-chamber-dkms=20100405+svn20111107.r124-12ubuntu0.3 can be installed and the modules built and loaded successfully in Groovy with both the older and the newer version of the kernel API:

$ dkms status
west-chamber, 20100405+svn20111107.r124, 5.8.0-41-generic, x86_64: installed
west-chamber, 20100405+svn20111107.r124, 5.8.0-45-generic, x86_64: installed
xtables-addons, 3.9, 5.8.0-41-generic, x86_64: installed
xtables-addons, 3.9, 5.8.0-45-generic, x86_64: installed

tags: added: verification-done-groovy
removed: verification-needed-groovy
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

I can confirm that west-chamber-dkms=20100405+svn20111107.r124-12ubuntu0.3~20.04.1 can be installed and the modules built and loaded successfully in Focal with the generic and hwe kernels, both with the older and the newer version of the kernel API:

$ dkms status
west-chamber, 20100405+svn20111107.r124, 5.4.0-54-generic, x86_64: installed
west-chamber, 20100405+svn20111107.r124, 5.4.0-67-generic, x86_64: installed
west-chamber, 20100405+svn20111107.r124, 5.8.0-41-generic, x86_64: installed
west-chamber, 20100405+svn20111107.r124, 5.8.0-45-generic, x86_64: installed
xtables-addons, 3.9, 5.4.0-54-generic, x86_64: installed
xtables-addons, 3.9, 5.4.0-67-generic, x86_64: installed
xtables-addons, 3.9, 5.8.0-41-generic, x86_64: installed
xtables-addons, 3.9, 5.8.0-45-generic, x86_64: installed

tags: added: verification-done-focal
removed: verification-needed-focal
Mathew Hodson (mhodson)
tags: removed: verification-needed
Mathew Hodson (mhodson)
Changed in west-chamber (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package west-chamber - 20100405+svn20111107.r124-12ubuntu0.3

---------------
west-chamber (20100405+svn20111107.r124-12ubuntu0.3) groovy; urgency=medium

  * Adjust for changed signature of ip_route_me_harder (LP: #1912783)
    - 04_ip_route_me_harder-compat.patch

 -- Kleber Sacilotto de Souza <email address hidden> Wed, 03 Mar 2021 18:49:07 +0100

Changed in west-chamber (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for west-chamber has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package west-chamber - 20100405+svn20111107.r124-12ubuntu0.3~20.04.1

---------------
west-chamber (20100405+svn20111107.r124-12ubuntu0.3~20.04.1) focal; urgency=medium

  * Adjust for changed signature of ip_route_me_harder (LP: #1912783)
    - 04_ip_route_me_harder-compat.patch

 -- Kleber Sacilotto de Souza <email address hidden> Thu, 04 Mar 2021 12:31:40 +0100

Changed in west-chamber (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package west-chamber - 20100405+svn20111107.r124-8ubuntu0.1

---------------
west-chamber (20100405+svn20111107.r124-8ubuntu0.1) bionic; urgency=medium

  * Adjust for changed signature of ip_route_me_harder (LP: #1912783)
    - 04_port_to_linux_5.10.patch

 -- Kleber Sacilotto de Souza <email address hidden> Mon, 01 Feb 2021 16:01:54 +0100

Changed in west-chamber (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.