On Wed, 2017-06-07 at 10:08 +0800, kernel test robot wrote: > FYI, we noticed the following commit: > > commit: c793ed7ccf42ff8dba7863eb4568b9e59f232251 ("ACPI: Switch to use > generic guid_t in acpi_evaluate_dsm()") > git://git.infradead.org/users/hch/uuid.git acpi I think the below might fix the issue (it looks like related to gcc bug) --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -638,7 +638,7 @@ acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func,           params[0].type = ACPI_TYPE_BUFFER;         params[0].buffer.length = 16; -       params[0].buffer.pointer = (u8 *)&guid; +       params[0].buffer.pointer = (u8 *)guid;         params[1].type = ACPI_TYPE_INTEGER;         params[1].integer.value = rev;         params[2].type = ACPI_TYPE_INTEGER; > > in testcase: boot > > on test machine: qemu-system-x86_64 -enable-kvm -smp 2 -m 512M > > caused below changes (please refer to attached dmesg/kmsg for entire > log/backtrace): > > > +-------------------------------+------------+------------+ > >                               | b7fe92999a | c793ed7ccf | > > +-------------------------------+------------+------------+ > > boot_successes                | 33         | 0          | > > boot_failures                 | 0          | 6          | > > BUG:KASAN:stack-out-of-bounds | 0          | 6          | > > +-------------------------------+------------+------------+ > > > > [    0.615801] BUG: KASAN: stack-out-of-bounds in > acpi_ut_copy_eobject_to_iobject+0x249/0x2c5 > [    0.618496] Read of size 16 at addr ffff8800191d7330 by task > swapper/0/1 > [    0.620332]  > [    0.621292] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc4- > 00028-gc793ed7 #1 > [    0.623852] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), > BIOS 1.9.3-20161025_171302-gandalf 04/01/2014 > [    0.626859] Call Trace: > [    0.627990]  dump_stack+0x61/0x7d > [    0.629265]  print_address_description+0x70/0x22a > [    0.630765]  kasan_report+0x1d1/0x1f1 > [    0.632083]  ? __kmalloc+0x30/0x131 > [    0.633383]  ? acpi_ut_copy_eobject_to_iobject+0x249/0x2c5 > [    0.635005]  check_memory_region+0x12b/0x130 > [    0.636432]  memcpy+0x23/0x4c > [    0.637650]  acpi_ut_copy_eobject_to_iobject+0x249/0x2c5 > [    0.639251]  acpi_evaluate_object+0x1f4/0x3eb > [    0.640693]  ? acpi_ns_get_device_callback+0x2b7/0x2b7 > [    0.642257]  ? lock_release+0x268/0x2d2 > [    0.643606]  acpi_evaluate_dsm+0x149/0x1a7 > [    0.645001]  ? acpi_evaluate_lck+0x5a/0x5a > [    0.646401]  ? do_raw_spin_unlock+0xbf/0xc9 > [    0.647823]  ? refcount_sub_and_test+0x15/0x5d > [    0.649287]  ? kobject_put+0x44/0x53 > [    0.650590]  ? put_device+0x12/0x14 > [    0.651876]  ? __raw_spin_lock_init+0x66/0x70 > [    0.653326]  acpi_pci_add_bus+0x9f/0xf1 > [    0.654682]  pcibios_add_bus+0x9/0xb > [    0.655982]  pci_register_host_bridge+0x487/0x6fc > [    0.657487]  ? kasan_unpoison_shadow+0x14/0x35 > [    0.658932]  ? pci_bus_insert_busn_res+0x1d0/0x1d0 > [    0.660440]  ? kasan_kmalloc+0x94/0xa3 > [    0.661786]  ? __kmalloc+0x11e/0x131 > [    0.663089]  pci_create_root_bus_msi+0x146/0x178 > [    0.664578]  pci_create_root_bus+0xc/0xe > [    0.665948]  acpi_pci_root_create+0x25b/0x2d2 > [    0.667401]  ? kasan_kmalloc+0x94/0xa3 > [    0.668741]  pci_acpi_scan_root+0x229/0x26b > [    0.670149]  acpi_pci_root_add+0x413/0x57e > [    0.671561]  ? acpi_pci_root_release_info+0xaf/0xaf > [    0.673081]  ? lock_release+0x268/0x2d2 > [    0.674446]  ? __device_attach+0x135/0x15e > [    0.675837]  ? acpi_match_device_ids+0xb/0x16 > [    0.677290]  ? acpi_bus_get_status_handle+0x2a/0x36 > [    0.678801]  ? acpi_bus_get_status+0x9e/0xcb > [    0.680224]  ? acpi_scan_match_handler+0x79/0xb5 > [    0.681716]  acpi_bus_attach+0x1f7/0x339 > [    0.683078]  ? acpi_device_is_present+0x2d/0x2d > [    0.684555]  ? mutex_unlock+0xd/0xf > [    0.685838]  ? __device_attach+0x135/0x15e > [    0.687228]  ? device_bind_driver+0x6d/0x6d > [    0.688633]  ? strcmp+0x27/0x4a > [    0.689857]  acpi_bus_attach+0x287/0x339 > [    0.691213]  ? acpi_device_is_present+0x2d/0x2d > [    0.692678]  ? mutex_unlock+0xd/0xf > [    0.693970]  ? __device_attach+0x135/0x15e > [    0.695372]  ? device_bind_driver+0x6d/0x6d > [    0.696776]  ? strcmp+0x27/0x4a > [    0.698017]  acpi_bus_attach+0x287/0x339 > [    0.699381]  ? do_raw_spin_unlock+0xbf/0xc9 > [    0.700786]  ? acpi_device_is_present+0x2d/0x2d > [    0.702266]  ? up+0x53/0x5a > [    0.703435]  ? acpi_os_signal_semaphore+0x27/0x33 > [    0.704926]  ? acpi_ut_release_read_lock+0x6b/0x75 > [    0.706447]  ? acpi_add_single_object+0xa03/0xa03 > [    0.707929]  ? acpi_walk_namespace+0xb6/0xd0 > [    0.709356]  acpi_bus_scan+0x9d/0xc5 > [    0.710673]  ? acpi_walk_dep_device_list+0x177/0x177 > [    0.712221]  acpi_scan_init+0x1f8/0x4fc > [    0.713571]  ? acpi_match_madt+0xea/0xea > [    0.714934]  ? refcount_dec_and_test+0x11/0x13 > [    0.716397]  ? kobject_put+0x44/0x53 > [    0.717710]  ? bus_put+0x29/0x2c > [    0.718956]  ? bus_create_file+0x4b/0x57 > [    0.720328]  ? bus_register+0x36b/0x389 > [    0.721681]  acpi_init+0x5e0/0x67c > [    0.722952]  ? acpi_sleep_init+0x2b7/0x2b7 > [    0.724358]  ? do_raw_spin_unlock+0xbf/0xc9 > [    0.725765]  ? _raw_spin_unlock_irqrestore+0x2f/0x3b > [    0.727319]  ? add_device_randomness+0xcc/0xe7 > [    0.728764]  ? __class_create+0x87/0xb0 > [    0.730113]  ? video_setup+0x189/0x189 > [    0.731454]  ? acpi_sleep_init+0x2b7/0x2b7 > [    0.732848]  do_one_initcall+0x12d/0x2c7 > [    0.734221]  ? start_kernel+0x5bd/0x5bd > [    0.735571]  ? do_raw_spin_unlock+0x9f/0xc9 > [    0.736978]  ? _raw_spin_unlock_irqrestore+0x2f/0x3b > [    0.738535]  kernel_init_freeable+0x217/0x35c > [    0.739968]  ? rest_init+0xd1/0xd1 > [    0.741263]  kernel_init+0xc/0x100 > [    0.742540]  ? rest_init+0xd1/0xd1 > [    0.743808]  ret_from_fork+0x25/0x30 > [    0.745114]  > [    0.746065] The buggy address belongs to the page: > [    0.747592] page:ffffea00006475c0 count:0 mapcount:0 > mapping:          (null) index:0x0 > [    0.750243] flags: 0x100000000000000() > [    0.751581] raw: 0100000000000000 0000000000000000 0000000000000000 > 00000000ffffffff > [    0.754180] raw: ffffea00006475e0 ffffea00006475e0 0000000000000000 > 0000000000000000 > [    0.756781] page dumped because: kasan: bad access detected > [    0.758427]  > [    0.759380] Memory state around the buggy address: > [    0.760884]  ffff8800191d7200: 00 00 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 > [    0.778503]  ffff8800191d7280: 00 00 f1 f1 f1 f1 00 f4 f4 f4 f3 f3 > f3 f3 00 00 > > > To reproduce: > >         git clone https://github.com/01org/lkp-tests.git >         cd lkp-tests >         bin/lkp qemu -k job-script  # job-script is attached > in this email > > > > Thanks, > Xiaolong -- Andy Shevchenko Intel Finland Oy