[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-05-26 Thread Kleber Sacilotto de Souza
** Changed in: linux (Ubuntu Jammy)
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  Invalid
Status in linux source package in Jammy:
  Fix Committed

Bug description:
  [SRU Justfication]

  [Impact]

  Several UBSAN warnings captured on Intel IPU6 camera equipped platforms
  running 5.15+ kernels.

  [Fix]

  Upstream fix commit 8dcb7d8df28f ("media: pci: intel: Avoid UBSAN
  warnings of index bound and shift").

  [Test Case]

  Boot Intel IPU6 camera equipped platforms and check dmesg.

  [Where problems could occur]

  This patch turns a few return statements to error to stop further
  processing that may fall in UBSAN warnings. No other side effect.

  [Other Info]

  While plan for -generic and oem-5.17 is still under discuss, only Jammy
  is nominated for linux-oem-5.14/focal migration (to hwe-5.15).

  This depends on the pull request titled "Support Intel IPU6 MIPI camera
  on Alder Lake platforms" for bug 1955383 for Jammy.

  == original bug report ==

  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [intel_ipu6_psys]
  [   52.050874]

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-05-25 Thread You-Sheng Yang
SRU v7: https://lists.ubuntu.com/archives/kernel-
team/2022-May/130591.html (jammy)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  Invalid
Status in linux source package in Jammy:
  In Progress

Bug description:
  [SRU Justfication]

  [Impact]

  Several UBSAN warnings captured on Intel IPU6 camera equipped platforms
  running 5.15+ kernels.

  [Fix]

  Upstream fix commit 8dcb7d8df28f ("media: pci: intel: Avoid UBSAN
  warnings of index bound and shift").

  [Test Case]

  Boot Intel IPU6 camera equipped platforms and check dmesg.

  [Where problems could occur]

  This patch turns a few return statements to error to stop further
  processing that may fall in UBSAN warnings. No other side effect.

  [Other Info]

  While plan for -generic and oem-5.17 is still under discuss, only Jammy
  is nominated for linux-oem-5.14/focal migration (to hwe-5.15).

  This depends on the pull request titled "Support Intel IPU6 MIPI camera
  on Alder Lake platforms" for bug 1955383 for Jammy.

  == original bug report ==

  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [intel_ipu6_psys]
  [   52.05087

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-05-23 Thread You-Sheng Yang
SRU v6: https://lists.ubuntu.com/archives/kernel-
team/2022-May/130562.html (jammy)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  Invalid
Status in linux source package in Jammy:
  In Progress

Bug description:
  [SRU Justfication]

  [Impact]

  Several UBSAN warnings captured on Intel IPU6 camera equipped platforms
  running 5.15+ kernels.

  [Fix]

  Upstream fix commit 8dcb7d8df28f ("media: pci: intel: Avoid UBSAN
  warnings of index bound and shift").

  [Test Case]

  Boot Intel IPU6 camera equipped platforms and check dmesg.

  [Where problems could occur]

  This patch turns a few return statements to error to stop further
  processing that may fall in UBSAN warnings. No other side effect.

  [Other Info]

  While plan for -generic and oem-5.17 is still under discuss, only Jammy
  is nominated for linux-oem-5.14/focal migration (to hwe-5.15).

  This depends on the pull request titled "Support Intel IPU6 MIPI camera
  on Alder Lake platforms" for bug 1955383 for Jammy.

  == original bug report ==

  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [intel_ipu6_psys]
  [   52.05087

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-05-22 Thread You-Sheng Yang
Was reverted in 5.15.0-29.30.

** Changed in: linux (Ubuntu Jammy)
   Status: Fix Committed => In Progress

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  Invalid
Status in linux source package in Jammy:
  In Progress

Bug description:
  [SRU Justfication]

  [Impact]

  Several UBSAN warnings captured on Intel IPU6 camera equipped platforms
  running 5.15+ kernels.

  [Fix]

  Upstream fix commit 8dcb7d8df28f ("media: pci: intel: Avoid UBSAN
  warnings of index bound and shift").

  [Test Case]

  Boot Intel IPU6 camera equipped platforms and check dmesg.

  [Where problems could occur]

  This patch turns a few return statements to error to stop further
  processing that may fall in UBSAN warnings. No other side effect.

  [Other Info]

  While plan for -generic and oem-5.17 is still under discuss, only Jammy
  is nominated for linux-oem-5.14/focal migration (to hwe-5.15).

  This depends on the pull request titled "Support Intel IPU6 MIPI camera
  on Alder Lake platforms" for bug 1955383 for Jammy.

  == original bug report ==

  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [inte

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-05-15 Thread You-Sheng Yang
Verified by rebasing reverted commits to them.

** Changed in: linux (Ubuntu)
   Status: In Progress => Invalid

** Changed in: linux (Ubuntu Jammy)
 Assignee: (unassigned) => You-Sheng Yang (vicamo)

** Tags removed: verification-needed-focal verification-needed-jammy
** Tags added: verification-done-focal verification-done-jammy

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  Invalid
Status in linux source package in Jammy:
  Fix Committed

Bug description:
  [SRU Justfication]

  [Impact]

  Several UBSAN warnings captured on Intel IPU6 camera equipped platforms
  running 5.15+ kernels.

  [Fix]

  Upstream fix commit 8dcb7d8df28f ("media: pci: intel: Avoid UBSAN
  warnings of index bound and shift").

  [Test Case]

  Boot Intel IPU6 camera equipped platforms and check dmesg.

  [Where problems could occur]

  This patch turns a few return statements to error to stop further
  processing that may fall in UBSAN warnings. No other side effect.

  [Other Info]

  While plan for -generic and oem-5.17 is still under discuss, only Jammy
  is nominated for linux-oem-5.14/focal migration (to hwe-5.15).

  This depends on the pull request titled "Support Intel IPU6 MIPI camera
  on Alder Lake platforms" for bug 1955383 for Jammy.

  == original bug report ==

  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-05-13 Thread Ubuntu Kernel Bot
This bug is awaiting verification that the linux-
hwe-5.15/5.15.0-32.33~20.04.1 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-focal' to
'verification-done-focal'. If the problem still exists, change the tag
'verification-needed-focal' to 'verification-failed-focal'.

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-focal

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Jammy:
  Fix Committed

Bug description:
  [SRU Justfication]

  [Impact]

  Several UBSAN warnings captured on Intel IPU6 camera equipped platforms
  running 5.15+ kernels.

  [Fix]

  Upstream fix commit 8dcb7d8df28f ("media: pci: intel: Avoid UBSAN
  warnings of index bound and shift").

  [Test Case]

  Boot Intel IPU6 camera equipped platforms and check dmesg.

  [Where problems could occur]

  This patch turns a few return statements to error to stop further
  processing that may fall in UBSAN warnings. No other side effect.

  [Other Info]

  While plan for -generic and oem-5.17 is still under discuss, only Jammy
  is nominated for linux-oem-5.14/focal migration (to hwe-5.15).

  This depends on the pull request titled "Support Intel IPU6 MIPI camera
  on Alder Lake platforms" for bug 1955383 for Jammy.

  == original bug report ==

  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubs

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-04-28 Thread Ubuntu Kernel Bot
This bug is awaiting verification that the linux/5.15.0-28.29 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-jammy' to 'verification-done-jammy'. If the problem
still exists, change the tag 'verification-needed-jammy' to
'verification-failed-jammy'.

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-jammy

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Jammy:
  Fix Committed

Bug description:
  [SRU Justfication]

  [Impact]

  Several UBSAN warnings captured on Intel IPU6 camera equipped platforms
  running 5.15+ kernels.

  [Fix]

  Upstream fix commit 8dcb7d8df28f ("media: pci: intel: Avoid UBSAN
  warnings of index bound and shift").

  [Test Case]

  Boot Intel IPU6 camera equipped platforms and check dmesg.

  [Where problems could occur]

  This patch turns a few return statements to error to stop further
  processing that may fall in UBSAN warnings. No other side effect.

  [Other Info]

  While plan for -generic and oem-5.17 is still under discuss, only Jammy
  is nominated for linux-oem-5.14/focal migration (to hwe-5.15).

  This depends on the pull request titled "Support Intel IPU6 MIPI camera
  on Alder Lake platforms" for bug 1955383 for Jammy.

  == original bug report ==

  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_b

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-04-27 Thread Stefan Bader
** Also affects: linux (Ubuntu Jammy)
   Importance: Undecided
   Status: New

** Changed in: linux (Ubuntu Jammy)
   Importance: Undecided => Medium

** Changed in: linux (Ubuntu Jammy)
   Status: New => Fix Committed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Jammy:
  Fix Committed

Bug description:
  [SRU Justfication]

  [Impact]

  Several UBSAN warnings captured on Intel IPU6 camera equipped platforms
  running 5.15+ kernels.

  [Fix]

  Upstream fix commit 8dcb7d8df28f ("media: pci: intel: Avoid UBSAN
  warnings of index bound and shift").

  [Test Case]

  Boot Intel IPU6 camera equipped platforms and check dmesg.

  [Where problems could occur]

  This patch turns a few return statements to error to stop further
  processing that may fall in UBSAN warnings. No other side effect.

  [Other Info]

  While plan for -generic and oem-5.17 is still under discuss, only Jammy
  is nominated for linux-oem-5.14/focal migration (to hwe-5.15).

  This depends on the pull request titled "Support Intel IPU6 MIPI camera
  on Alder Lake platforms" for bug 1955383 for Jammy.

  == original bug report ==

  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x13

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-04-08 Thread You-Sheng Yang
SRU: https://lists.ubuntu.com/archives/kernel-
team/2022-April/129330.html (jammy)

** Description changed:

+ [SRU Justfication]
+ 
+ [Impact]
+ 
+ Several UBSAN warnings captured on Intel IPU6 camera equipped platforms
+ running 5.15+ kernels.
+ 
+ [Fix]
+ 
+ Upstream fix commit 8dcb7d8df28f ("media: pci: intel: Avoid UBSAN
+ warnings of index bound and shift").
+ 
+ [Test Case]
+ 
+ Boot Intel IPU6 camera equipped platforms and check dmesg.
+ 
+ [Where problems could occur]
+ 
+ This patch turns a few return statements to error to stop further
+ processing that may fall in UBSAN warnings. No other side effect.
+ 
+ [Other Info]
+ 
+ While plan for -generic and oem-5.17 is still under discuss, only Jammy
+ is nominated for linux-oem-5.14/focal migration (to hwe-5.15).
+ 
+ This depends on the pull request titled "Support Intel IPU6 MIPI camera
+ on Alder Lake platforms" for bug 1955383 for Jammy.
+ 
+ == original bug report ==
+ 
  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so these
  are found with intel_iommu=off.
  
  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 

  
  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [intel_ipu6_psys]
  [   52.050874]  kthread+0x127/0x150
  [   52.050884]  ? set_kthread_struct+0x40/0x40
  [   52.050893]  ret_from_fork+0x1f/0x30
  [   52.050911]  
  [   52.050914] 

  
  [   52.050924] 
=

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-04-06 Thread You-Sheng Yang
Upstream fix in
https://github.com/intel/ipu6-drivers/commit/8dcb7d8df28fd311a72f3d996b02231e38aac8a7

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [intel_ipu6_psys]
  [   52.050874]  kthread+0x127/0x150
  [   52.050884]  ? set_kthread_struct+0x40/0x40
  [   52.050893]  ret_from_fork+0x1f/0x30
  [   52.050911]  
  [   52.050914] 


  [   52.050924] 

  [   52.050926] UBSAN: shift-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:652:15
  [   52.050932] shift exponent 34 is too large for 32-bit type 'unsigned int'
  [   52.050938] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050944] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050947] Call Trace:
  [   52.050949]  
  [   52.050951]  dump_stack_lvl+0x4a/0x5f
  [   52.05096

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-01-14 Thread You-Sheng Yang
[ 52.051195] UBSAN: shift-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:654:19
[ 52.051199] shift exponent 34 is too large for 32-bit type 'unsigned int'

https://git.launchpad.net/~vicamo/+git/ubuntu-
kernel/tree/drivers/media/pci/intel/ipu6/ipu-
resources.c?id=1648371a4229949b4ded06a6387332dd5008540d#n654

649 idx = alloc->resources - 1;
650 p = alloc->resource_alloc[idx].pos;
651 bmp = pm.dfm_port_bitmap[id];
652 bmp = bmp << p;
653 a_bmp = pm.dfm_active_port_bitmap[id];
654 a_bmp = a_bmp << p;

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [intel_ipu6_psys]
  [   52.050874]  kthread+0x127/0x150
  [   52.050884]  ? set_kthread_struct+0x40/0x40
  [   52.050893]  ret_from_fork+0x1f/0x30
  [   52.050911]  
  [   52.050914] 


  [   52.050924] 

  [   52.050926] UBSAN: shift-out-of-bounds in 
/tmp/kernel-vicamo-8

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-01-14 Thread You-Sheng Yang
[ 52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
[ 52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'

https://git.launchpad.net/~vicamo/+git/ubuntu-
kernel/tree/drivers/media/pci/intel/ipu6/ipu-
resources.c?id=1648371a4229949b4ded06a6387332dd5008540d#n633

632 idx = alloc->resources - 1;
633 p = alloc->resource_alloc[idx].pos;


** CVE added: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-1094

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [intel_ipu6_psys]
  [   52.050874]  kthread+0x127/0x150
  [   52.050884]  ? set_kthread_struct+0x40/0x40
  [   52.050893]  ret_from_fork+0x1f/0x30
  [   52.050911]  
  [   52.050914] 


  [   52.050924] 

  [   52.050926] UBSAN: shift-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/in

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-01-14 Thread You-Sheng Yang
[ 52.050926] UBSAN: shift-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:652:15
[ 52.050932] shift exponent 34 is too large for 32-bit type 'unsigned int'

https://git.launchpad.net/~vicamo/+git/ubuntu-
kernel/tree/drivers/media/pci/intel/ipu6/ipu-
resources.c?h=CVE-2018-1094/for-
trusty&id=1648371a4229949b4ded06a6387332dd5008540d#n652

649 idx = alloc->resources - 1;
650 p = alloc->resource_alloc[idx].pos;
651 bmp = pm.dfm_port_bitmap[id];
652 bmp = bmp << p;

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [intel_ipu6_psys]
  [   52.050874]  kthread+0x127/0x150
  [   52.050884]  ? set_kthread_struct+0x40/0x40
  [   52.050893]  ret_from_fork+0x1f/0x30
  [   52.050911]  
  [   52.050914] 


  [   52.050924] 

  [   52.050926] UBSAN: shift-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pc

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-01-14 Thread You-Sheng Yang
[ 51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
[ 51.469494] load of value 2 is not a valid value for type '_Bool'

https://git.launchpad.net/~vicamo/+git/ubuntu-
kernel/tree/drivers/media/pci/intel/ipu-
psys.c?id=1648371a4229949b4ded06a6387332dd5008540d#n648

 571 int ipu_psys_mapbuf_locked(int fd, struct ipu_psys_fh *fh, 
  
 572struct ipu_psys_kbuffer *kbuf)  
  
 573 {
...
 648 ret = dma_buf_vmap(kbuf->dbuf, &dmap); 
  
 649 if (ret) { 
  
 650 dev_dbg(&psys->adev->dev, "dma buf vmap failed\n");
  
 651 goto kbuf_map_fail;
  
 652 }

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [intel_ipu6_psys]
  [   52.050874]  kthread+0x127/0x150
  [   52.050884]  ? set_kthread_struct+0x40/0x40
  [   52.0

[Kernel-packages] [Bug 1958006] Re: multiple UBSAN warnings in Intel IPU6 camera driver at boot

2022-01-14 Thread You-Sheng Yang
PPA for testing:
https://launchpad.net/~vicamo/+archive/ubuntu/ppa-1955383

Prebuilt kernel tree used:
https://git.launchpad.net/~vicamo/+git/ubuntu-
kernel/commit/?id=1648371a4229949b4ded06a6387332dd5008540d

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1958006

Title:
  multiple UBSAN warnings in Intel IPU6 camera driver at boot

Status in linux package in Ubuntu:
  New

Bug description:
  UBSAN is turned on by default in Ubuntu 5.15 kernel. While Intel IPU6
  driver is still suffering from bug 1958004, intel_iommu issue, so
  these are found with intel_iommu=off.

  [   51.469485] 

  [   51.469490] UBSAN: invalid-load in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/include/linux/dma-buf-map.h:224:9
  [   51.469494] load of value 2 is not a valid value for type '_Bool'
  [   51.469497] CPU: 8 PID: 1315 Comm: camerasrc0:src Tainted: G   O   
   5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   51.469500] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   51.469501] Call Trace:
  [   51.469504]  
  [   51.469508]  dump_stack_lvl+0x4a/0x5f
  [   51.469516]  dump_stack+0x10/0x12
  [   51.469519]  ubsan_epilogue+0x9/0x45
  [   51.469523]  __ubsan_handle_load_invalid_value.cold+0x44/0x49
  [   51.469530]  dma_buf_vmap.cold+0x38/0x3d
  [   51.469537]  ipu_psys_mapbuf_locked+0x178/0x450 [intel_ipu6_psys]
  [   51.469545]  ipu_psys_ioctl+0x148/0x4f0 [intel_ipu6_psys]
  [   51.469550]  ? __fget_files+0xa7/0xd0
  [   51.469556]  __x64_sys_ioctl+0x91/0xc0
  [   51.469560]  do_syscall_64+0x59/0xc0
  [   51.469564]  ? do_user_addr_fault+0x1dc/0x650
  [   51.469567]  ? irqentry_exit_to_user_mode+0x9/0x20
  [   51.469570]  ? irqentry_exit+0x19/0x30
  [   51.469573]  ? exc_page_fault+0x89/0x160
  [   51.469576]  ? asm_exc_page_fault+0x8/0x30
  [   51.469581]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [   51.469585] RIP: 0033:0x7fa5e047250b
  [   51.469588] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 
c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
  [   51.469589] RSP: 002b:7fa5debfa298 EFLAGS: 0246 ORIG_RAX: 
0010
  [   51.469592] RAX: ffda RBX: 7fa5d0004000 RCX: 
7fa5e047250b
  [   51.469593] RDX: 001f RSI: c0044102 RDI: 
001e
  [   51.469595] RBP: 7fa5d4a371e0 R08:  R09: 
007c
  [   51.469596] R10: 7fa5debfa120 R11: 0246 R12: 

  [   51.469597] R13: 7fa5d4a31bc0 R14: 7fa5debfa36c R15: 
7fa5debfa430
  [   51.469598]  
  [   51.469599] 


  [   52.050608] 

  [   52.050620] UBSAN: array-index-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:633:30
  [   52.050631] index -1 is out of range for type 'ipu_resource_alloc [128]'
  [   52.050637] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050647] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [   52.050651] Call Trace:
  [   52.050656]  
  [   52.050664]  dump_stack_lvl+0x4a/0x5f
  [   52.050692]  dump_stack+0x10/0x12
  [   52.050703]  ubsan_epilogue+0x9/0x45
  [   52.050716]  __ubsan_handle_out_of_bounds.cold+0x44/0x49
  [   52.050731]  ipu_psys_allocate_resources+0x4de/0x670 [intel_ipu6_psys]
  [   52.050761]  ipu_psys_ppg_start+0xff/0x250 [intel_ipu6_psys]
  [   52.050781]  ? ipu_psys_scheduler_ppg_start+0x1b6/0x510 [intel_ipu6_psys]
  [   52.050801]  ipu_psys_scheduler_ppg_start+0x429/0x510 [intel_ipu6_psys]
  [   52.050819]  ipu_psys_run_next+0x1c4/0x7c0 [intel_ipu6_psys]
  [   52.050836]  ipu_psys_sched_cmd+0x6d/0x130 [intel_ipu6_psys]
  [   52.050850]  ? __wake_up_pollfree+0x40/0x40
  [   52.050859]  ? psys_isr_threaded+0xc0/0xc0 [intel_ipu6_psys]
  [   52.050874]  kthread+0x127/0x150
  [   52.050884]  ? set_kthread_struct+0x40/0x40
  [   52.050893]  ret_from_fork+0x1f/0x30
  [   52.050911]  
  [   52.050914] 


  [   52.050924] 

  [   52.050926] UBSAN: shift-out-of-bounds in 
/tmp/kernel-vicamo-8789bd62d725-b752/build/drivers/media/pci/intel/ipu6/ipu-resources.c:652:15
  [   52.050932] shift exponent 34 is too large for 32-bit type 'unsigned int'
  [   52.050938] CPU: 8 PID: 803 Comm: psys_sched_cmd Tainted: G   O
  5.15.0-2017-generic #17~20.04.1+lp1955383.2
  [   52.050944] Hardware name: Dell Inc. XPS 9320/, BIOS 0.2.7 12/02/2021
  [