hunk-Kbuild.patch replaces objtool with /usr/bin/true on nvidia.o and
nvidia-modeset.o to skip validation of NVIDIA's pre-compiled blobs. On
Ubuntu kernels (CONFIG_KLP_BUILD=y), objtool is deferred to link time
via delay-objtool, so this also skips the --hacks=jump_label pass that
converts static_branch JMPs to NOPs. When freeze_processes() toggles the
freezer_active static key during suspend, the kernel tries to patch
nvkms_kthread_q_callback in nvidia-modeset.ko, finds a JMP where it
expects a NOP, and hits BUG at arch/x86/kernel/jump_label.c:73.

Fix adds dkms-objtool-jl.sh, a helper script called from MAKE[0] in
dkms.conf that runs objtool --hacks=jump_label --module --link on
nvidia.ko and nvidia-modeset.ko after make modules completes. It's
called from MAKE[0] rather than POST_BUILD because DKMS runs POST_BUILD
after strip/sign/compress, by which point the .ko files are already
.ko.zst.

Tested on 7.0.0-10-generic, suspend/resume works. Affects all x86_64
kernels >= 6.0 with CONFIG_HAVE_JUMP_LABEL_HACK=y.


** Patch removed: "nvidia-graphics-drivers-595_595.58.03-0ubuntu3.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-590/+bug/2143635/+attachment/5958696/+files/nvidia-graphics-drivers-595_595.58.03-0ubuntu3.debdiff

** Patch added: "nvidia-graphics-drivers-595_595.58.03-0ubuntu3.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-590/+bug/2143635/+attachment/5958697/+files/nvidia-graphics-drivers-595_595.58.03-0ubuntu3.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2143635

Title:
  Kernel panic (unexpected op) before suspend

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-590/+bug/2143635/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to