From patchwork Sun Oct 14 19:23:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rabin Vincent X-Patchwork-Id: 1591601 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id A661CE00AD for ; Sun, 14 Oct 2012 19:26:00 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TNTn2-0005y9-8o; Sun, 14 Oct 2012 19:23:56 +0000 Received: from mail-la0-f49.google.com ([209.85.215.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TNTmn-0005vy-99 for linux-arm-kernel@lists.infradead.org; Sun, 14 Oct 2012 19:23:41 +0000 Received: by mail-la0-f49.google.com with SMTP id z14so2909029lag.36 for ; Sun, 14 Oct 2012 12:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=sCmr73LcFUWjem4IBBpK+JqgijH0Py2DkeDBUSPcJ90=; b=s/TGnq545SiFBffNLtNTuoJrjggqJs5LyYdYaZjCNUOwZMElxWEqzMUC8axLtgMnhD AX6yJ9b4FK9qYIgxn7LCfqn/rlCsAqxzinBZRS5I7cWxn8fIiD9e8AF232IfmnPqA6kX XBwF0waScq659CtlcGjgZpBfGfjAU9LLYAr1AQ7LB7jG5/4B6m01oZdTIbynGliugzTc XUo/4x7Bel2RbRQGtvwe543X90EGcD5MpgazxAGPrg0wpl/nESlYW7UK1E0jdZuJiLuQ srQLXTN4u3ilRIj5Bmn8GMcFhFki8cdUAVZ293/f4rEhcqQtW35UUONNtjZ/TDNSvyyc 7xYA== Received: by 10.152.106.162 with SMTP id gv2mr8154378lab.14.1350242619894; Sun, 14 Oct 2012 12:23:39 -0700 (PDT) Received: from localhost.localdomain (c83-254-195-218.bredband.comhem.se. [83.254.195.218]) by mx.google.com with ESMTPS id ef4sm556036lbb.13.2012.10.14.12.23.37 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 14 Oct 2012 12:23:38 -0700 (PDT) From: Rabin Vincent To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/9] uprobes: check for single step support Date: Sun, 14 Oct 2012 21:23:06 +0200 Message-Id: <1350242593-17761-2-git-send-email-rabin@rab.in> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1350242593-17761-1-git-send-email-rabin@rab.in> References: <1350242593-17761-1-git-send-email-rabin@rab.in> X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rabin.vincent[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Peter Zijlstra , Rabin Vincent , Srikar Dronamraju , oleg@redhat.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Check for single step support before calling user_enable_single_step(), since user_enable_single_step() just BUG()s if support does not exist. Needed by ARM. Signed-off-by: Rabin Vincent --- kernel/events/uprobes.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 98256bc..db4e3ab 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c @@ -1450,7 +1450,8 @@ static struct uprobe *find_active_uprobe(unsigned long bp_vaddr, int *is_swbp) void __weak arch_uprobe_enable_step(struct arch_uprobe *arch) { - user_enable_single_step(current); + if (arch_has_single_step()) + user_enable_single_step(current); } void __weak arch_uprobe_disable_step(struct arch_uprobe *arch)