kpatch 0.5.0-0ubuntu2 ADT test failure with linux 5.3.0-0.1

Bug #1837886 reported by Seth Forshee
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kpatch (Ubuntu)
Fix Released
Low
Ben Romer
Bionic
New
Low
Unassigned
Eoan
Won't Fix
Low
Unassigned
Seth Forshee (sforshee)
tags: added: kernel-adt-failure
Revision history for this message
Seth Forshee (sforshee) wrote :

Attaching build log.

This looks to be due to a substantial API change for x86 due to this series:

https://<email address hidden>/

The API is the same if the architecture does not select CONFIG_ARCH_STACKWALK (only x86 currently selects this). If that is defined then there is a completely different API. 214d8ca6ee85 stacktrace: "Provide common infrastructure" introduces the new API.

Revision history for this message
Seth Forshee (sforshee) wrote :

It seems we should probably be using stack_trace_save_tsk() for 5.2+. Unfortunately, is not currently exported to modules.

Revision history for this message
Seth Forshee (sforshee) wrote :

The kernel also has code to perform the check for which kpatch uses the stack trace, i.e. that no task's call stack contains the function to be patched. This is performed by klp_check_stack(), via klp_enable_patch().

I'm not at all familiar with kpatch, but it kind of looks like there are two alternate modules which can be used for inserting livepatches into the kernel. One is in kmod/patch/kpatch-patch-hook.c, which does not use the klp_* interfaces exported by the kernel and does use kpatch's stack checking. The other is in kmod/patch/livepatch-patch-hook.c, which does use the klp_* interfaces and does not use kpatch's stack checking. So I wonder if the kpatch-patch-hook method is unused when the klp_* interfaces are available, and if so perhaps kpatch's internal stack checking is not needed.

Ben Romer (bromer)
Changed in kpatch (Ubuntu):
assignee: nobody → Ben Romer (bromer)
Revision history for this message
Ben Romer (bromer) wrote :

Currently, Ubuntu uses the livepatch interface built into our kernels since 4.15.0. The kpatch interface is an older method for doing in-place patching that predates livepatch, but is included in our 4.4 kernels, so our livepatch users do not need or use the DKMS module on any of our kernels.

According to the upstream issue tracker for kpatch, the specific problem here is:

"tglx renovated the stack trace code for 5.2 (see patchset in lkml archive), changing struct stack_trace and its related APIs.

Sooner or later we're going to deprecate the kpatch core module since its functionality can be provided by the kernel livepatch API. But in case anyone wants to continue to using it with newer kernels, consider this a heads up that work will be required to build it for 5.2."

https://github.com/dynup/kpatch/issues/966

 Since upstream is intending to deprecate the code and we don't use it, I think it would make the most sense to remove the kpatch-dkms package, and the test that failed, for eoan.

Revision history for this message
Ben Romer (bromer) wrote :

Updating kpatch to the latest version and removing the kpatch-dkms package.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "update to 0.8.0 and remove kpatch-dkms" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Mathew Hodson (mhodson)
Changed in kpatch (Ubuntu):
importance: Undecided → Low
Mathew Hodson (mhodson)
Changed in kpatch (Ubuntu Bionic):
importance: Undecided → Low
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

This issue also affects Eoan.

Mathew Hodson (mhodson)
Changed in kpatch (Ubuntu Eoan):
importance: Undecided → Low
Revision history for this message
Balint Reczey (rbalint) wrote :

This bug seem to have been fixed in 0.8.0-0ubuntu1 without the changelog closing it, hence doing it now.

Changed in kpatch (Ubuntu):
status: New → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

The Eoan Ermine has reached end of life, so this bug will not be fixed for that release

Changed in kpatch (Ubuntu Eoan):
status: New → Won't Fix
Revision history for this message
Logan Rosen (logan) wrote :

Removing ~ubuntu-sponsors because there isn't a patch proposed for Bionic, and the description does not follow the SRU template (https://wiki.ubuntu.com/StableReleaseUpdates).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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