Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1293425
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!news.panservice.it!diesel.cu.mi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jeff Merkey <linux.mdb@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: 4.4-rc5 Setting hardware breakpoint in int_ret_from_sys_call causes triple fault/reboot |
| Date | Thu, 17 Dec 2015 01:40:02 +0100 |
| Message-ID | <qGuLU-ws-5@gated-at.bofh.it> (permalink) |
| References | <qGtwt-8ei-1@gated-at.bofh.it> <qGuiS-kX-11@gated-at.bofh.it> |
| X-Original-To | Andy Lutomirski <luto@amacapital.net> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OjOhGLAkFCVem0Hsgp872TOB0D9DuQOxiWi0I3u0VQg=; b=WfbADc2om2QvLoM1YtS0aqSTfRf2hrpyMjRGCDRn+GAdkCa9RjH51r3gfgr80l2wzi ecVnDaepTAbeLoMXH+BpuRbnLL/KKvpbNxaNfiOOrMHxZFKdbNtHYJS4B7wsiQ1Apate Z9YqKeGZ1b4iRRUDFRJ3gau4P+UgN85gA/6aDyFIjluVrjXxy+FqZG+eNY4M5W1JVxa5 q+Vr9hKwcje/XSoIoX9uWRvh71/2gQqRlc/z5c5Hz3zcScjYRbZKtV1oMWP5qDTxJps9 esYhlS8ZWUsEaST8DId0jkPsk1txEokwOaZcOg3N88CQ6sMV92yIzV2NNgnnVNXno7lR qsHQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.107.153.136 with SMTP id b130mr24979501ioe.83.1450312266868; Wed, 16 Dec 2015 16:31:06 -0800 (PST) |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 58 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Peter Zijlstra <peterz@infradead.org>, "H. Peter Anvin" <hpa@zytor.com>, X86 ML <x86@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@redhat.com> |
| X-Original-Date | Wed, 16 Dec 2015 17:31:06 -0700 |
| X-Original-Message-ID | <CAO6TR8XnSUggryZsY8t-64Ybsos1prsROihKkeUawHFgcwOZdQ@mail.gmail.com> |
| X-Original-References | <CAO6TR8XxBp3dO-5Hz6AKb=YW6LxFY+N4z-_jyxnkMOi4san-Zg@mail.gmail.com> <CALCETrUDZRAGahZqf76Wh3a-JLbZHUY9UfUtmpzxiZmhfmhTCQ@mail.gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1293425 |
Show key headers only | View raw
On 12/16/15, Andy Lutomirski <luto@amacapital.net> wrote: > On Dec 16, 2015 3:12 PM, "Jeff Merkey" <linux.mdb@gmail.com> wrote: >> >> Setting a hardware breakpoint at the >> >> rex64 sysret >> >> instruction at the end of int_ret_from_sys_call causes the system to >> triple fault >> and reboot when the breakpoint is triggered. Appears to be related >> the same problem >> as the lockup. >> >> This function can be stepped over and traced through with the TRAP >> FLAG set so long as a hardware breakpoint is set somewhere in the >> function. Otherwise upon exist the system hard hangs. If you break >> exactly on that instruction -- reboot. If you break a few >> instructions before it and single step through the call it works. If >> you step through the call with no breakpoint the system hard hangs. >> Same behavior as when you try to step from inside an nmi handler. >> Looks related. > > You're probably encountering the user mode RSP when SYSRET happens. > > --Andy > Hi Andy, Could be, but I am getting a double fault message with an error code of 0 that then scrolls off the screen when the triple fault hits. It flashes too quickly to get the function address -- wish I had a logic analyzer with an inverse assembler -- would already be there. A usermode RSP would I assume clear TRAP flag and that does not explain why it works if I set a breakpoint right above the instruction then step over it, which I can without the triple fault. Easy to reproduce, download the mdb debugger for 4.3.3 and apply it to 4.4-rc5, modprobe mdb, echo a > /proc/sysrq_trigger, u int_ret_from_syscall (scroll til you get to the swapgs then rex64 sysret, set a hardware breakpoint at that address , i.e. b ffffffff81673ae1 (or whatever address the swapgs instruction is at), then step through with t a few times (should just return after rex64 sysret since it returns to user space). The set a breakpoint at the rex64 sysret instruction, b <address>, let it break at the instruction, then hit g for go and watch the fireworks -- it will try to print a double fault message then reboot. I handle the whole user RSP thing, I just return if I see regs set to user space. This looks like some sort of problem in the exception handlers. Jeff -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
4.4-rc5 Setting hardware breakpoint in int_ret_from_sys_call causes triple fault/reboot Jeff Merkey <linux.mdb@gmail.com> - 2015-12-17 00:20 +0100
Re: 4.4-rc5 Setting hardware breakpoint in int_ret_from_sys_call causes triple fault/reboot Andy Lutomirski <luto@amacapital.net> - 2015-12-17 01:10 +0100
Re: 4.4-rc5 Setting hardware breakpoint in int_ret_from_sys_call causes triple fault/reboot Jeff Merkey <linux.mdb@gmail.com> - 2015-12-17 01:40 +0100
Re: 4.4-rc5 Setting hardware breakpoint in int_ret_from_sys_call causes triple fault/reboot Andy Lutomirski <luto@amacapital.net> - 2015-12-17 01:40 +0100
Re: 4.4-rc5 Setting hardware breakpoint in int_ret_from_sys_call causes triple fault/reboot Jeff Merkey <linux.mdb@gmail.com> - 2015-12-17 01:50 +0100
Re: 4.4-rc5 Setting hardware breakpoint in int_ret_from_sys_call causes triple fault/reboot Jeff Merkey <linux.mdb@gmail.com> - 2015-12-17 09:40 +0100
Re: 4.4-rc5 Setting hardware breakpoint in int_ret_from_sys_call causes triple fault/reboot Jeff Merkey <linux.mdb@gmail.com> - 2015-12-17 20:00 +0100
Re: 4.4-rc5 Setting hardware breakpoint in int_ret_from_sys_call causes triple fault/reboot Jeff Merkey <linux.mdb@gmail.com> - 2015-12-17 01:40 +0100
csiph-web