2022-05-05 13:52:59

by kernel test robot

[permalink] [raw]
Subject: [serial] 4a218b277f: BUG:kernel_NULL_pointer_dereference,address



Greeting,

FYI, we noticed the following commit (built with gcc-11):

commit: 4a218b277fdba357d8e9022ae675c94e59d64b4e ("serial: 8250: dw: Create a generic platform data structure")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master

in testcase: reaim
version: reaim-x86_64-7.0.1.13-1_20220411
with following parameters:

runtime: 300s
nr_task: 100%
test: shared
cpufreq_governor: performance
ucode: 0xec

test-description: REAIM is an updated and improved version of AIM 7 benchmark.
test-url: https://sourceforge.net/projects/re-aim-7/


on test machine: 16 threads 1 sockets Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz with 32G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


+----------------+------------+------------+
| | d9666dfb31 | 4a218b277f |
+----------------+------------+------------+
| boot_successes | 6 | 6 |
+----------------+------------+------------+


If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>


[ 4.296191][ T1] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 4.297049][ T1] #PF: supervisor read access in kernel mode
[ 4.297049][ T1] #PF: error_code(0x0000) - not-present page
[ 4.297049][ T1] PGD 0 P4D 0
[ 4.297049][ T1] Oops: 0000 [#1] SMP NOPTI
[ 4.297049][ T1] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc2-00079-g4a218b277fdb #1
[ 4.297049][ T1] Hardware name: Intel Corporation Mehlow UP Server Platform/Moss Beach Server, BIOS CNLSE2R1.R00.X188.B13.1903250419 03/25/2019
[ 4.297049][ T1] RIP: 0010:dw8250_probe (drivers/tty/serial/8250/8250_dw.c:375 drivers/tty/serial/8250/8250_dw.c:553)
[ 4.297049][ T1] Code: 85 c0 0f 85 c5 01 00 00 48 8b bc 24 58 01 00 00 48 8b 83 20 01 00 00 48 c7 83 80 01 00 00 00 00 00 00 48 83 bf 78 02 00 00 00 <8b> 00 0f 84 b5 01 00 00 a8 01 74 36 80 8b 88 01 00 00 01 48 c7 44
All code
========
0: 85 c0 test %eax,%eax
2: 0f 85 c5 01 00 00 jne 0x1cd
8: 48 8b bc 24 58 01 00 mov 0x158(%rsp),%rdi
f: 00
10: 48 8b 83 20 01 00 00 mov 0x120(%rbx),%rax
17: 48 c7 83 80 01 00 00 movq $0x0,0x180(%rbx)
1e: 00 00 00 00
22: 48 83 bf 78 02 00 00 cmpq $0x0,0x278(%rdi)
29: 00
2a:* 8b 00 mov (%rax),%eax <-- trapping instruction
2c: 0f 84 b5 01 00 00 je 0x1e7
32: a8 01 test $0x1,%al
34: 74 36 je 0x6c
36: 80 8b 88 01 00 00 01 orb $0x1,0x188(%rbx)
3d: 48 rex.W
3e: c7 .byte 0xc7
3f: 44 rex.R

Code starting with the faulting instruction
===========================================
0: 8b 00 mov (%rax),%eax
2: 0f 84 b5 01 00 00 je 0x1bd
8: a8 01 test $0x1,%al
a: 74 36 je 0x42
c: 80 8b 88 01 00 00 01 orb $0x1,0x188(%rbx)
13: 48 rex.W
14: c7 .byte 0xc7
15: 44 rex.R
[ 4.297049][ T1] RSP: 0000:ffffc9000004b658 EFLAGS: 00010246
[ 4.297049][ T1] RAX: 0000000000000000 RBX: ffff888104f30a28 RCX: 000000000000017d
[ 4.297049][ T1] RDX: 0000000000000000 RSI: ffffc9000004b5f0 RDI: ffff888104f87410
[ 4.297049][ T1] RBP: ffff888104f87410 R08: ffffc9000004b5c8 R09: ffff888104fdcb80
[ 4.297049][ T1] R10: ffff888104fdcb80 R11: 000ffffffffff000 R12: 0000000000000000
[ 4.297049][ T1] R13: ffff888104f87400 R14: ffffc9000004b668 R15: 0000000000000000
[ 4.297049][ T1] FS: 0000000000000000(0000) GS:ffff8888296c0000(0000) knlGS:0000000000000000
[ 4.297049][ T1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4.297049][ T1] CR2: 0000000000000000 CR3: 000000087c40a001 CR4: 00000000003706e0
[ 4.297049][ T1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 4.297049][ T1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 4.297049][ T1] Call Trace:
[ 4.297049][ T1] <TASK>
[ 4.297049][ T1] ? dw8250_serial_inq (drivers/tty/serial/8250/8250_dw.c:197)
[ 4.472030][ T1] ? dw8250_check_lcr (drivers/tty/serial/8250/8250_dw.c:187)
[ 4.477047][ T1] ? dw8250_runtime_resume (drivers/tty/serial/8250/8250_dw.c:316)
[ 4.482035][ T1] ? dw8250_serial_outq (drivers/tty/serial/8250/8250_dw.c:339)
[ 4.487024][ T1] ? dw8250_set_ldisc (drivers/tty/serial/8250/8250_dw.c:222)
[ 4.492023][ T1] ? dw8250_clk_notifier_cb (drivers/tty/serial/8250/8250_dw.c:304)
[ 4.498025][ T1] platform_probe (drivers/base/platform.c:1416)
[ 4.503023][ T1] really_probe (drivers/base/dd.c:541 drivers/base/dd.c:620)
[ 4.507026][ T1] __driver_probe_device (drivers/base/dd.c:751)
[ 4.513033][ T1] driver_probe_device (drivers/base/dd.c:781)
[ 4.518022][ T1] __device_attach_driver (drivers/base/dd.c:899)
[ 4.523046][ T1] ? driver_allows_async_probing (drivers/base/dd.c:867)
[ 4.529023][ T1] ? driver_allows_async_probing (drivers/base/dd.c:867)
[ 4.535024][ T1] bus_for_each_drv (drivers/base/bus.c:427)
[ 4.540014][ T1] __device_attach (drivers/base/dd.c:969)
[ 4.545023][ T1] bus_probe_device (drivers/base/bus.c:489)
[ 4.550027][ T1] device_add (drivers/base/core.c:3412)
[ 4.554024][ T1] ? dev_set_name (drivers/base/core.c:3196)
[ 4.559025][ T1] platform_device_add (drivers/base/platform.c:713)
[ 4.564027][ T1] mfd_add_device (drivers/mfd/mfd-core.c:280)
[ 4.569035][ T1] mfd_add_devices (drivers/mfd/mfd-core.c:336)
[ 4.574025][ T1] intel_lpss_probe (drivers/mfd/intel-lpss.c:432)
[ 4.579028][ T1] intel_lpss_pci_probe (drivers/mfd/intel-lpss-pci.c:56 drivers/mfd/intel-lpss-pci.c:29)
[ 4.584023][ T1] local_pci_probe (drivers/pci/pci-driver.c:323)
[ 4.589027][ T1] pci_call_probe (drivers/pci/pci-driver.c:391)
[ 4.594014][ T1] ? kernfs_create_link (fs/kernfs/symlink.c:48)
[ 4.599050][ T1] pci_device_probe (drivers/pci/pci-driver.c:460)
[ 4.604027][ T1] really_probe (drivers/base/dd.c:541 drivers/base/dd.c:620)
[ 4.609022][ T1] __driver_probe_device (drivers/base/dd.c:751)
[ 4.614023][ T1] driver_probe_device (drivers/base/dd.c:781)
[ 4.619028][ T1] __driver_attach (drivers/base/dd.c:1141)
[ 4.624030][ T1] ? __device_attach_driver (drivers/base/dd.c:1093)
[ 4.630031][ T1] ? __device_attach_driver (drivers/base/dd.c:1093)
[ 4.636027][ T1] bus_for_each_dev (drivers/base/bus.c:301)
[ 4.640025][ T1] bus_add_driver (drivers/base/bus.c:619)
[ 4.645022][ T1] driver_register (drivers/base/driver.c:171)
[ 4.650014][ T1] ? intel_lpss_init (drivers/mfd/intel-lpss-pci.c:499)
[ 4.655024][ T1] do_one_initcall (init/main.c:1298)
[ 4.660022][ T1] do_initcalls (init/main.c:1370 init/main.c:1387)
[ 4.664022][ T1] kernel_init_freeable (init/main.c:1617)
[ 4.670023][ T1] ? rest_init (init/main.c:1494)
[ 4.674021][ T1] kernel_init (init/main.c:1504)
[ 4.679024][ T1] ret_from_fork (arch/x86/entry/entry_64.S:298)
[ 4.683034][ T1] </TASK>
[ 4.687024][ T1] Modules linked in:
[ 4.691024][ T1] CR2: 0000000000000000
[ 4.695024][ T1] ---[ end trace 0000000000000000 ]---
[ 4.701022][ T1] RIP: 0010:dw8250_probe (drivers/tty/serial/8250/8250_dw.c:375 drivers/tty/serial/8250/8250_dw.c:553)
[ 4.706022][ T1] Code: 85 c0 0f 85 c5 01 00 00 48 8b bc 24 58 01 00 00 48 8b 83 20 01 00 00 48 c7 83 80 01 00 00 00 00 00 00 48 83 bf 78 02 00 00 00 <8b> 00 0f 84 b5 01 00 00 a8 01 74 36 80 8b 88 01 00 00 01 48 c7 44
All code
========
0: 85 c0 test %eax,%eax
2: 0f 85 c5 01 00 00 jne 0x1cd
8: 48 8b bc 24 58 01 00 mov 0x158(%rsp),%rdi
f: 00
10: 48 8b 83 20 01 00 00 mov 0x120(%rbx),%rax
17: 48 c7 83 80 01 00 00 movq $0x0,0x180(%rbx)
1e: 00 00 00 00
22: 48 83 bf 78 02 00 00 cmpq $0x0,0x278(%rdi)
29: 00
2a:* 8b 00 mov (%rax),%eax <-- trapping instruction
2c: 0f 84 b5 01 00 00 je 0x1e7
32: a8 01 test $0x1,%al
34: 74 36 je 0x6c
36: 80 8b 88 01 00 00 01 orb $0x1,0x188(%rbx)
3d: 48 rex.W
3e: c7 .byte 0xc7
3f: 44 rex.R

Code starting with the faulting instruction
===========================================
0: 8b 00 mov (%rax),%eax
2: 0f 84 b5 01 00 00 je 0x1bd
8: a8 01 test $0x1,%al
a: 74 36 je 0x42
c: 80 8b 88 01 00 00 01 orb $0x1,0x188(%rbx)
13: 48 rex.W
14: c7 .byte 0xc7
15: 44 rex.R


To reproduce:

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
sudo bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
sudo bin/lkp run generated-yaml-file

# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.



--
0-DAY CI Kernel Test Service
https://01.org/lkp



Attachments:
(No filename) (9.09 kB)
config-5.18.0-rc2-00079-g4a218b277fdb (165.11 kB)
job-script (7.81 kB)
dmesg.xz (12.54 kB)
job.yaml (5.09 kB)
Download all attachments

2022-05-07 13:14:43

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [serial] 4a218b277f: BUG:kernel_NULL_pointer_dereference,address

On Thu, May 05, 2022 at 05:18:43PM +0800, kernel test robot wrote:
>
>
> Greeting,
>
> FYI, we noticed the following commit (built with gcc-11):
>
> commit: 4a218b277fdba357d8e9022ae675c94e59d64b4e ("serial: 8250: dw: Create a generic platform data structure")
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master
>
> in testcase: reaim
> version: reaim-x86_64-7.0.1.13-1_20220411
> with following parameters:
>
> runtime: 300s
> nr_task: 100%
> test: shared
> cpufreq_governor: performance
> ucode: 0xec
>
> test-description: REAIM is an updated and improved version of AIM 7 benchmark.
> test-url: https://sourceforge.net/projects/re-aim-7/
>
>
> on test machine: 16 threads 1 sockets Intel(R) Xeon(R) E-2278G CPU @ 3.40GHz with 32G memory
>
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>
>
> +----------------+------------+------------+
> | | d9666dfb31 | 4a218b277f |
> +----------------+------------+------------+
> | boot_successes | 6 | 6 |
> +----------------+------------+------------+
>
>
> If you fix the issue, kindly add following tag
> Reported-by: kernel test robot <[email protected]>

Isn't it what Heikki's patch should fix?

--
With Best Regards,
Andy Shevchenko