Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753080AbcJJRKJ (ORCPT ); Mon, 10 Oct 2016 13:10:09 -0400 Received: from mail.kernel.org ([198.145.29.136]:32842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752900AbcJJRKI (ORCPT ); Mon, 10 Oct 2016 13:10:08 -0400 MIME-Version: 1.0 In-Reply-To: <1219480016.67057.1476113847440.JavaMail.zimbra@redhat.com> References: <907882571.66590.1476113724660.JavaMail.zimbra@redhat.com> <1219480016.67057.1476113847440.JavaMail.zimbra@redhat.com> From: Rob Herring Date: Mon, 10 Oct 2016 12:09:43 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: kasan inline + CONFIG_DEBUG_TEST_DRIVER_REMOVE kernel panic To: CAI Qian Cc: linux-kernel , Greg Kroah-Hartman Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5643 Lines: 82 On Mon, Oct 10, 2016 at 10:37 AM, CAI Qian wrote: > Not sure if anyone reported this before. With this kernel config, it is 100% kernel panic so far with today's > mainline master HEAD. Looks like it is catching what it is supposed to. Though looking through the code, I haven't found where the problem is. Does bind and unbind for this normally work? > http://people.redhat.com/qcai/tmp/config-kasan-remove > > [ 36.318420] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) > [ 36.325626] software IO TLB [mem 0x71c7d000-0x75c7d000] (64MB) mapped at [ffff880071c7d000-ffff880075c7cfff] > [ 36.339108] Intel CQM monitoring enabled > [ 36.343507] Intel MBM enabled > [ 36.358713] RAPL PMU: API unit is 2^-32 Joules, 4 fixed counters, 655360 ms ovfl timer > [ 36.367563] RAPL PMU: hw unit of domain pp0-core 2^-14 Joules > [ 36.373984] RAPL PMU: hw unit of domain package 2^-14 Joules > [ 36.380308] RAPL PMU: hw unit of domain dram 2^-14 Joules > [ 36.386337] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules > [ 36.410064] kasan: CONFIG_KASAN_INLINE enabled > [ 36.415042] kasan: GPF could be caused by NULL-ptr deref or user memory access > [ 36.423111] general protection fault: 0000 [#1] PREEMPT SMP KASAN > [ 36.429911] Modules linked in: > [ 36.433331] CPU: 48 PID: 1 Comm: swapper/0 Not tainted 4.8.0remove+ #4 > [ 36.440616] Hardware name: Intel Corporation S2600WTT/S2600WTT, BIOS GRRFSDP1.86B.0271.R00.1510301446 10/30/2015 > [ 36.451974] task: ffff880e524d0000 task.stack: ffff880852880000 > [ 36.458578] RIP: 0010:[] [] device_del+0x80/0x700 > [ 36.467431] RSP: 0000:ffff880852887938 EFLAGS: 00010246 > [ 36.473357] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 1ffff10109e6f101 > [ 36.481319] RDX: dffffc0000000000 RSI: 000000000000000b RDI: 0000000000000000 > [ 36.489281] RBP: ffff8808528879e8 R08: 0000000000000001 R09: 0000000000000000 > [ 36.497243] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880e501b4b00 > [ 36.505208] R13: ffff880e31988480 R14: 0000000000000001 R15: ffff880e31988480 > [ 36.513171] FS: 0000000000000000(0000) GS:ffff88085ec80000(0000) knlGS:0000000000000000 > [ 36.522201] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 36.528613] CR2: 0000000000000000 CR3: 0000000002e0a000 CR4: 00000000003406e0 > [ 36.536576] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > [ 36.544537] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > [ 36.552499] Stack: > [ 36.554742] 1ffff1010a510f28 1ffff1010a510f2c ffffffff82d3abe4 ffffffff81a6d060 > [ 36.563037] 0000000000000296 0000000041b58ab3 ffffffff82d48cc5 ffffffff81ea0840 > [ 36.571329] ffffffff828a3040 ffff880800000000 ffff880852887980 ffffffff82f0ba20 > [ 36.579624] Call Trace: > [ 36.582355] [] ? idr_mark_full+0xc0/0xc0 > [ 36.588573] [] ? cleanup_glue_dir+0xe0/0xe0 > [ 36.595086] [] perf_pmu_unregister+0x18d/0x530 > [ 36.601890] [] ? _raw_spin_unlock+0x31/0x50 > [ 36.608393] [] ? uncore_pcibus_to_physid+0x10e/0x1c0 > [ 36.615766] [] uncore_pci_remove+0x24e/0x440 > [ 36.622375] [] pci_device_remove+0xa2/0x1e0 > [ 36.628888] [] driver_probe_device+0x171/0xd50 > [ 36.635688] [] ? driver_probe_device+0xd50/0xd50 > [ 36.642685] [] __driver_attach+0x199/0x1e0 > [ 36.649097] [] bus_for_each_dev+0x126/0x1e0 > [ 36.655607] [] ? subsys_dev_iter_exit+0x10/0x10 > [ 36.662508] [] ? preempt_count_sub+0x5e/0xe0 > [ 36.669105] [] driver_attach+0x3d/0x50 > [ 36.675129] [] bus_add_driver+0x554/0x790 > [ 36.681444] [] driver_register+0x18c/0x3b0 > [ 36.687861] [] ? __raw_spin_lock_init+0x32/0x100 > [ 36.694854] [] __pci_register_driver+0x13a/0x1e0 > [ 36.701853] [] intel_uncore_init+0x465/0x54f > [ 36.708459] [] ? uncore_type_init+0x4d6/0x4d6 > [ 36.715165] [] do_one_initcall+0xa9/0x240 > [ 36.721473] [] ? initcall_blacklisted+0x180/0x180 > [ 36.728568] [] ? parse_args+0x520/0x990 > [ 36.734692] [] ? __usermodehelper_set_disable_depth+0x42/0x50 > [ 36.742948] [] kernel_init_freeable+0x540/0x610 > [ 36.749845] [] ? start_kernel+0x70d/0x70d > [ 36.756161] [] ? _raw_spin_unlock_irq+0x3d/0x60 > [ 36.763060] [] ? finish_task_switch+0x189/0x6c0 > [ 36.769957] [] ? finish_task_switch+0x15b/0x6c0 > [ 36.776857] [] ? rest_init+0x160/0x160 > [ 36.782875] [] kernel_init+0x13/0x120 > [ 36.788802] [] ? rest_init+0x160/0x160 > [ 36.794826] [] ret_from_fork+0x2a/0x40 > [ 36.800851] Code: 81 c7 00 f1 f1 f1 f1 c7 40 04 00 07 f4 f4 c7 40 08 f3 f3 f3 f3 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 48 89 f8 48 c1 e8 03 <80> 3c 10 00 0f 85 1a 06 00 00 48 8b 03 48 89 85 68 ff ff ff 48 > [ 36.822549] RIP [] device_del+0x80/0x700 > [ 36.828778] RSP > [ 36.832743] ---[ end trace f3cec3a0c6cb2258 ]--- > [ 36.838054] Kernel panic - not syncing: Fatal exception > [ 36.843967] ---[ end Kernel panic - not syncing: Fatal exception