From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=34.238.86.106; helo=mail.paulo.ac; envelope-from=paulo@paulo.ac; receiver=edk2-devel@lists.01.org Received: from mail.paulo.ac (mail.paulo.ac [34.238.86.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BF99021F833B5 for ; Thu, 4 Jan 2018 05:32:03 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by mail.paulo.ac (Postfix) with ESMTP id 57054C78F5B; Thu, 4 Jan 2018 13:37:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at paulo.ac X-Spam-Flag: NO X-Spam-Score: -1.099 X-Spam-Level: X-Spam-Status: No, score=-1.099 tagged_above=-999 required=6.31 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Authentication-Results: mail.paulo.ac (amavisd-new); dkim=pass (1024-bit key) header.d=paulo.ac Received: from mail.paulo.ac ([127.0.0.1]) by localhost (mail.paulo.ac [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e3tXCz4AOaZK; Thu, 4 Jan 2018 13:36:49 +0000 (UTC) Received: from localhost (unknown [177.18.159.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.paulo.ac (Postfix) with ESMTPSA id CA81DC791AD; Thu, 4 Jan 2018 13:36:48 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.paulo.ac CA81DC791AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=paulo.ac; s=default; t=1515073009; bh=aT9joqgswvENb54dd02rjjLeP+87bL6GE5+Xt/tQBFw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=XC0RX/vZPqMaR7NeNewyqgkbpsCznf9rAw5S9oHej2Ok7gJwNvHRshxq9tfpD7+mw XKMG5pTZYfBTvH5xUD0VojNxvz8NMIvhE+MMUK53lCMnWEW8FIPX8y+Iv8I0mo6s04 iJUVFp90mrEnQnaihAD5HWFbN6ANZfRxqykCtcXs= From: Paulo Alcantara To: "Yao\, Jiewen" , "edk2-devel\@lists.01.org" Cc: Rick Bramley , "Dong\, Eric" , Andrew Fish , Laszlo Ersek In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503AA6F8E1@shsmsx102.ccr.corp.intel.com> References: <00e14f85d93a2e81ab008f32020f3048fe4857fb.1510662518.git.pcacjr@zytor.com> <74D8A39837DF1E4DA445A8C0B3885C503AA6F8E1@shsmsx102.ccr.corp.intel.com> Date: Thu, 04 Jan 2018 11:36:34 -0200 Message-ID: <87373lsq3h.fsf@paulo.ac> MIME-Version: 1.0 Subject: Re: [RFC v4 0/6] Stack trace support in X64 exception handling X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jan 2018 13:32:04 -0000 Content-Type: text/plain "Yao, Jiewen" writes: Hi Jiewen, > I tried to apply the patch series to latest code, but fail with below message. > > Have you rebased to latest code? Hrm - I thought I did before sending out v4. Sorry for that. I'll make sure to rebase it against latest master before sending out v5. Thanks Paulo > > =================== > git.exe am --3way --ignore-space-change --keep-cr "C:\home\EdkIIGit\edk2\[edk2]-[RFC-v4-1-6]-UefiCpuPkg-CpuExceptionHandlerLib-X64-Add-stack-trace-support.patch" > Applying: UefiCpuPkg/CpuExceptionHandlerLib/X64: Add stack trace support > Using index info to reconstruct a base tree... > M UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c > Falling back to patching base and 3-way merge... > Auto-merging UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c > CONFLICT (content): Merge conflict in UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c > Patch failed at 0001 UefiCpuPkg/CpuExceptionHandlerLib/X64: Add stack trace support > The copy of the patch that failed is found in: .git/rebase-apply/patch > When you have resolved this problem, run "git am --continue". > If you prefer to skip this patch, run "git am --skip" instead. > To restore the original branch and stop patching, run "git am --abort". > > .git/rebase-apply/patch:13: trailing whitespace. > // > .git/rebase-apply/patch:14: trailing whitespace. > // Unknown PDB file name > .git/rebase-apply/patch:15: trailing whitespace. > // > .git/rebase-apply/patch:16: trailing whitespace. > GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 *mUnknownPdbFileName = "????"; > .git/rebase-apply/patch:17: trailing whitespace. > > warning: squelched 369 whitespace errors > warning: 374 lines add whitespace errors. > error: Failed to merge in the changes. > > Fail > ================================================= > >> -----Original Message----- >> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Paulo >> Alcantara >> Sent: Friday, December 29, 2017 11:49 AM >> To: edk2-devel@lists.01.org >> Cc: Rick Bramley ; Dong, Eric >> ; Andrew Fish ; Yao, Jiewen >> ; Laszlo Ersek >> Subject: [edk2] [RFC v4 0/6] Stack trace support in X64 exception handling >> >> Hi, >> >> This series adds stack trace support during IA32 and X64 CPU exceptions. >> >> Informations like back trace, stack contents and image module names >> (that were part of the call stack) will be dumped out. >> >> The current limitation is that it relies on available frame pointers >> (GCC only) in order to successfully unwind the stack. >> >> (Sorry for the very long delay - I was very busy working on something >> else and then went to vacations) >> >> Jiewen, >> >> I have tested it with VS2015x86 and the stack trace just hanged when >> printing out the first EIP (that is, no frame pointer at all). >> >> Thanks! >> Paulo >> >> Repo: https://github.com/pcacjr/edk2.git >> Branch: stacktrace_v4 >> >> Cc: Rick Bramley >> Cc: Andrew Fish >> Cc: Eric Dong >> Cc: Laszlo Ersek >> Cc: Brian Johnson >> Cc: Jeff Fan >> Cc: Jiewen Yao >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Paulo Alcantara >> --- >> >> v1 -> v2: >> * Add IA32 arch support (GCC toolchain only) >> * Replace hard-coded stack alignment value (16) with >> CPU_STACK_ALIGNMENT. >> * Check for proper stack and frame pointer alignments. >> * Fix initialization of UnwoundStacksCount to 1. >> * Move GetPdbFileName() to common code since it will be used by both >> IA32 and X64 implementations. >> >> v2 -> v3: >> * Fixed wrong assumption about "RIP < ImageBase" to start searching >> for another PE/COFF image. That is, RIP may point to lower and >> higher addresses for any other PE/COFF images. Both IA32 & X64. >> (Thanks Andrew & Jiewen) >> * Fixed typo: unwond -> unwound. Both IA32 & X64. (Thanks Brian) >> >> v3 -> v4: >> * Validate all frame/stack pointer addresses before dereferencing them >> as requested by Brian & Jiewen. >> * Correctly print out IP addresses during the stack traces (by Jeff) >> >> Paulo Alcantara (6): >> UefiCpuPkg/CpuExceptionHandlerLib/X64: Add stack trace support >> UefiCpuPkg/CpuExceptionHandlerLib: Export GetPdbFileName() >> UefiCpuPkg/CpuExceptionHandlerLib/Ia32: Add stack trace support >> UefiCpuPkg/CpuExceptionHandlerLib: Add helper to valid memory >> addresses >> UefiCpuPkg/CpuExceptionHandlerLib: Ensure valid frame/stack pointers >> UefiCpuPkg/CpuExceptionHandlerLib: Correctly print IP addresses >> >> UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.c >> | 484 ++++++++++++++++++-- >> UefiCpuPkg/Library/CpuExceptionHandlerLib/CpuExceptionCommon.h >> | 41 +- >> UefiCpuPkg/Library/CpuExceptionHandlerLib/Ia32/ArchExceptionHandler.c | >> 445 +++++++++++++++++- >> UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/ArchExceptionHandler.c | >> 384 +++++++++++++++- >> 4 files changed, 1296 insertions(+), 58 deletions(-) >> >> -- >> 2.14.3 >> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel