VIMC module not available (CONFIG_VIDEO_VIMC not set)

Bug #1831482 reported by Kieran Bingham
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Po-Hsu Lin
Bionic
Undecided
Po-Hsu Lin
Disco
Undecided
Po-Hsu Lin
Eoan
Undecided
Po-Hsu Lin

Bug Description

== SRU Justification ==
VIMC is a virtual media controller that can emulate a real media device.
This is useful for automated tests, and development of multimedia frameworks.

== Fix ==
Enable VIMC as a module in B/D/E kernel configs.

== Test ==
Test kernels could be found here:
https://people.canonical.com/~phlin/kernel/lp-1831482-cfg-vimc/

User has reported that the Eoan kernel works as expected.
I have also smoke tested the B/D kernel to make sure the VIMC modules
can be loaded properly.

== Regression Potential ==
Low, this patchset enables the VIMC module support, we might see some
bug reports against this module in the future. However the acutal impact
for a non-vimc user should be minimum.

There is a null pointer deference issue was found while inserting the
vimc module on some system (lp:1840028), it will be handled in that bug.

== Original Bug report ==
The Multimedia VIMC module provides a test interface for the linux-media media controller framework.

This is useful for automated tests, and development of multimedia frameworks.
Other components similar to this such as VIVID (CONFIG_VIDEO_VIVID=m) are enabled, but VIMC is missing from the linux-modules packages:

$ grep VIMC /boot/config-*
/boot/config-4.15.0-32-generic:# CONFIG_VIDEO_VIMC is not set
/boot/config-4.17.9-041709-generic:# CONFIG_VIDEO_VIMC is not set
/boot/config-4.18.4-041804-generic:# CONFIG_VIDEO_VIMC is not set
/boot/config-4.18.7-041807-generic:# CONFIG_VIDEO_VIMC is not set
/boot/config-5.0.0-13-generic:# CONFIG_VIDEO_VIMC is not set
/boot/config-5.0.0-15-generic:# CONFIG_VIDEO_VIMC is not set

Could this be enabled in future releases as a module please?

I'm running Ubuntu 19.04, with Ubuntu 5.0.0-13.14-generic 5.0.6, however I believe this issue affects all current Ubuntu kernel releases.

CVE References

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 1831482

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
tags: added: bionic
Revision history for this message
Kieran Bingham (kieranbingham) wrote :

Log files are irrelevant. This is not a bug in the running kernel, just an issue with the kernel config used to build the modules.

Issue changed to confirmed.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Kieran Bingham (kieranbingham) wrote :

for reference, CONFIG_VIDEO_VIMC was added in v4.11-rc5-253-gf2fe89061d79, which made it into Linux v4.12

Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Disco):
status: New → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Po-Hsu Lin (cypressyew)
tags: added: disco
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hi,
can you give this kernel a try?
https://people.canonical.com/~phlin/kernel/lp-1831482-cfg-vimc/

It looks ok on my side.

ubuntu@moe:~$ grep VIMC /boot/config-5.0.0-22-generic
CONFIG_VIDEO_VIMC=m
ubuntu@moe:~$ sudo modprobe vimc
ubuntu@moe:~$ lsmod | grep vimc
vimc_capture 20480 0
vimc_streamer 16384 1 vimc_capture
vimc_debayer 20480 0
vimc_sensor 20480 0
videobuf2_vmalloc 20480 1 vimc_capture
v4l2_tpg 61440 1 vimc_sensor
vimc_scaler 20480 0
videobuf2_v4l2 24576 1 vimc_capture
videobuf2_common 49152 2 videobuf2_v4l2,vimc_capture
vimc_common 16384 10 vimc_scaler,vimc_debayer,vimc_sensor,vimc_capture
vimc 20480 0
videodev 200704 6 vimc_common,videobuf2_v4l2,vimc,videobuf2_common,vimc_sensor,vimc_capture
media 53248 7 vimc_common,videodev,vimc_streamer,videobuf2_v4l2,vimc,videobuf2_common,vimc_capture

Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Eoan):
status: Confirmed → In Progress
Revision history for this message
Kieran Bingham (kieranbingham) wrote :

Thanks I'm running the 5.2 kernel that you built now and confirm it has VIMC support.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This is the test result for 4.15 kernel.
ubuntu@curly:~$ uname -a
Linux curly 4.15.0-56-generic #62 SMP Thu Aug 1 02:58:31 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@curly:~$ grep VIMC /boot/config-4.15.0-56-generic
CONFIG_VIDEO_VIMC=m
ubuntu@curly:~$ lsmod | grep vimc
vimc_capture 16384 0
vimc_streamer 16384 1 vimc_capture
videobuf2_vmalloc 16384 1 vimc_capture
videobuf2_v4l2 24576 1 vimc_capture
vimc_debayer 16384 0
vimc_scaler 16384 0
videobuf2_core 40960 2 videobuf2_v4l2,vimc_capture
vimc_sensor 16384 0
v4l2_tpg 65536 1 vimc_sensor
vimc_common 16384 10 vimc_scaler,vimc_debayer,vimc_sensor,vimc_capture
vimc 16384 0
videodev 184320 5 vimc_common,videobuf2_core,videobuf2_v4l2,vimc,vimc_capture
media 40960 5 vimc_common,videodev,vimc_streamer,vimc,vimc_capture

description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Hi Kieran,
Thanks for checking, I have this sent to the mailing list:
https://lists.ubuntu.com/archives/kernel-team/2019-August/102713.html

tags: added: eoan
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

I found there will be a null pointer dereference issue when inserting the vimc module on a bare-metal system:

ubuntu@amaura:~$ sudo modprobe vimc
Killed

Bug 1840028.

Fix for Bionic has been tested with positive test result, next is Disco.
When it's done, the patch review can proceed.

Revision history for this message
Kieran Bingham (kieranbingham) wrote :

Has the fix been picked up by the linux-stable trees?

Po-Hsu Lin (cypressyew)
description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

I can't find it on the stable tree. It will be cherry-picked into Ubuntu kernel if no objections. Patch https://github.com/torvalds/linux/commit/ee1c71a8e1456ab53fe667281d855849edf26a4d#diff-4764248de66b484b364df935156b7e92

V2 for this config patch sent to kernel-team ML:
https://lists.ubuntu.com/archives/kernel-team/2019-August/103089.html

Seth Forshee (sforshee)
Changed in linux (Ubuntu Eoan):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (12.7 KiB)

This bug was fixed in the package linux - 5.2.0-15.16

---------------
linux (5.2.0-15.16) eoan; urgency=medium

  * Packaging resync (LP: #1786013)
    - [Packaging] resync getabis

  * Change kernel compression method to improve boot speed (LP: #1840934)
    - [Packaging] add build dependencies for compression algorithms

linux (5.2.0-14.15) eoan; urgency=medium

  * eoan/linux: 5.2.0-14.15 -proposed tracker (LP: #1841159)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync getabis

  * Eoan update: v5.2.9 upstream stable release (LP: #1841110)
    - Revert "PCI: Add missing link delays required by the PCIe spec"
    - IIO: Ingenic JZ47xx: Set clock divider on probe
    - iio: cros_ec_accel_legacy: Fix incorrect channel setting
    - iio: imu: mpu6050: add missing available scan masks
    - iio: adc: gyroadc: fix uninitialized return code
    - iio: adc: max9611: Fix misuse of GENMASK macro
    - staging: gasket: apex: fix copy-paste typo
    - staging: wilc1000: flush the workqueue before deinit the host
    - staging: android: ion: Bail out upon SIGKILL when allocating memory.
    - Staging: fbtft: Fix probing of gpio descriptor
    - Staging: fbtft: Fix reset assertion when using gpio descriptor
    - crypto: ccp - Fix oops by properly managing allocated structures
    - crypto: ccp - Add support for valid authsize values less than 16
    - crypto: ccp - Ignore tag length when decrypting GCM ciphertext
    - driver core: platform: return -ENXIO for missing GpioInt
    - usb: usbfs: fix double-free of usb memory upon submiturb error
    - Revert "USB: rio500: simplify locking"
    - usb: iowarrior: fix deadlock on disconnect
    - sound: fix a memory leak bug
    - mmc: cavium: Set the correct dma max segment size for mmc_host
    - mmc: cavium: Add the missing dma unmap when the dma has finished.
    - loop: set PF_MEMALLOC_NOIO for the worker thread
    - bdev: Fixup error handling in blkdev_get()
    - Input: usbtouchscreen - initialize PM mutex before using it
    - Input: elantech - enable SMBus on new (2018+) systems
    - Input: synaptics - enable RMI mode for HP Spectre X360
    - coresight: Fix DEBUG_LOCKS_WARN_ON for uninitialized attribute
    - perf annotate: Fix s390 gap between kernel end and module start
    - perf db-export: Fix thread__exec_comm()
    - perf record: Fix module size on s390
    - x86/purgatory: Do not use __builtin_memcpy and __builtin_memset
    - x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS
    - genirq/affinity: Create affinity mask for single vector
    - gfs2: gfs2_walk_metadata fix
    - usb: host: xhci-rcar: Fix timeout in xhci_suspend()
    - usb: yurex: Fix use-after-free in yurex_delete
    - usb: typec: ucsi: ccg: Fix uninitilized symbol error
    - usb: typec: tcpm: free log buf memory when remove debug file
    - usb: typec: tcpm: remove tcpm dir if no children
    - usb: typec: tcpm: Add NULL check before dereferencing config
    - usb: typec: tcpm: Ignore unsupported/unknown alternate mode requests
    - can: rcar_canfd: fix possible IRQ storm on high load
    - can: flexcan: fix stop mode acknowledgment
    - can: flexcan: fix an use-after-free in flexcan_setup...

Changed in linux (Ubuntu Eoan):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Disco):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-disco' to 'verification-done-disco'. If the problem still exists, change the tag 'verification-needed-disco' to 'verification-failed-disco'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-disco
Revision history for this message
Kieran Bingham (kieranbingham) wrote :

confirmed the 5.0.0-28-generic kernel from proposed works and provides VIMC functionality.
Thanks

tags: added: verification-done-disco
removed: verification-needed-disco
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-bionic
Revision history for this message
Kieran Bingham (kieranbingham) wrote :

If I'm expected to test this on Bionic, how do I do that using EnableProposed on my Disco release?

Or can someone point me to the relevant kernel debs to manually install and test please?

Revision history for this message
Kieran Bingham (kieranbingham) wrote :

Tested on bionic proposed kernel by manually installing the dpkgs.

modprobe vim2m
modprobe vivid
modprobe vimc

kbingham@Q:$ uname -a
Linux Q 4.15.0-63-generic #72-Ubuntu SMP Fri Sep 6 10:12:25 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

kbingham@Q:$ lsv4l2
video0: HP Wide Vision FHD Camera: HP W
video1: HP Wide Vision FHD Camera: HP I
video2: Raw Capture 0
video3: Raw Capture 1
video4: RGB/YUV Capture
video5: vivid-000-vid-cap
video6: vivid-000-vid-out
video7: vim2m

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (20.2 KiB)

This bug was fixed in the package linux - 4.15.0-65.74

---------------
linux (4.15.0-65.74) bionic; urgency=medium

  * bionic/linux: 4.15.0-65.74 -proposed tracker (LP: #1844403)

  * arm64: large modules fail to load (LP: #1841109)
    - arm64/kernel: kaslr: reduce module randomization range to 4 GB
    - arm64/kernel: don't ban ADRP to work around Cortex-A53 erratum #843419
    - arm64: fix undefined reference to 'printk'
    - arm64/kernel: rename module_emit_adrp_veneer->module_emit_veneer_for_adrp
    - [config] Remove CONFIG_ARM64_MODULE_CMODEL_LARGE

  * CVE-2018-20976
    - xfs: clear sb->s_fs_info on mount failure

  * br_netfilter: namespace sysctl operations (LP: #1836910)
    - net: bridge: add bitfield for options and convert vlan opts
    - net: bridge: convert nf call options to bits
    - netfilter: bridge: port sysctls to use brnf_net
    - netfilter: bridge: namespace bridge netfilter sysctls
    - netfilter: bridge: prevent UAF in brnf_exit_net()

  * tuntap: correctly set SOCKWQ_ASYNC_NOSPACE (LP: #1830756)
    - tuntap: correctly set SOCKWQ_ASYNC_NOSPACE

  * Bionic update: upstream stable patchset 2019-08-30 (LP: #1842114)
    - HID: Add 044f:b320 ThrustMaster, Inc. 2 in 1 DT
    - MIPS: kernel: only use i8253 clocksource with periodic clockevent
    - mips: fix cacheinfo
    - netfilter: ebtables: fix a memory leak bug in compat
    - ASoC: dapm: Fix handling of custom_stop_condition on DAPM graph walks
    - bonding: Force slave speed check after link state recovery for 802.3ad
    - can: dev: call netif_carrier_off() in register_candev()
    - ASoC: Fail card instantiation if DAI format setup fails
    - st21nfca_connectivity_event_received: null check the allocation
    - st_nci_hci_connectivity_event_received: null check the allocation
    - ASoC: ti: davinci-mcasp: Correct slot_width posed constraint
    - net: usb: qmi_wwan: Add the BroadMobi BM818 card
    - qed: RDMA - Fix the hw_ver returned in device attributes
    - isdn: mISDN: hfcsusb: Fix possible null-pointer dereferences in
      start_isoc_chain()
    - netfilter: ipset: Fix rename concurrency with listing
    - isdn: hfcsusb: Fix mISDN driver crash caused by transfer buffer on the stack
    - perf bench numa: Fix cpu0 binding
    - can: sja1000: force the string buffer NULL-terminated
    - can: peak_usb: force the string buffer NULL-terminated
    - net/ethernet/qlogic/qed: force the string buffer NULL-terminated
    - NFSv4: Fix a potential sleep while atomic in nfs4_do_reclaim()
    - HID: input: fix a4tech horizontal wheel custom usage
    - SMB3: Kernel oops mounting a encryptData share with CONFIG_DEBUG_VIRTUAL
    - net: cxgb3_main: Fix a resource leak in a error path in 'init_one()'
    - net: hisilicon: make hip04_tx_reclaim non-reentrant
    - net: hisilicon: fix hip04-xmit never return TX_BUSY
    - net: hisilicon: Fix dma_map_single failed on arm64
    - libata: have ata_scsi_rw_xlat() fail invalid passthrough requests
    - libata: add SG safety checks in SFF pio transfers
    - x86/lib/cpu: Address missing prototypes warning
    - drm/vmwgfx: fix memory leak when too many retries have occurred
    - perf ftrace: Fix failure to set cpuma...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (126.4 KiB)

This bug was fixed in the package linux - 5.0.0-31.33

---------------
linux (5.0.0-31.33) disco; urgency=medium

  * disco/linux: 5.0.0-31.33 -proposed tracker (LP: #1846026)

  * Packaging resync (LP: #1786013)
    - [Packaging] update helper scripts

  * /proc/self/maps paths missing on live session (was vlc won't start; eoan
    19.10 & bionic 18.04 ubuntu/lubuntu/kubuntu/xubuntu/ubuntu-mate dailies)
    (LP: #1842382)
    - SAUCE: Revert "UBUNTU: SAUCE: shiftfs: enable overlayfs on shiftfs"

linux (5.0.0-30.32) disco; urgency=medium

  * disco/linux: 5.0.0-30.32 -proposed tracker (LP: #1844362)

  * Disco update: upstream stable patchset 2019-08-20 (LP: #1840846)
    - Revert "e1000e: fix cyclic resets at link up with active tx"
    - e1000e: start network tx queue only when link is up
    - Input: synaptics - enable SMBUS on T480 thinkpad trackpad
    - nilfs2: do not use unexported cpu_to_le32()/le32_to_cpu() in uapi header
    - drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT
    - firmware: improve LSM/IMA security behaviour
    - irqchip/gic-v3-its: Fix command queue pointer comparison bug
    - clk: ti: clkctrl: Fix returning uninitialized data
    - efi/bgrt: Drop BGRT status field reserved bits check
    - perf/core: Fix perf_sample_regs_user() mm check
    - ARM: dts: gemini Fix up DNS-313 compatible string
    - ARM: omap2: remove incorrect __init annotation
    - afs: Fix uninitialised spinlock afs_volume::cb_break_lock
    - x86/apic: Fix integer overflow on 10 bit left shift of cpu_khz
    - be2net: fix link failure after ethtool offline test
    - ppp: mppe: Add softdep to arc4
    - sis900: fix TX completion
    - ARM: dts: imx6ul: fix PWM[1-4] interrupts
    - pinctrl: mcp23s08: Fix add_data and irqchip_add_nested call order
    - dm table: don't copy from a NULL pointer in realloc_argv()
    - dm verity: use message limit for data block corruption message
    - x86/boot/64: Fix crash if kernel image crosses page table boundary
    - x86/boot/64: Add missing fixup_pointer() for next_early_pgt access
    - HID: chicony: add another quirk for PixArt mouse
    - pinctrl: mediatek: Ignore interrupts that are wake only during resume
    - cpu/hotplug: Fix out-of-bounds read when setting fail state
    - pinctrl: mediatek: Update cur_mask in mask/mask ops
    - linux/kernel.h: fix overflow for DIV_ROUND_UP_ULL
    - genirq: Delay deactivation in free_irq()
    - genirq: Fix misleading synchronize_irq() documentation
    - genirq: Add optional hardware synchronization for shutdown
    - x86/ioapic: Implement irq_get_irqchip_state() callback
    - x86/irq: Handle spurious interrupt after shutdown gracefully
    - x86/irq: Seperate unused system vectors from spurious entry again
    - ARC: hide unused function unw_hdr_alloc
    - s390: fix stfle zero padding
    - s390/qdio: (re-)initialize tiqdio list entries
    - s390/qdio: don't touch the dsci in tiqdio_add_input_queues()
    - crypto: talitos - move struct talitos_edesc into talitos.h
    - crypto: talitos - fix hash on SEC1.
    - crypto/NX: Set receive window credits to max number of CRBs in RxFIFO
    - drm/udl: introduce a macro to convert dev t...

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

Other bug subscribers