From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755523AbbIWPuR (ORCPT ); Wed, 23 Sep 2015 11:50:17 -0400 Received: from h1446028.stratoserver.net ([85.214.92.142]:56163 "EHLO mail.ahsoftware.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753132AbbIWPuO (ORCPT ); Wed, 23 Sep 2015 11:50:14 -0400 Subject: Re: AMD-IOMMU and problem with __init(data)? To: Joerg Roedel References: <56027D60.3070903@ahsoftware.de> <20150923114358.GA3036@8bytes.org> Cc: linux-kernel@vger.kernel.org From: Alexander Holler Message-ID: <5602CA2B.5000106@ahsoftware.de> Date: Wed, 23 Sep 2015 17:50:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150923114358.GA3036@8bytes.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 23.09.2015 um 13:43 schrieb Joerg Roedel: > Hey Alexander, > > On Wed, Sep 23, 2015 at 12:22:24PM +0200, Alexander Holler wrote: >> [ 1.539496] AMD-Vi: Lazy IO/TLB flushing enabled >> [ 1.545741] AHO: count_annotated 25 >> [ 1.549259] AHO: build inventory >> [ 1.552517] AHO: ac ffffffff81d400d8 ic (null) ID >> 2177560225 deps 00000000000000b0 drv ffffffff81d25090 >> [ 1.562801] BUG: unable to handle kernel paging request at >> 00000000039c2af5 >> (...) > > Do you possibly have the full BUG message including the stacktrace? The full msg is --------- [ 1.552517] AHO: ac ffffffff81d400d8 ic (null) ID 2177560225 deps 00000000000000b0 drv ffffffff81d25090 [ 1.562801] BUG: unable to handle kernel paging request at 00000000039c2af5 [ 1.569889] IP: [] do_annotated_initcalls+0x6f/0x25b [ 1.576490] PGD 0 [ 1.578587] Oops: 0002 [#1] SMP [ 1.581947] Modules linked in: [ 1.585085] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.2.1-deps-00154-gb5f382c-dirty #768 [ 1.593374] Hardware name: System manufacturer System Product Name/F2A85-M, BIOS 6508 07/11/2014 [ 1.602184] task: ffff88042d508000 ti: ffff88042d510000 task.ti: ffff88042d510000 [ 1.609693] RIP: 0010:[] [] do_annotated_initcalls+0x6f/0x25b [ 1.618718] RSP: 0018:ffff88042d513f08 EFLAGS: 00010296 [ 1.624056] RAX: 0000000081caeea1 RBX: ffffffff81d400d8 RCX: 0000000000000000 [ 1.631210] RDX: 0000000081caeea1 RSI: 0000000000000246 RDI: ffffffff81da7ae8 [ 1.638365] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 [ 1.645519] R10: 00000000000001f9 R11: 0000000000000006 R12: 0000000000000000 [ 1.652676] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 1.659830] FS: 0000000000000000(0000) GS:ffff88043ec00000(0000) knlGS:0000000000000000 [ 1.667940] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 1.673707] CR2: 00000000039c2af5 CR3: 0000000001c0b000 CR4: 00000000000406f0 [ 1.680864] Stack: [ 1.682908] 0000000000000006 0000000000000001 0000000000000000 ffffffff81c9ced8 [ 1.690531] 0000000080000000 ffffffff8164b3d0 0000000000000000 ffffffff8164b3d9 [ 1.698153] ffffffff81c25380 ffffffff81656f5f 0000000000000000 0000000000000000 [ 1.705777] Call Trace: [ 1.708255] [] ? kernel_init_freeable+0xda/0x16a [ 1.714544] [] ? rest_init+0x70/0x70 [ 1.719793] [] ? kernel_init+0x9/0xe0 [ 1.725129] [] ? ret_from_fork+0x3f/0x70 [ 1.730724] [] ? rest_init+0x70/0x70 [ 1.735974] Code: d4 81 73 4d 8b 4b 08 85 c9 74 40 48 8b 13 4c 8b 4b 18 48 89 de 4c 8b 43 10 48 c7 c7 e0 4e 9d 81 e8 1c fe 9a ff 8b 53 08 48 89 d0 82 54 3c d1 81 01 48 89 1c d5 40 f2 d0 81 8b 15 c7 63 07 00 [ 1.758158] RIP [] do_annotated_initcalls+0x6f/0x25b [ 1.764845] RSP [ 1.768361] CR2: 00000000039c2af5 [ 1.771710] ---[ end trace 5a4348fb7eabd051 ]--- [ 1.776363] ------------[ cut here ]------------ [ 1.781010] WARNING: CPU: 0 PID: 1 at kernel/smp.c:292 smp_call_function_single+0xe7/0x100() [ 1.789472] Modules linked in: [ 1.792610] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G D 4.2.1-deps-00154-gb5f382c-dirty #768 [ 1.802112] Hardware name: System manufacturer System Product Name/F2A85-M, BIOS 6508 07/11/2014 [ 1.810921] 0000000000000000 ffffffff819d6fba ffffffff8164f11e 0000000000000000 [ 1.818542] ffffffff81039647 0000000000000000 ffffffff810c87c0 ffffffff81c22040 [ 1.826166] 0000000000000000 00000000039c2af5 ffffffff8109bc97 ffff88042d513cf8 [ 1.833790] Call Trace: [ 1.836267] [] ? dump_stack+0x40/0x50 [ 1.841603] [] ? warn_slowpath_common+0x87/0xd0 [ 1.847806] [] ? cpu_clock_event_start+0x30/0x30 [ 1.854095] [] ? smp_call_function_single+0xe7/0x100 [ 1.860729] [] ? task_function_call+0x42/0x50 [ 1.866760] [] ? perf_cgroup_switch+0x160/0x160 [ 1.872963] [] ? cgroup_exit+0xb0/0x130 [ 1.878470] [] ? do_exit+0x347/0x9a0 [ 1.883720] [] ? oops_end+0x8c/0xd0 [ 1.888882] [] ? no_context+0x123/0x370 [ 1.894392] [] ? page_fault+0x22/0x30 [ 1.899728] [] ? do_annotated_initcalls+0x6f/0x25b [ 1.906190] [] ? do_annotated_initcalls+0x69/0x25b [ 1.912653] [] ? kernel_init_freeable+0xda/0x16a [ 1.918941] [] ? rest_init+0x70/0x70 [ 1.924190] [] ? kernel_init+0x9/0xe0 [ 1.929526] [] ? ret_from_fork+0x3f/0x70 [ 1.935123] [] ? rest_init+0x70/0x70 [ 1.940371] ---[ end trace 5a4348fb7eabd052 ]--- [ 1.945023] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009 [ 1.945023] [ 1.954235] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009 --------- The bug happens because the code tried to uses foo[ID] and with an ID of 2177560225 it wents clearly out of bounds. ;) > >> If it's necessary, I could try put together a small patch which >> kills a system (reproducible here). > > That would help too, please also send me your .config and I'll try to > reproduce the issue here. Will do. Later. Thanks, Regards, Alexander Holler