temporarily disable CONFIG_X86_KERNEL_IBT

Bug #1980484 reported by Andrea Righi
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
backport-iwlwifi-dkms (Ubuntu)
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned
v4l2loopback (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned

Bug Description

Enabling IBT in the kernel is going to be problematic at the moment, because dkms' that have a precompiled binary need to be linked against non-IBT kernels and IBT kernels (see nvidia drivers for example).

For this reason it's safer to keep IBT disabled at the moment, until all the kernels will have IBT enabled and the kernel modules / binaries will use the proper flags to generate IBT-compliant binaries.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1980484

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Modules that do not use any of the init.h or module.h macros to generate init_module / cleanup_module symbols:

# objdump -x /lib/modules/5.19.0-9-generic/updates/dkms/v4l2loopback.ko | grep -e init_module -e cleanup_module
0000000000000000 g F .exit.text 000000000000004d cleanup_module
0000000000000000 g F .init.text 0000000000000979 init_module
0000000000000138 R_X86_64_64 init_module
0000000000000338 R_X86_64_64 cleanup_module

Modules that do use any of the init.h or module.h macros to generate init_module / cleanup_module symbols:

# objdump -x /lib/modules/5.19.0-9-generic/updates/dkms/v4l2loopback.ko | grep -e init_module -e cleanup_module
0000000000000810 l F .text 0000000000000030 v4l2loopback_cleanup_module
0000000000000149 l F .text.unlikely 0000000000000035 v4l2loopback_cleanup_module.cold
0000000000000000 l F .init.text 0000000000000979 v4l2loopback_init_module
0000000000000810 g F .text 0000000000000030 cleanup_module
0000000000000000 g O .exit.data 0000000000000008 __cfi_jt_cleanup_module
0000000000000000 g F .init.text 0000000000000979 init_module
0000000000000000 g O .init.data 0000000000000008 __cfi_jt_init_module
0000000000000000 R_X86_64_64 cleanup_module
0000000000000000 R_X86_64_64 init_module
0000000000000138 R_X86_64_64 init_module
0000000000000338 R_X86_64_64 cleanup_module

Specifically addition of __cfi_jt_init_module & __cfi_jt_cleanup_module is important for correctly functioning Control Flow Integrity, aka on intel IBT.

The fix is to use macros from init.h / module.h to declare entry and exit functions of the module.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Same story with other modules, i.e.:

# objdump -x ./ubuntu/iwlwifi/iwlwifi.ko | grep init_module
0000000000000000 g F .init.text 00000000000000dc init_module
0000000000000138 R_X86_64_64 init_module

versus

# objdump -x ./kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko | grep -e init_module
0000000000000000 g F .init.text 000000000000007c init_module
0000000000000000 g O .init.data 0000000000000008 __cfi_jt_init_module
0000000000000000 R_X86_64_64 init_module
0000000000000138 R_X86_64_64 init_module

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in backport-iwlwifi-dkms (Ubuntu):
status: New → Confirmed
Changed in v4l2loopback (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package v4l2loopback - 0.12.5-1ubuntu7

---------------
v4l2loopback (0.12.5-1ubuntu7) kinetic; urgency=medium

  * Drop obsolte REMAKE_INITRD option from dkms.conf.
  * Update module init & exit calls to use kernel provided macros, such
    that they gain correct IBT attributes. LP: #1980484

 -- Dimitri John Ledkov <email address hidden> Mon, 11 Jul 2022 16:14:38 +0100

Changed in v4l2loopback (Ubuntu Kinetic):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package backport-iwlwifi-dkms - 9858-0ubuntu6

---------------
backport-iwlwifi-dkms (9858-0ubuntu6) kinetic; urgency=medium

  [ You-Sheng Yang ]
  * install iwlmei when compiled against kernel >= 5.17. (LP: #1975573)

  * compat: rename built module to iwlwifi-compat.ko (LP: #1975593)

  [ Dimitri John Ledkov ]
  * dkms: bump obsoleted by to 5.20.0 kernel
  * backport: patch backport headers to support CFI (LP: #1980484)

 -- Dimitri John Ledkov <email address hidden> Mon, 11 Jul 2022 16:46:24 +0100

Changed in backport-iwlwifi-dkms (Ubuntu Kinetic):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.19.0-15.15

---------------
linux (5.19.0-15.15) kinetic; urgency=medium

  * kinetic/linux: 5.19.0-15.15 -proposed tracker (LP: #1983335)

  * Miscellaneous Ubuntu changes
    - [Config] update annotations to support both gcc-11 and gcc-12

 -- Andrea Righi <email address hidden> Tue, 02 Aug 2022 09:23:01 +0200

Changed in linux (Ubuntu Kinetic):
status: Incomplete → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Can we please get a test case for this one, since we'll be getting this into jammy-proposed as an SRU?

Changed in v4l2loopback (Ubuntu Jammy):
status: New → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Andrea, or anyone else affected,

Accepted v4l2loopback into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/v4l2loopback/0.12.7-2ubuntu2~22.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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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
Andrea Righi (arighi) wrote :

I performed a smoke test with v4l2loopback-dkms in jammy, everything looks good.

Test case:
 $ sudo apt install v4l2loopback-dkms
...
 $ sudo modprobe v4l2loopback devices=1 video_nr=8 exclusive_caps=1 max_buffers=2
 $ sudo v4l2loopback-ctl set-fps 60 /dev/video8
OK
$ sudo v4l2-ctl --list-devices
Dummy video device (0x0000) (platform:v4l2loopback-000):
 /dev/video8

This works both with 5.15 and the new 5.19 kernel.

Andrea Righi (arighi)
tags: added: verification-done-jammy
removed: verification-needed-jammy
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package v4l2loopback - 0.12.7-2ubuntu2~22.04.1

---------------
v4l2loopback (0.12.7-2ubuntu2~22.04.1) jammy; urgency=medium

  * Backport dkms support for HWE kernels. LP: #1999670

v4l2loopback (0.12.7-2ubuntu2) kinetic; urgency=medium

  * Preserve CC setting when invoking sub-make, to ensure module can be
    built correctly with the kernel's custom compiler. Fixes FTBFS in
    hwe-5.19 build. LP: #1991664

v4l2loopback (0.12.7-2ubuntu1) kinetic; urgency=medium

  * Merge from Debian, remaining changes:
    - drop module-assistant autopkgtest
    - add Ubuntu patch track active-readers
    - add Ubuntu patch implement support for V4L2_EVENT_PRI_CLIENT_USAGE

v4l2loopback (0.12.7-2) unstable; urgency=medium

  * Fix DKMS build on linux>=5.18

v4l2loopback (0.12.7-1) unstable; urgency=medium

  * New upstream version 0.12.7

  [ Andreas Beckmann ]
  * Switch to dh-sequence-dkms.
  * Switch to Testsuite: autopkgtest-pkg-dkms.

  [ Debian Janitor ]
  * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository,
    Repository-Browse.
  * Remove constraints unnecessary since buster

  [ IOhannes m zmölnig ]
  * Drop patches applied upstream
  * Drop unnecessary B-Ds
  * Bump dh-compat to 13
  * Bump standards version to 4.6.1

v4l2loopback (0.12.5-1ubuntu7) kinetic; urgency=medium

  * Drop obsolte REMAKE_INITRD option from dkms.conf.
  * Update module init & exit calls to use kernel provided macros, such
    that they gain correct IBT attributes. LP: #1980484

v4l2loopback (0.12.5-1ubuntu6) kinetic; urgency=low

  * Check CONFIG_VIDEO_DEV against kernel version >= 5.18. (LP: #1970983)

 -- Dimitri John Ledkov <email address hidden> Mon, 16 Jan 2023 11:22:08 +0000

Changed in v4l2loopback (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for v4l2loopback 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.

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

Remote bug watches

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