Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964942AbbDWLrT (ORCPT ); Thu, 23 Apr 2015 07:47:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47546 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757584AbbDWLrP (ORCPT ); Thu, 23 Apr 2015 07:47:15 -0400 Message-ID: <5538DB9C.2020401@redhat.com> Date: Thu, 23 Apr 2015 13:46:36 +0200 From: Denys Vlasenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Brian Gerst CC: Steven Rostedt , Oleg Nesterov , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Andy Lutomirski , Linus Torvalds , Andy Lutomirski , Will Drewry , =?UTF-8?B?RnLDqWTDqXJpYyBXZWlzYmVja2Vy?= , Alexei Starovoitov , Linux Kernel Mailing List , Kees Cook , Thomas Gleixner , linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/vdso] x86/vdso32/syscall.S: Do not load __USER32_DS to %ss References: <63da6d778f69fd0f1345d9287f6764d58be519fa.1427482099.git.luto@kernel.org> <5538B978.3060307@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2443 Lines: 76 On 04/23/2015 01:28 PM, Brian Gerst wrote: >> Looking at the error message: >> >>> Unhandled exception: stack overflow in 32-bit code (0xf779bc07). >>> Register dump: >>> CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b >>> EIP:f779bc07 ESP:00aed60c EBP:00aed750 EFLAGS:00010216( R- -- I -A-P- ) >>> EAX:00000040 EBX:00000010 ECX:00aed750 EDX:00000040 >>> ESI:00000040 EDI:7ffd4000 >> >> it is not coming from Wine itself, looks like it's from Windows code, >> and I'd guess it just tells us that they got exception 12, >> without further information on the cause. > > The backtrace shows the fault is in the VDSO, the first pop > instruction after returning from the kernel. Yes, I understand at which insn exception happens. I meant that *the message* is not generated by Wine or kernel. grep for "Unhandled exception:" comes up empty on their source trees. After much grepping, I see that I'm wrong. It does come from wine: void info_win32_exception(void) { const EXCEPTION_RECORD* rec; ADDRESS64 addr; char hexbuf[MAX_OFFSET_TO_STR_LEN]; if (!dbg_curr_thread->in_exception) { dbg_printf("Thread isn't in an exception\n"); return; } rec = &dbg_curr_thread->excpt_record; memory_get_current_pc(&addr); /* print some infos */ dbg_printf("%s: ", dbg_curr_thread->first_chance ? "First chance exception" : "Unhandled exception"); switch (rec->ExceptionCode) { case EXCEPTION_BREAKPOINT: dbg_printf("breakpoint"); break; case EXCEPTION_SINGLE_STEP: dbg_printf("single step"); break; case EXCEPTION_INT_DIVIDE_BY_ZERO: dbg_printf("divide by zero"); break; case EXCEPTION_INT_OVERFLOW: dbg_printf("overflow"); break; case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: dbg_printf("array bounds"); break; case EXCEPTION_ILLEGAL_INSTRUCTION: dbg_printf("illegal instruction"); break; case EXCEPTION_STACK_OVERFLOW: dbg_printf("stack overflow"); break; ... I hoped we can easily make Wine show exception's error code. Not that easy :/ -- 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/