From patchwork Wed Aug 26 19:32:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 7079731 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3DED4BEEC1 for ; Wed, 26 Aug 2015 19:35:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 51D1820835 for ; Wed, 26 Aug 2015 19:35:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0A3EF20791 for ; Wed, 26 Aug 2015 19:35:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZUgRb-0002Dx-Oy; Wed, 26 Aug 2015 19:33:11 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZUgRW-00026n-67 for linux-arm-kernel@lists.infradead.org; Wed, 26 Aug 2015 19:33:06 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 4FA691416C8; Wed, 26 Aug 2015 19:32:45 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 313AA1416CB; Wed, 26 Aug 2015 19:32:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0BAAA1416C8; Wed, 26 Aug 2015 19:32:43 +0000 (UTC) Date: Wed, 26 Aug 2015 12:32:42 -0700 From: Stephen Boyd To: Russell King - ARM Linux Subject: [PATCH] ARM: Add unwinding to __clear_user_std() conflicts (next-20150825) Message-ID: <20150826193242.GA28744@codeaurora.org> References: <55dc65d7.040bc20a.609e.6686@mx.google.com> <20150825233051.GA21612@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150825233051.GA21612@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150826_123306_295740_9BD3D753 X-CRM114-Status: GOOD ( 18.51 ) X-Spam-Score: -4.0 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Tyler Baker , linux-kernel@vger.kernel.org, "kernelci.org bot" , Kernel Build Reports Mailman List Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add unwinding annotations so that unwinding from this function works properly. Signed-off-by: Stephen Boyd --- On 08/26, Russell King - ARM Linux wrote: > > Looking at the oops dumps you have, it's really quite annoying that they > do not contain a proper backtrace. I also have to ask why your logs > seem to screw up on the PC/LR values in the oops dumps - they seem to > be completely missing. > This fixes the stacktrace for me so that it's actually readable. CPU: 1 PID: 1 Comm: init Not tainted 4.2.0-rc8-next-20150825-00012-g7b30062de23c-dirty #170 Hardware name: Qualcomm (Flattened Device Tree) task: ee0a8000 ti: ee0b0000 task.ti: ee0b0000 PC is at __clear_user_std+0x16/0x78 LR is at padzero+0x47/0x54 pc : [] lr : [] psr: 60000033 sp : ee0b1ea8 ip : 00000002 fp : 00000000 r10: 001de22e r9 : 00000000 r8 : ee122300 r7 : ee0b1eb8 r6 : ed8d0300 r5 : 00000000 r4 : 00000051 r3 : 00000055 r2 : 00000000 r1 : 00000dd2 r0 : 001de22e Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA Thumb Segment none Control: 50c5787d Table: 2d8d806a DAC: 00000051 Process init (pid: 1, stack limit = 0xee0b0210) Stack: (0xee0b1ea8 to 0xee0b2000) 1ea0: 00000dd2 c02f103b ee124200 c02f175b 00001812 000001cd 1ec0: 001e2a20 00000000 ee122300 00000000 00000000 001e2a20 001de22e 00000001 1ee0: 00000000 00008000 00008000 001dd870 001de22e 001d5870 00000051 00000055 1f00: 00000000 ee0b1eb8 beffffde ed8d0300 ef7f7160 c02c1cfb 00000001 c0865324 1f20: ed8d0300 c0862ca4 fffffff8 00000001 c0852fe0 ed8d0300 00000000 c02c1e7f 1f40: ee0a8000 ee033000 ee126000 ee0b1f58 00000001 c02c2f1f 00000001 ed8d6038 1f60: 00000000 ee0a8280 c0851118 00000000 c0852f50 00000000 00000000 00000000 1f80: 00000000 00000000 00000000 c02c3039 00000000 c02094f5 00000000 c08da000 1fa0: c059f2b5 c059f2d7 00000000 c020e4d5 00000000 00000000 00000000 00000000 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [] (__clear_user_std) from [] (padzero+0x47/0x54) [] (padzero) from [] (load_elf_binary+0x573/0xe74) [] (load_elf_binary) from [] (search_binary_handler+0x4f/0x124) [] (search_binary_handler) from [] (do_execveat_common+0x3df/0x4e0) [] (do_execveat_common) from [] (do_execve+0x19/0x1c) [] (do_execve) from [] (kernel_init+0x23/0x9c) [] (kernel_init) from [] (ret_from_fork+0x11/0x3c) Code: 0c03 d011 f1bc 0f02 (f880) 2000 diff --git a/arch/arm/lib/clear_user.S b/arch/arm/lib/clear_user.S index 970d6c043774..e936352ccb00 100644 --- a/arch/arm/lib/clear_user.S +++ b/arch/arm/lib/clear_user.S @@ -9,6 +9,7 @@ */ #include #include +#include .text @@ -20,6 +21,8 @@ */ ENTRY(__clear_user_std) WEAK(arm_clear_user) +UNWIND(.fnstart) +UNWIND(.save {r1, lr}) stmfd sp!, {r1, lr} mov r2, #0 cmp r1, #4 @@ -44,6 +47,7 @@ WEAK(arm_clear_user) USER( strnebt r2, [r0]) mov r0, #0 ldmfd sp!, {r1, pc} +UNWIND(.fnend) ENDPROC(arm_clear_user) ENDPROC(__clear_user_std)