Message ID | 3c3c8088926c1e50520f817a7e266b0cafb52966.1470114993.git.panand@redhat.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 517C96077C for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 2 Aug 2016 05:33:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40D3D28501 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 2 Aug 2016 05:33:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3567128504; Tue, 2 Aug 2016 05:33:34 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id D3C8828501 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 2 Aug 2016 05:33:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bUSJE-0006xf-7Q; Tue, 02 Aug 2016 05:32:08 +0000 Received: from mail-pa0-f41.google.com ([209.85.220.41]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bUSJ3-0006gN-32 for linux-arm-kernel@lists.infradead.org; Tue, 02 Aug 2016 05:32:00 +0000 Received: by mail-pa0-f41.google.com with SMTP id fi15so59869532pac.1 for <linux-arm-kernel@lists.infradead.org>; Mon, 01 Aug 2016 22:31:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=wMyQMFo/J2G47qcLWhQjvwbyZw0GvKBHYV4O3CJTO+E=; b=RKSsJRtYOtUwiFPIOJKx1/v/Mt9jxYz05Y4D90ANJczVHxmxMnychodqje98F9BV7p aOG2DBl3mpquEClO27BJobPZTi+d3MGIKTNLXL9U4LVZNy0RE9o56nBEPJ8kiqQLDrjK uSnwKXcm7jk1Ngx2BZE6X6aJYeUtFBzBwXn2x731kLbmKvAQnUPAuVszEWfK9dp9cRGN RFaMNENjrARX+wkl0BdmzZz8Y9zxzOHPmN5fLKNoL+qvMC4Jyl99MZU0hu5BHoF2c+hL VcuYUym7ru6UybtOZACFXFwLJWPz/EOHjqHoAMnrjX+BLmcQhkCdGpqRW0WLVTiOJVWq qhrg== X-Gm-Message-State: AEkoouunqb/h6ZOuFJwWQKy125brEAJke79MPdaGNoGWoIOFpHxGwE1m+1E0W+4GSNuUTIID X-Received: by 10.66.54.35 with SMTP id g3mr102133643pap.30.1470115895615; Mon, 01 Aug 2016 22:31:35 -0700 (PDT) Received: from localhost ([122.180.189.31]) by smtp.gmail.com with ESMTPSA id 5sm1176718pac.34.2016.08.01.22.31.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Aug 2016 22:31:35 -0700 (PDT) From: Pratyush Anand <panand@redhat.com> To: linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com Subject: [PATCH 2/5] arm64: kgdb_step_brk_fn: ignore other's exception Date: Tue, 2 Aug 2016 11:00:06 +0530 Message-Id: <3c3c8088926c1e50520f817a7e266b0cafb52966.1470114993.git.panand@redhat.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <cover.1470114993.git.panand@redhat.com> References: <cover.1470114993.git.panand@redhat.com> In-Reply-To: <cover.1470114993.git.panand@redhat.com> References: <cover.1470114993.git.panand@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160801_223157_306415_E1FBD0D0 X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 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: Pratyush Anand <panand@redhat.com>, Daniel Thompson <daniel.thompson@linaro.org>, steve.capper@linaro.org, srikar@linux.vnet.ibm.com, vijaya.kumar@caviumnetworks.com, linux-kernel@vger.kernel.org, oleg@redhat.com, dave.long@linaro.org, wcohen@redhat.com, Adam Buchbinder <adam.buchbinder@gmail.com>, Masami Hiramatsu <mhiramat@kernel.org> 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 |
diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgdb.c index 8c57f6496e56..e126f2b15002 100644 --- a/arch/arm64/kernel/kgdb.c +++ b/arch/arm64/kernel/kgdb.c @@ -244,6 +244,9 @@ NOKPROBE_SYMBOL(kgdb_compiled_brk_fn); static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr) { + if (!kgdb_single_step) + return DBG_HOOK_ERROR; + kgdb_handle_exception(1, SIGTRAP, 0, regs); return 0; }
ARM64 step exception does not have any syndrome information. So, it is responsibility of exception handler to take care that they handle it only if exception was raised for them. Since kgdb_step_brk_fn() always returns 0, therefore we might have problem when we will have other step handler registered as well. This patch fixes kgdb_step_brk_fn() to return error in case of step handler was not meant for kgdb. Signed-off-by: Pratyush Anand <panand@redhat.com> --- arch/arm64/kernel/kgdb.c | 3 +++ 1 file changed, 3 insertions(+)