Message ID | 1521630645-46715-1-git-send-email-maninder1.s@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3A54F60385 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 21 Mar 2018 11:12:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30CE029804 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 21 Mar 2018 11:12:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2435A29806; Wed, 21 Mar 2018 11:12:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2AD2929804 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 21 Mar 2018 11:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:List-Owner; bh=9hM9fqn8RmRl8VHlf40qA7r9PZ3txiQrmLOuXbovhTg=; b=no BD2/OS1Bm7/p4AW8VTh84FRzOLs/WgcFWgiGh/XaFI2qfgfSNg71oIHsEfeZ58ivYMaNw4vlD554A pzdGDOHhJzy6HUubGW4ykdFMIh8xkqIaZOb0WnkpvIywwj2QjClujPG7yAZSWVd3gLhmLJRPX8/q4 pLk5478/F8vOpNGgtwXHL2hLCaF16K7T7QeHFX0CwMpPEidz2rIRCu5C+xmB6CikRBux1DuPx/jic SJi2wPuu3Iwm6afz4B1PwYFyyQBSP1TsOLEU/i6Uu9kyGhme8d/zCClUoxS3RQH/3dEVCZFHBHIXw s9yF7QqtaJqXbLI0HizXjfubHN8nlFrw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1eybf7-0004xN-86; Wed, 21 Mar 2018 11:12:09 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1eybey-0004sY-6t for linux-arm-kernel@lists.infradead.org; Wed, 21 Mar 2018 11:12:07 +0000 Received: from epcas5p3.samsung.com (unknown [182.195.41.41]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20180321111139epoutp04a77b6264ec00e91afe20a42db9b4c15f~d6w9Fwhjr2120921209epoutp04_ for <linux-arm-kernel@lists.infradead.org>; Wed, 21 Mar 2018 11:11:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20180321111139epoutp04a77b6264ec00e91afe20a42db9b4c15f~d6w9Fwhjr2120921209epoutp04_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1521630699; bh=O8Ua5l55I5DsIHKv+b6z1kU9o2V6MkPzhD47xAK0vQo=; h=From:To:Cc:Subject:Date:References:From; b=B/XVL2QgDVj/T6FYfg0XLDB0vHLgF7bRj+cl13NweXUAVRXpE25hOSbJ+sucpsTbN kHKYL/47pn0UgmiRIaDxSmhVtKY4B8PqhxVLa7P8WfUDyTFipexMntbeR3hVIKvNyE Mt2YksClffWX+mlcV23TWkA1EpHsfU4sQvJT2dx8= Received: from epsmges5p1new.samsung.com (unknown [182.195.40.77]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20180321111139epcas5p225c24bcae00d531f530b7d2501cd420c~d6w8s_iZ40095400954epcas5p2P; Wed, 21 Mar 2018 11:11:39 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id B1.B4.04386.BED32BA5; Wed, 21 Mar 2018 20:11:39 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p4.samsung.com (KnoxPortal) with ESMTPA id 20180321111139epcas5p4d5b75f4e1b572ae4e55aef737cd6d8e9~d6w8Plo311815718157epcas5p4k; Wed, 21 Mar 2018 11:11:39 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180321111138epsmtrp22836e4645e5e23c6584620b11811dbe4~d6w8LrGrE3102931029epsmtrp2J; Wed, 21 Mar 2018 11:11:38 +0000 (GMT) X-AuditID: b6c32a49-025ff70000001122-2c-5ab23deb8cfc Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id C1.9E.03698.AED32BA5; Wed, 21 Mar 2018 20:11:38 +0900 (KST) Received: from localhost.localdomain (unknown [107.108.92.210]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20180321111134epsmtip275731712e058ff73a7e471ff4291abae~d6w3wTo891747617476epsmtip2B; Wed, 21 Mar 2018 11:11:33 +0000 (GMT) From: Maninder Singh <maninder1.s@samsung.com> To: linux@armlinux.org.uk, dustinb@codeaurora.org Subject: [PATCH v2] arm/stacktrace: stop unwinding after an invalid address. Date: Wed, 21 Mar 2018 16:40:45 +0530 Message-Id: <1521630645-46715-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA0WSe0hTcRTH+e1udzdrcZtmp0k2LvSHwubu2PQuXA8SWyVhT2hR66K/1HJ3 496ZGVSWZWFZ2eMfcxRYlgaZjyxmQk2yxDDMspf0fr+oZtKDqF2v0X/fc76f8+BwKEL/RmOg CoQAFgW+kCFj1G2dScmm985mt+VAnYHra8fc6z21JNf8fEDD9YdqSC58pANxncfK1dyjD+dV XLg7iGZRrv6BPsLVv69S5Wo5sdW1r7UBuSLNidkaN07Px3wuFo1YyPHlFgh5TmbBEs8cjz3V wppYB5fGGAXei51MRla2KbOgMLoJY9zAFxZFU9m8JDEpM9JFX1EAG/N9UsDJrGRZq5m1pJmt VqvZZl813WqPImtwft3wXa3/JLXxdtcgKkXbtBWIooC2we8XEypQDKWn2xEEh1pRBRoTDb4i uNibphjDCHrOPiRkQy6oCh8lFaMDwZ7gIbUSDCE4+Xk/KVMkbYaG0CW1rONoFpre1SMZIujr CL5f+KGSjVg6C0K1H0YgNT0NSkvvaGWto+fCzcflamVcInR3HdLIxUBvIyG4f6dKWTwDjjws UZhYeHetVatoA0Q+dZAKX4Zg8PQ3QgkOI/gafDradSY8uXd15AIEnQSNoRQl7YSD4cgIQtDj ofLXi9FZOthdrleQabDj/jmNohMg8uXLaEcX3GupRIqeDb0PbmnkUj29CjpfFh9AidX/Zx1H qAFNxn7Jm4clu58VcLFZ4r1SkZBnzvF5m9HIlyXPu4iqe7PCiKYQM07HxTe59Rp+g1TiDSOg CCZO1xaJpnS5fMkmLPo8YlEhlsLIHr1lFWGYmOOL/qwQ8LA2h8WWmprGWiwOGzNJN3tRhltP 5/EBvB5jPxb/1amoMYZSFOdY+Ky2ONF4rCl9kcodE7t83eR427kLV47SY3WmZZMGk1f0iTdO oZ/fEmLHi2/Lznz+2BPKTBIckczyqTtIjaFsVy0/0L2p6vLeofo/9a9CO7Xb+5cmHITGejSf 3lvTVeJL9xs3/yj7KK3eMmW4raWiZ/HalomeBtOssC9rKL6aUUv5PJtMiBL/FzkWpDR7AwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupnluLIzCtJLcpLzFFi42LZdlhJXveV7aYog92txhYXd6daPO9ezGax 6fE1VovLu+awWRyaupfR4vD8NhaLe2+2MlkcOjmX0YHD4/K1i8wel/t6mTw2L6n36NuyitHj 8ya5ANYoLpuU1JzMstQifbsEroxl366zFyzlqLhy7A5jA2MjexcjJ4eEgInExEOz2UBsIYHd jBK7j1tDxKUlfv57zwJhC0us/PccqJ4LqOYTo0TXq6lgCTYBPYlVu/aA2SICxhKHP3xlBili FjjHKLG96wAjSEJYwEdi1+I3YEUsAqoSDQ1XwTbzCrhLnL/fBrVBTuLkscmsExh5FjAyrGKU TC0ozk3PLTYsMMxLLdcrTswtLs1L10vOz93ECA4mLc0djJeXxB9iFOBgVOLhnSCxMUqINbGs uDL3EKMEB7OSCO+2z0Ah3pTEyqrUovz4otKc1OJDjNIcLErivE/zjkUKCaQnlqRmp6YWpBbB ZJk4OKUaGMNn6FWYVAe/6N4xwT8sZP/n756JyauOL7tQ6LIn8Zuvxq0LAnyya1vvhy9+fe1N CvNduV5bfrc/b6onfg3w2BsWKmPa4Htm9qy08Oz7wpkVy5mzGTrOh93hkkj87SX3eKrRPalt 8n/X3OiVPjTzYMMzrnZuwxfiV1esF1/nLi97ejvHdFad90osxRmJhlrMRcWJAIdo0NAiAgAA X-CMS-MailID: 20180321111139epcas5p4d5b75f4e1b572ae4e55aef737cd6d8e9 X-Msg-Generator: CA X-MTR: 20180321111139epcas5p4d5b75f4e1b572ae4e55aef737cd6d8e9 CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20180321111139epcas5p4d5b75f4e1b572ae4e55aef737cd6d8e9 X-RootMTR: 20180321111139epcas5p4d5b75f4e1b572ae4e55aef737cd6d8e9 References: <CGME20180321111139epcas5p4d5b75f4e1b572ae4e55aef737cd6d8e9@epcas5p4.samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180321_041200_436029_0D399DAD X-CRM114-Status: GOOD ( 14.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Vaneet Narang <v.narang@samsung.com>, a.sahrawat@samsung.com, linux-kernel@vger.kernel.org, Maninder Singh <maninder1.s@samsung.com>, linux-arm-kernel@lists.infradead.org, pankaj.m@samsung.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Hi Russell, >__dabt_usr+0x44/0x60 >0xb6748ea4 >^^^^^^^^ >--- a/arch/arm/kernel/stacktrace.c >+++ b/arch/arm/kernel/stacktrace.c >@@ -92,6 +92,9 @@ static int save_trace(struct stackframe *frame, void *d) > > regs = (struct pt_regs *)frame->sp; > >+ if (!__kernel_text_address(regs->ARM_pc)) >+ return 1; >+ > trace->entries[trace->nr_entries++] = regs->ARM_pc; Any Inputs or Comments on this patch to avoid storing user space entries during unwind. Regards, Vaneet Narang
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c index a56e7c8..1aadffc 100644 --- a/arch/arm/kernel/stacktrace.c +++ b/arch/arm/kernel/stacktrace.c @@ -92,6 +92,9 @@ static int save_trace(struct stackframe *frame, void *d) regs = (struct pt_regs *)frame->sp; + if (!__kernel_text_address(regs->ARM_pc)) + return 1; + trace->entries[trace->nr_entries++] = regs->ARM_pc; return trace->nr_entries >= trace->max_entries;