Received: by 10.223.185.116 with SMTP id b49csp850869wrg; Wed, 21 Feb 2018 07:57:23 -0800 (PST) X-Google-Smtp-Source: AH8x225pJxX6myI78y6qigeSMzKjyr6NjK9o2Z4ji0wc/U6p+qiZ0ypI2YHrpQTZERs6B4qZoTCQ X-Received: by 10.99.125.78 with SMTP id m14mr3070890pgn.391.1519228642907; Wed, 21 Feb 2018 07:57:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519228642; cv=none; d=google.com; s=arc-20160816; b=maDMKhRZvo5h7Cz8243rJQhFY3LvEnQZ6yQe0CGb9Icyq5ttLoIvktFLZry4UacEgK A3+bIlqcoeyvURSFTv5wUvSnlfebQZ0szEyLQQ27E2vL0LbdkSPXQblXgdcl91cCAtIl rfoxs8bDxzGRSXbKaLQ2WNYy0SFz0XoEoFJlvLb0RUzIVOY7afYF/FM/3w0DXEYdCVs/ Wd1iOik9kh2pLzUmz0y3cR7NH0b5XxRzccS0D4DpptBaSYeDv5xfpRLvpIMn4BgZp5I0 LmK+6Pr8AY17J/Gh4e+177bfenVwwsXpWzcMiQrw7sKUzZbV0zdi5S7tJw1QAfBcsifE oEIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=4EV5cjs1G4xSR2P8p81mtrd1wiTmZc6XgEN32MIb6fI=; b=mNx7aaBa98OT6zc34VcBdf044AXw9g3/XaECJO0k+Yg82uu8QL5Zt/SnvUHPEnxatp SBLkIiTAZuBNZ4PQbz7et0AgjcbOVTexAQkjfHZmIUz0xKgwOm4KRGGpm4acXudkMigt mtWzj4NyyU7UapScQAtvuQU6Jdf9aa87aUQEfj0+MjjDEW1Lmoz3f8JB64zcZzpa/W4a JoLKtekx5WK3q6gFpHCIjg/qHqPCNbVwAMTgag8BYadSnyvKVSFJ5z4MVCGf7tM1bFEQ XkcKoJlSL/370CxoQY7n0QxXBS6cwTNCc3HB0MbJmTP3mrjcdQY0A0zavanNh+Tw8tqZ UIUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=UdWpPdDf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q10si61237pgd.335.2018.02.21.07.57.08; Wed, 21 Feb 2018 07:57:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=UdWpPdDf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752982AbeBUJQB (ORCPT + 99 others); Wed, 21 Feb 2018 04:16:01 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:38686 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752323AbeBUJP6 (ORCPT ); Wed, 21 Feb 2018 04:15:58 -0500 Received: by mail-wr0-f194.google.com with SMTP id n7so2354244wrn.5 for ; Wed, 21 Feb 2018 01:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=4EV5cjs1G4xSR2P8p81mtrd1wiTmZc6XgEN32MIb6fI=; b=UdWpPdDfIdJlU3GNDIfjo/Hccbtq7UuTBFKHjqbW/63YyKkK9asvGDqO0Ngeu6slst 0siwpdsCb7CvmSjre3eUc/D9nK3R188/L+5/Ni5/TtNcYHKrzqCb2FcGU8/hw9+K1EB9 +q+ZYub/tzz/IktAKoj4gBi3FeYi5BihUqLIq3z43BAvbGcJxO2oy0YyCxrvenqGW0AT G61QSRrEXDjeuxil3/K20+n71/RFM5JthnDNDTxWIMA/mwSYXGpNisMNZM3RoHlZnmRa DXyfrEAeizahTZrq0FCBCYvkXm5czmmxdsarqvTacwQTSuejFB3kN1wUVt5n3Gf5KrUf LkYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=4EV5cjs1G4xSR2P8p81mtrd1wiTmZc6XgEN32MIb6fI=; b=cJp2AORnD564B4MEMdU8FfP9kMqN06pwlT8fw7QGDcm2qHS72AuI3CuSonYd1puuIj y5kn5LMIO6AIqoxF8wlLlXt+WJ+OrtLgH1DX5u3gzjdHbo/htUZAcpZe4pj2lKg0KKjv 6ml1SNThtFPo5R4+pwokcBoG8FQbS8dytCk0ST60t6p84GGK0aBdsZHXgXWwOx9iuV7S jZX4+gYhjjHOESEb8xt2NKDaj0cw1z7isUZw12usinP5nKqtsOW1dN4csbzgDeANGDF6 ts7wL3bD95ajfSyiBLhAyWhBaWnN7p7TRQahCfxObrqgvppTGpBAeYkHgJKhgQG4o53q o9jA== X-Gm-Message-State: APf1xPC1U0HzepAc/vT13b47rF9UgYXuvgsV6yACkcvDG4ZG8l5IWaUp HG1wpUFSVh3O7Nzs3V3Wc1A= X-Received: by 10.223.157.135 with SMTP id p7mr2378420wre.33.1519204556634; Wed, 21 Feb 2018 01:15:56 -0800 (PST) Received: from gmail.com (2E8B0CD5.catv.pool.telekom.hu. [46.139.12.213]) by smtp.gmail.com with ESMTPSA id s80sm21584697wrc.93.2018.02.21.01.15.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Feb 2018 01:15:55 -0800 (PST) Date: Wed, 21 Feb 2018 10:15:53 +0100 From: Ingo Molnar To: Borislav Petkov Cc: Josh Poimboeuf , Andy Lutomirski , X86 ML , Peter Zijlstra , LKML Subject: Re: [PATCH 0/5] x86/dumpstack: Cleanups and user opcode bytes Code: section Message-ID: <20180221091553.gxnvhbitiewo2mjc@gmail.com> References: <20180219202826.19797-1-bp@alien8.de> <20180220192956.si2a6m3ckskexvte@treble> <20180220204435.GC24320@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180220204435.GC24320@pd.tnic> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Borislav Petkov wrote: > On Tue, Feb 20, 2018 at 01:29:56PM -0600, Josh Poimboeuf wrote: > > > Maybe this series already has this side-effect, but I'd really love to > > > see oopses show the code bytes for each kernel entry, not just the > > > innermode one. We already dump full regs including RIP -- adding > > > Code: should be easy and would be very helpful. > > > > Just to clarify, I think you want to show the Code: around regs->ip > > every time we show the registers? > > It is an easy change to always dump Code: section when we dump RIP:. > I.e., something like this: > > [ 33.192733] BUG: unable to handle kernel NULL pointer dereference at (null) > [ 33.196510] IP: sysrq_handle_crash+0x17/0x20 > [ 33.196691] PGD 78b12067 P4D 78b12067 PUD 78b7f067 PMD 0 > [ 33.196691] Oops: 0002 [#1] PREEMPT SMP > [ 33.196691] Modules linked in: > [ 33.196691] CPU: 6 PID: 3686 Comm: bash Not tainted 4.16.0-rc1+ #5 > [ 33.196691] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 > [ 33.196691] RIP: 0010:sysrq_handle_crash+0x17/0x20 > [ 33.196691] RSP: 0018:ffffc9000054bdf0 EFLAGS: 00010246 > [ 33.196691] Code: eb d1 e8 5d 17 b7 ff 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 e8 c6 24 bd ff c7 05 24 a2 19 01 01 00 00 00 0f ae f8 04 25 00 00 00 00 01 c3 0f 1f 44 00 00 e8 86 21 c2 ff fb e9 > [ 33.196691] RAX: 0000000000000000 RBX: 0000000000000063 RCX: 0000000000000000 > [ 33.196691] RDX: 0000000000000000 RSI: ffffffff8110145a RDI: 0000000000000063 > [ 33.196691] RBP: ffffffff82271400 R08: 0000000000000183 R09: 000000000002e771 > [ 33.196691] R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000000a > [ 33.196691] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 > [ 33.196691] FS: 00007ffff7fdb700(0000) GS:ffff88007ed80000(0000) knlGS:0000000000000000 > [ 33.196691] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 33.196691] CR2: 0000000000000000 CR3: 000000007aa9e000 CR4: 00000000000406e0 > [ 33.196691] Call Trace: > [ 33.196691] __handle_sysrq+0x9e/0x160 > [ 33.196691] write_sysrq_trigger+0x2b/0x30 > [ 33.196691] proc_reg_write+0x38/0x70 > [ 33.196691] __vfs_write+0x36/0x160 > [ 33.196691] ? __fd_install+0x69/0x110 > [ 33.196691] ? preempt_count_add+0x74/0xb0 > [ 33.196691] ? _raw_spin_lock+0x13/0x30 > [ 33.196691] ? set_close_on_exec+0x41/0x80 > [ 33.196691] ? preempt_count_sub+0xa8/0x100 > [ 33.196691] vfs_write+0xc0/0x190 > [ 33.196691] SyS_write+0x64/0xe0 > [ 33.196691] ? trace_hardirqs_off_thunk+0x1a/0x1c > [ 33.196691] do_syscall_64+0x70/0x130 > [ 33.196691] entry_SYSCALL_64_after_hwframe+0x42/0xb7 > [ 33.196691] RIP: 0033:0x7ffff74b9620 > [ 33.196691] RSP: 002b:00007fffffffe7a8 EFLAGS: 00000246 > [ 33.196691] Code: ff 73 01 c3 48 8b 0d 68 98 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d bd f1 2c 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ce 8f 01 00 48 89 04 > [ 33.196691] ORIG_RAX: 0000000000000001 > [ 33.196691] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007ffff74b9620 > [ 33.196691] RDX: 0000000000000002 RSI: 0000000000705408 RDI: 0000000000000001 > [ 33.196691] RBP: 0000000000705408 R08: 000000000000000a R09: 00007ffff7fdb700 > [ 33.196691] R10: 00007ffff77826a0 R11: 0000000000000246 R12: 00007ffff77842a0 > [ 33.196691] R13: 0000000000000002 R14: 0000000000000001 R15: 0000000000000000 > [ 33.196691] Code: eb d1 e8 5d 17 b7 ff 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 e8 c6 24 bd ff c7 05 24 a2 19 01 01 00 00 00 0f ae f8 04 25 00 00 00 00 01 c3 0f 1f 44 00 00 e8 86 21 c2 ff fb e9 > [ 33.196691] RIP: sysrq_handle_crash+0x17/0x20 RSP: ffffc9000054bdf0 > [ 33.196691] CR2: 0000000000000000 > [ 33.301033] ---[ end trace b97275941de8c6f4 ]--- > [ 33.302600] Kernel panic - not syncing: Fatal exception > [ 33.304529] Kernel Offset: disabled > [ 33.304973] ---[ end Kernel panic - not syncing: Fatal exception That looks really useful! Thanks, Ingo