lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 6 Sep 2014 13:45:12 +0800
From:	Fengguang Wu <fengguang.wu@...el.com>
To:	Daniel Vetter <daniel.vetter@...ll.ch>
Cc:	Jet Chen <jet.chen@...el.com>, Su Tao <tao.su@...el.com>,
	Yuanhan Liu <yuanhan.liu@...el.com>, LKP <lkp@...org>,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [drm] INFO: trying to register non-static key.

Greetings,

0day kernel testing robot got the below dmesg and the first bad commit is

git://anongit.freedesktop.org/drm-intel topic/core-stuff
commit 4e396fc20db96c0af710601f081ffb41b0fe611c
Author:     Daniel Vetter <daniel.vetter@...ll.ch>
AuthorDate: Fri Sep 5 14:27:41 2014 +0200
Commit:     Daniel Vetter <daniel.vetter@...ll.ch>
CommitDate: Fri Sep 5 14:34:48 2014 +0200

    drm: Drop modeset locking from crtc init function
    
    At driver init no one can access modeset objects and we're
    single-threaded. So locking is just cargo-culting here. Worse, with
    the new ww mutexes and ww mutex slowpath debugging the mutex_lock
    might actually fail, and we don't have the full-blown ww recovery
    dance.
    
    Which then leads to fireworks when we try to unlock the not-locked
    crtc lock.
    
    An audit of all the functions called from here shows that none of them
    contain locking checks, so there's also no reason to keep the locking
    around just for consistency of caller contexts. Besides that I have
    the rule (at least in i915) that such places where we take locks just
    to simplify locking checks and not for correctness always require a
    comment.
    
    This regression was introduced in
    
    commit 51fd371bbaf94018a1223b4e2cf20b9880fd92d4
    Author: Rob Clark <robdclark@...il.com>
    Date:   Tue Nov 19 12:10:12 2013 -0500
    
        drm: convert crtc and connection_mutex to ww_mutex (v5)
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=83341
    Cc: Rob Clark <robdclark@...il.com>
    Cc: thellstrom@...are.com
    Cc: maarten.lankhorst@...onical.com
    Cc: stable@...r.kernel.org
    Signed-off-by: Daniel Vetter <daniel.vetter@...el.com>

===================================================
PARENT COMMIT NOT CLEAN. LOOK OUT FOR WRONG BISECT!
===================================================
Attached dmesg for the parent commit, too, to help confirm whether it is a noise error.

+------------------------------------------------------------------+------------+------------+------------+
|                                                                  | 5c551b501a | 4e396fc20d | 5a2aa64d4e |
+------------------------------------------------------------------+------------+------------+------------+
| boot_successes                                                   | 31         | 0          | 0          |
| boot_failures                                                    | 29         | 20         | 11         |
| Kernel_panic-not_syncing:Out_of_memory_and_no_killable_processes | 25         |            |            |
| backtrace:lock_torture_stats                                     | 25         |            |            |
| BUG:unable_to_handle_kernel_paging_request                       | 3          |            |            |
| Oops                                                             | 2          | 20         | 11         |
| EIP_is_at__lock_acquire                                          | 1          |            |            |
| Kernel_panic-not_syncing:Fatal_exception_in_interrupt            | 1          |            |            |
| backtrace:set_memory_np                                          | 2          |            |            |
| backtrace:free_init_pages                                        | 2          |            |            |
| backtrace:populate_rootfs                                        | 2          |            |            |
| backtrace:kernel_init_freeable                                   | 2          | 20         | 11         |
| EIP_is_at__change_page_attr_set_clr                              | 1          |            |            |
| Kernel_panic-not_syncing:Fatal_exception                         | 1          | 20         | 11         |
| BUG:kernel_boot_hang                                             | 1          |            |            |
| INFO:trying_to_register_non-static_key                           | 0          | 20         | 11         |
| BUG:unable_to_handle_kernel_NULL_pointer_dereference             | 0          | 20         | 11         |
| EIP_is_at__ww_mutex_lock                                         | 0          | 20         | 11         |
| backtrace:drm_modeset_lock_all                                   | 0          | 20         | 11         |
| backtrace:drm_encoder_init                                       | 0          | 20         | 11         |
| backtrace:cirrus_modeset_init                                    | 0          | 20         | 11         |
| backtrace:__pci_register_driver                                  | 0          | 20         | 11         |
| backtrace:drm_pci_init                                           | 0          | 20         | 11         |
| backtrace:cirrus_init                                            | 0          | 20         | 11         |
+------------------------------------------------------------------+------------+------------+------------+

[    0.836476] [drm] radeon kernel modesetting enabled.
[    0.837550] [TTM] Zone  kernel: Available graphics memory: 145694 kiB
[    0.838064] [TTM] Initializing pool allocator
[    0.838626] INFO: trying to register non-static key.
[    0.839022] the code is fine but needs lockdep annotation.
[    0.839454] turning off the locking correctness validator.
[    0.839884] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.17.0-rc2-00221-g4e396fc #5
[    0.840367] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
[    0.840367]  00000000 00000000 d341fc08 c69981fd c7394920 d341fc7c c5c7b341 c6c9ea3c
[    0.840367]  0900b705 d3440000 d341fc90 c5c79b96 d3440000 402dc174 d3440000 402dc174
[    0.840367]  00000005 01440000 00000000 d2529848 d2529848 00000000 c73626e0 d34405d0
[    0.840367] Call Trace:
[    0.840367]  [<c69981fd>] dump_stack+0x48/0x60
[    0.840367]  [<c5c7b341>] __lock_acquire+0x1c21/0x1da0
[    0.840367]  [<c5c79b96>] ? __lock_acquire+0x476/0x1da0
[    0.840367]  [<c5c78a96>] ? __lock_is_held+0x46/0x60
[    0.840367]  [<c5c7bd11>] lock_acquire+0x91/0xc0
[    0.840367]  [<c625e531>] ? drm_modeset_lock+0x31/0xf0
[    0.840367]  [<c69a607c>] __ww_mutex_lock+0x6c/0x780
[    0.840367]  [<c625e531>] ? drm_modeset_lock+0x31/0xf0
[    0.840367]  [<c625e531>] ? drm_modeset_lock+0x31/0xf0
[    0.840367]  [<c625e531>] ? drm_modeset_lock+0x31/0xf0
[    0.840367]  [<c625e531>] drm_modeset_lock+0x31/0xf0
[    0.840367]  [<c625e7c4>] drm_modeset_lock_all_crtcs+0x34/0x50
[    0.840367]  [<c625e884>] __drm_modeset_lock_all+0xa4/0xe0
[    0.840367]  [<c625e8ca>] drm_modeset_lock_all+0xa/0x30
[    0.840367]  [<c625022b>] drm_encoder_init+0x1b/0xe0
[    0.840367]  [<c5d0ea08>] ? kmem_cache_alloc+0x98/0x190
[    0.840367]  [<c6366d81>] ? cirrus_modeset_init+0xe1/0x1c0
[    0.840367]  [<c6366da7>] cirrus_modeset_init+0x107/0x1c0
[    0.840367]  [<c6365e47>] cirrus_driver_load+0x57/0x120
[    0.840367]  [<c624b75e>] drm_dev_register+0x9e/0x100
[    0.840367]  [<c624cea1>] drm_get_pci_dev+0x91/0x1c0
[    0.840367]  [<c5c77e5b>] ? trace_hardirqs_on+0xb/0x10
[    0.840367]  [<c69a5f58>] ? mutex_unlock+0x8/0x10
[    0.840367]  [<c6366fcc>] cirrus_pci_probe+0xac/0xf0
[    0.840367]  [<c6113337>] pci_device_probe+0x77/0xe0
[    0.840367]  [<c5d7fbb0>] ? sysfs_create_link+0x20/0x40
[    0.840367]  [<c63c3673>] driver_probe_device+0x73/0x230
[    0.840367]  [<c6113292>] ? pci_match_device+0xc2/0xf0
[    0.840367]  [<c63c3911>] __driver_attach+0x91/0xa0
[    0.840367]  [<c63c3880>] ? __device_attach+0x50/0x50
[    0.840367]  [<c63c1f7f>] bus_for_each_dev+0x4f/0x80
[    0.840367]  [<c63c39d9>] driver_attach+0x19/0x20
[    0.840367]  [<c63c3880>] ? __device_attach+0x50/0x50
[    0.840367]  [<c63c2897>] bus_add_driver+0x137/0x1f0
[    0.840367]  [<c6edb6e6>] ? mgag200_init+0x22/0x22
[    0.840367]  [<c6edb6e6>] ? mgag200_init+0x22/0x22
[    0.840367]  [<c63c4044>] driver_register+0x54/0xe0
[    0.840367]  [<c6113595>] __pci_register_driver+0x45/0x50
[    0.840367]  [<c624d0ba>] drm_pci_init+0xea/0x110
[    0.840367]  [<c5c77e5b>] ? trace_hardirqs_on+0xb/0x10
[    0.840367]  [<c6edb6e6>] ? mgag200_init+0x22/0x22
[    0.840367]  [<c6edb706>] cirrus_init+0x20/0x22
[    0.840367]  [<c6eafc92>] do_one_initcall+0x16a/0x179
[    0.840367]  [<c5c54f00>] ? parse_args+0x150/0x3e0
[    0.840367]  [<c6eafd8e>] kernel_init_freeable+0xed/0x16a
[    0.840367]  [<c69925db>] kernel_init+0xb/0xe0
[    0.840367]  [<c69a9521>] ret_from_kernel_thread+0x21/0x30
[    0.840367]  [<c69925d0>] ? rest_init+0x120/0x120
[    0.862651] BUG: unable to handle kernel NULL pointer dereference at   (null)
[    0.863236] IP: [<c69a610a>] __ww_mutex_lock+0xfa/0x780
[    0.863655] *pdpt = 00000000125ad001 *pde = 0000000000000000 
[    0.864131] Oops: 0002 [#1] SMP DEBUG_PAGEALLOC
[    0.864521] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.17.0-rc2-00221-g4e396fc #5
[    0.865109] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
[    0.865883] task: d3440000 ti: d341e000 task.ti: d341e000
[    0.866310] EIP: 0060:[<c69a610a>] EFLAGS: 00010082 CPU: 0
[    0.866638] EIP is at __ww_mutex_lock+0xfa/0x780
[    0.866638] EAX: 00000000 EBX: d2520b40 ECX: d2529834 EDX: d341fcdc
[    0.866638] ESI: d2529810 EDI: d2529814 EBP: d341fcf8 ESP: d341fcb4
[    0.866638]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[    0.866638] CR0: 8005003b CR2: 00000000 CR3: 125ac000 CR4: 000006b0
[    0.866638] Stack:
[    0.866638]  00000000 00000001 d2520b58 c625e531 c625e531 d2529848 00000001 d3440000
[    0.866638]  d2520b40 00000246 d2529834 00000000 11111111 d341fcdc d2520b40 d2529810
[    0.866638]  d2520b40 d341fd0c c625e531 d2529800 d2528c00 d2520b40 d341fd20 c625e7c4
[    0.866638] Call Trace:
[    0.866638]  [<c625e531>] ? drm_modeset_lock+0x31/0xf0
[    0.866638]  [<c625e531>] ? drm_modeset_lock+0x31/0xf0
[    0.866638]  [<c625e531>] drm_modeset_lock+0x31/0xf0
[    0.866638]  [<c625e7c4>] drm_modeset_lock_all_crtcs+0x34/0x50
[    0.866638]  [<c625e884>] __drm_modeset_lock_all+0xa4/0xe0
[    0.866638]  [<c625e8ca>] drm_modeset_lock_all+0xa/0x30
[    0.866638]  [<c625022b>] drm_encoder_init+0x1b/0xe0
[    0.866638]  [<c5d0ea08>] ? kmem_cache_alloc+0x98/0x190
[    0.866638]  [<c6366d81>] ? cirrus_modeset_init+0xe1/0x1c0
[    0.866638]  [<c6366da7>] cirrus_modeset_init+0x107/0x1c0
[    0.866638]  [<c6365e47>] cirrus_driver_load+0x57/0x120
[    0.866638]  [<c624b75e>] drm_dev_register+0x9e/0x100
[    0.866638]  [<c624cea1>] drm_get_pci_dev+0x91/0x1c0
[    0.866638]  [<c5c77e5b>] ? trace_hardirqs_on+0xb/0x10
[    0.866638]  [<c69a5f58>] ? mutex_unlock+0x8/0x10
[    0.866638]  [<c6366fcc>] cirrus_pci_probe+0xac/0xf0
[    0.866638]  [<c6113337>] pci_device_probe+0x77/0xe0
[    0.866638]  [<c5d7fbb0>] ? sysfs_create_link+0x20/0x40
[    0.866638]  [<c63c3673>] driver_probe_device+0x73/0x230
[    0.866638]  [<c6113292>] ? pci_match_device+0xc2/0xf0
[    0.866638]  [<c63c3911>] __driver_attach+0x91/0xa0
[    0.866638]  [<c63c3880>] ? __device_attach+0x50/0x50
[    0.866638]  [<c63c1f7f>] bus_for_each_dev+0x4f/0x80
[    0.866638]  [<c63c39d9>] driver_attach+0x19/0x20
[    0.866638]  [<c63c3880>] ? __device_attach+0x50/0x50
[    0.866638]  [<c63c2897>] bus_add_driver+0x137/0x1f0
[    0.866638]  [<c6edb6e6>] ? mgag200_init+0x22/0x22
[    0.866638]  [<c6edb6e6>] ? mgag200_init+0x22/0x22
[    0.866638]  [<c63c4044>] driver_register+0x54/0xe0
[    0.866638]  [<c6113595>] __pci_register_driver+0x45/0x50
[    0.866638]  [<c624d0ba>] drm_pci_init+0xea/0x110
[    0.866638]  [<c5c77e5b>] ? trace_hardirqs_on+0xb/0x10
[    0.866638]  [<c6edb6e6>] ? mgag200_init+0x22/0x22
[    0.866638]  [<c6edb706>] cirrus_init+0x20/0x22
[    0.866638]  [<c6eafc92>] do_one_initcall+0x16a/0x179
[    0.866638]  [<c5c54f00>] ? parse_args+0x150/0x3e0
[    0.866638]  [<c6eafd8e>] kernel_init_freeable+0xed/0x16a
[    0.866638]  [<c69925db>] kernel_init+0xb/0xe0
[    0.866638]  [<c69a9521>] ret_from_kernel_thread+0x21/0x30
[    0.866638]  [<c69925d0>] ? rest_init+0x120/0x120
[    0.866638] Code: 55 e4 89 f0 e8 a8 e9 2c ff 8b 45 d8 8d 55 e4 8b 48 04 89 f0 e8 d8 eb 2c ff 8b 46 28 8d 4e 24 8d 55 e4 89 56 28 89 4d e4 89 45 e8 <89> 10 8b 45 d8 89 4d d4 89 45 ec 8d 74 26 00 8d bc 27 00 00 00
[    0.866638] EIP: [<c69a610a>] __ww_mutex_lock+0xfa/0x780 SS:ESP 0068:d341fcb4
[    0.866638] CR2: 0000000000000000
[    0.866638] ---[ end trace 5dc0d5f349200b14 ]---
[    0.866638] Kernel panic - not syncing: Fatal exception

git bisect start 5a2aa64d4eafdaef278ff495025c59a5cd96eafb 69e273c0b0a3c337a521d083374c918dc52c666f --
git bisect good 82c3b0c30522510fcee89a14302aeb06df65f8d1  # 22:42     20+      5  Merge 'spi/fix/rockchip' into devel-roam-i386-201409052138
git bisect good 259fc4e3fc3c3f073edd07564eb82433d7c86cc7  # 23:47     20+      0  Merge 'drm-intel/drm-intel-nightly' into devel-roam-i386-201409052138
git bisect  bad 70d805ad73fa5ee4d860ff10f4ff98050c01c2d9  # 00:58      0-      1  Merge 'hch-scsi-queue/core-for-3.18' into devel-roam-i386-201409052138
git bisect good 16cd192c2100085aa6ce04ec186fe62346a3b173  # 01:31     20+     20  Merge 'drm/drm-mst-dell-30-hacks' into devel-roam-i386-201409052138
git bisect  bad 31c010b13c93e6a7e8553be9b1d885b61df434b4  # 01:50      1-     20  Merge 'drm-intel/topic/core-stuff' into devel-roam-i386-201409052138
git bisect  bad 4e396fc20db96c0af710601f081ffb41b0fe611c  # 02:15      0-      4  drm: Drop modeset locking from crtc init function
# first bad commit: [4e396fc20db96c0af710601f081ffb41b0fe611c] drm: Drop modeset locking from crtc init function
git bisect good 5c551b501aa8637e844ea85eaea10f4f75aff716  # 03:00     60+     29  drm/i915/hdmi: Enable pipe pixel replication for SD interlaced modes
git bisect  bad 5a2aa64d4eafdaef278ff495025c59a5cd96eafb  # 03:00      0-     11  0day head guard for 'devel-roam-i386-201409052138'
git bisect good fb762340e55638332407560396aea380b7af9cbf  # 03:11     60+     26  Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
git bisect good 92d88cb068a5dc66d53ef017999b2419b125f764  # 04:16     60+      2  Add linux-next specific files for 20140905


This script may reproduce the error.

----------------------------------------------------------------------------
#!/bin/bash

kernel=$1
initrd=yocto-minimal-i386.cgz

wget --no-clobber https://github.com/fengguang/reproduce-kernel-bug/raw/master/initrd/$initrd

kvm=(
	qemu-system-x86_64
	-cpu kvm64
	-enable-kvm
	-kernel $kernel
	-initrd $initrd
	-m 320
	-smp 1
	-net nic,vlan=1,model=e1000
	-net user,vlan=1
	-boot order=nc
	-no-reboot
	-watchdog i6300esb
	-rtc base=localtime
	-serial stdio
	-display none
	-monitor null 
)

append=(
	hung_task_panic=1
	earlyprintk=ttyS0,115200
	debug
	apic=debug
	sysrq_always_enabled
	rcupdate.rcu_cpu_stall_timeout=100
	panic=-1
	softlockup_panic=1
	nmi_watchdog=panic
	oops=panic
	load_ramdisk=2
	prompt_ramdisk=0
	console=ttyS0,115200
	console=tty0
	vga=normal
	root=/dev/ram0
	rw
	drbd.minor_count=8
)

"${kvm[@]}" --append "${append[*]}"
----------------------------------------------------------------------------

Thanks,
Fengguang

View attachment "dmesg-yocto-ivb41-46:20140906021532:i386-randconfig-r3-0905::" of type "text/plain" (36056 bytes)

View attachment "dmesg-quantal-ivb42-104:20140906025146:i386-randconfig-r3-0905::" of type "text/plain" (49167 bytes)

Download attachment "i386-randconfig-r3-0905-5a2aa64d4eafdaef278ff495025c59a5cd96eafb-INFO:-trying-to-register-non-static-key--46796.log" of type "application/octet-stream" (49173 bytes)

View attachment "config-3.17.0-rc2-00221-g4e396fc" of type "text/plain" (83553 bytes)

_______________________________________________
LKP mailing list
LKP@...ux.intel.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ