Greeting,
FYI, we noticed the following commit (built with gcc-9):
commit: 461021875c5057b3a408db0aa91b15119064ffa8 ("swiotlb: Add restricted DMA pool initialization")
https://git.kernel.org/cgit/linux/kernel/git/konrad/swiotlb.git devel/for-linus-5.14
in testcase: boot
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>
[ 157.633812][ T1] BUG: kernel NULL pointer dereference, address: 00000046
[ 157.636589][ T1] #PF: supervisor read access in kernel mode
[ 157.637641][ T1] #PF: error_code(0x0000) - not-present page
[ 157.637641][ T1] *pde = 00000000
[ 157.643000][ T1] Oops: 0000 [#1] SMP
[ 157.643000][ T1] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 5.12.0-rc3-00029-g461021875c50 #1
[ 157.643000][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[ 157.650987][ T1] EIP: __dma_direct_alloc_pages+0xee/0x280
[ 157.650987][ T1] Code: d2 f6 c1 20 0f 94 c0 0f 95 c2 d3 e0 d3 e2 83 c0 ff 83 d2 ff 39 f0 89 d0 19 f8 0f 92 c0 0f b6 c0 8d 44 40 01 8b 93 c0 02 00 00 <80> 7a 46 00 74 6c 8b 7d ec 89 d8 89 fa e8 c0 34 00 00 89 c6 85 c0
[ 157.658987][ T1] EAX: 00000004 EBX: c2713884 ECX: 00000018 EDX: 00000000
[ 157.658987][ T1] ESI: ffffffff EDI: 00000000 EBP: c1c43d2c ESP: c1c43d10
[ 157.658987][ T1] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010297
[ 157.666985][ T1] CR0: 80050033 CR2: 00000046 CR3: 1b1da000 CR4: 000406d0
[ 157.666985][ T1] Call Trace:
[ 157.666985][ T1] dma_direct_alloc+0x50/0x180
[ 157.674977][ T1] dma_alloc_attrs+0x69/0xc0
[ 157.674977][ T1] ide_allocate_dma_engine+0x55/0x80
[ 157.674977][ T1] ide_hwif_setup_dma.cold+0x36/0x60
[ 157.682988][ T1] ide_host_register+0x147/0x532
[ 157.682988][ T1] ide_pci_init_two.cold+0x719/0x799
[ 157.682988][ T1] ? _raw_spin_unlock+0x1d/0x40
[ 157.682988][ T1] ? klist_put+0x41/0x80
[ 157.682988][ T1] ? pci_do_find_bus+0x60/0x60
[ 157.682988][ T1] ? klist_iter_exit+0x14/0x20
[ 157.682988][ T1] ? bus_find_device+0x80/0xc0
[ 157.682988][ T1] ? put_device+0x11/0x20
[ 157.682988][ T1] ? pci_dev_put+0x16/0x40
[ 157.682988][ T1] ? pci_get_dev_by_id+0x42/0x60
[ 157.682988][ T1] ? pci_get_device+0x4f/0x80
[ 157.682988][ T1] ide_pci_init_one+0x12/0x20
[ 157.682988][ T1] piix_init_one+0x1b/0x20
[ 157.682988][ T1] ide_scan_pcibus+0x5c/0xd2
[ 157.682988][ T1] ? generic_ide_init+0x1b/0x1b
[ 157.682988][ T1] do_one_initcall+0x60/0x320
[ 157.682988][ T1] ? rcu_read_lock_sched_held+0x47/0x80
[ 157.682988][ T1] ? trace_initcall_level+0x84/0xac
[ 157.682988][ T1] kernel_init_freeable+0x212/0x261
[ 157.682988][ T1] ? rest_init+0x22d/0x22d
[ 157.682988][ T1] kernel_init+0xd/0xf3
[ 157.682988][ T1] ret_from_fork+0x1c/0x28
[ 157.682988][ T1] Modules linked in:
[ 157.682988][ T1] CR2: 0000000000000046
[ 157.682988][ T1] ---[ end trace a57246a3e68835a8 ]---
[ 157.682988][ T1] EIP: __dma_direct_alloc_pages+0xee/0x280
[ 157.682988][ T1] Code: d2 f6 c1 20 0f 94 c0 0f 95 c2 d3 e0 d3 e2 83 c0 ff 83 d2 ff 39 f0 89 d0 19 f8 0f 92 c0 0f b6 c0 8d 44 40 01 8b 93 c0 02 00 00 <80> 7a 46 00 74 6c 8b 7d ec 89 d8 89 fa e8 c0 34 00 00 89 c6 85 c0
[ 157.682988][ T1] EAX: 00000004 EBX: c2713884 ECX: 00000018 EDX: 00000000
[ 157.682988][ T1] ESI: ffffffff EDI: 00000000 EBP: c1c43d2c ESP: c1c43d10
[ 157.682988][ T1] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010297
[ 157.682988][ T1] CR0: 80050033 CR2: 00000046 CR3: 1b1da000 CR4: 000406d0
[ 157.682988][ T1] Kernel panic - not syncing: Fatal exception
[ 157.682988][ T1] Kernel Offset: disabled
To reproduce:
# build kernel
cd linux
cp config-5.12.0-rc3-00029-g461021875c50 .config
make HOSTCC=gcc-9 CC=gcc-9 ARCH=i386 olddefconfig prepare modules_prepare bzImage
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email
---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation
Thanks,
Oliver Sang
On Wed, Sep 08, 2021 at 04:52:39PM +0800, kernel test robot wrote:
> FYI, we noticed the following commit (built with gcc-9):
>
> commit: 461021875c5057b3a408db0aa91b15119064ffa8 ("swiotlb: Add restricted DMA pool initialization")
> https://git.kernel.org/cgit/linux/kernel/git/konrad/swiotlb.git devel/for-linus-5.14
>
>
> in testcase: boot
>
> on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
>
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>
>
>
> If you fix the issue, kindly add following tag
> Reported-by: kernel test robot <[email protected]>
>
>
> [ 157.633812][ T1] BUG: kernel NULL pointer dereference, address: 00000046
> [ 157.636589][ T1] #PF: supervisor read access in kernel mode
> [ 157.637641][ T1] #PF: error_code(0x0000) - not-present page
> [ 157.637641][ T1] *pde = 00000000
> [ 157.643000][ T1] Oops: 0000 [#1] SMP
> [ 157.643000][ T1] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 5.12.0-rc3-00029-g461021875c50 #1
> [ 157.643000][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
> [ 157.650987][ T1] EIP: __dma_direct_alloc_pages+0xee/0x280
> [ 157.650987][ T1] Code: d2 f6 c1 20 0f 94 c0 0f 95 c2 d3 e0 d3 e2 83 c0 ff 83 d2 ff 39 f0 89 d0 19 f8 0f 92 c0 0f b6 c0 8d 44 40 01 8b 93 c0 02 00 00 <80> 7a 46 00 74 6c 8b 7d ec 89 d8 89 fa e8 c0 34 00 00 89 c6 85 c0
> [ 157.658987][ T1] EAX: 00000004 EBX: c2713884 ECX: 00000018 EDX: 00000000
> [ 157.658987][ T1] ESI: ffffffff EDI: 00000000 EBP: c1c43d2c ESP: c1c43d10
> [ 157.658987][ T1] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010297
> [ 157.666985][ T1] CR0: 80050033 CR2: 00000046 CR3: 1b1da000 CR4: 000406d0
> [ 157.666985][ T1] Call Trace:
> [ 157.666985][ T1] dma_direct_alloc+0x50/0x180
> [ 157.674977][ T1] dma_alloc_attrs+0x69/0xc0
> [ 157.674977][ T1] ide_allocate_dma_engine+0x55/0x80
This IDE code doesn't exist upstream any more. See b7fb14d3ac63 ("ide: remove
the legacy ide driver").
Will
On Thu, Sep 09, 2021 at 04:04:29PM +0100, Will Deacon wrote:
> On Wed, Sep 08, 2021 at 04:52:39PM +0800, kernel test robot wrote:
> > FYI, we noticed the following commit (built with gcc-9):
> >
> > commit: 461021875c5057b3a408db0aa91b15119064ffa8 ("swiotlb: Add restricted DMA pool initialization")
> > https://git.kernel.org/cgit/linux/kernel/git/konrad/swiotlb.git devel/for-linus-5.14
> >
> >
> > in testcase: boot
> >
> > on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
> >
> > caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
> >
> >
> >
> > If you fix the issue, kindly add following tag
> > Reported-by: kernel test robot <[email protected]>
> >
> >
> > [ 157.633812][ T1] BUG: kernel NULL pointer dereference, address: 00000046
> > [ 157.636589][ T1] #PF: supervisor read access in kernel mode
> > [ 157.637641][ T1] #PF: error_code(0x0000) - not-present page
> > [ 157.637641][ T1] *pde = 00000000
> > [ 157.643000][ T1] Oops: 0000 [#1] SMP
> > [ 157.643000][ T1] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 5.12.0-rc3-00029-g461021875c50 #1
> > [ 157.643000][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
> > [ 157.650987][ T1] EIP: __dma_direct_alloc_pages+0xee/0x280
> > [ 157.650987][ T1] Code: d2 f6 c1 20 0f 94 c0 0f 95 c2 d3 e0 d3 e2 83 c0 ff 83 d2 ff 39 f0 89 d0 19 f8 0f 92 c0 0f b6 c0 8d 44 40 01 8b 93 c0 02 00 00 <80> 7a 46 00 74 6c 8b 7d ec 89 d8 89 fa e8 c0 34 00 00 89 c6 85 c0
> > [ 157.658987][ T1] EAX: 00000004 EBX: c2713884 ECX: 00000018 EDX: 00000000
> > [ 157.658987][ T1] ESI: ffffffff EDI: 00000000 EBP: c1c43d2c ESP: c1c43d10
> > [ 157.658987][ T1] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010297
> > [ 157.666985][ T1] CR0: 80050033 CR2: 00000046 CR3: 1b1da000 CR4: 000406d0
> > [ 157.666985][ T1] Call Trace:
> > [ 157.666985][ T1] dma_direct_alloc+0x50/0x180
> > [ 157.674977][ T1] dma_alloc_attrs+0x69/0xc0
> > [ 157.674977][ T1] ide_allocate_dma_engine+0x55/0x80
>
> This IDE code doesn't exist upstream any more. See b7fb14d3ac63 ("ide: remove
> the legacy ide driver").
Let me kill that branch since we never pushed that to Linus.
>
> Will