From patchwork Mon Apr 20 20:19:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 6244211 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 05B889F313 for ; Mon, 20 Apr 2015 20:23:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 31EAD20361 for ; Mon, 20 Apr 2015 20:23:22 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A05C20172 for ; Mon, 20 Apr 2015 20:23:21 +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 1YkIBz-0008EG-JB; Mon, 20 Apr 2015 20:21:19 +0000 Received: from mail-qk0-f175.google.com ([209.85.220.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YkIB3-0006eb-7E for linux-arm-kernel@lists.infradead.org; Mon, 20 Apr 2015 20:20:23 +0000 Received: by qku63 with SMTP id 63so198311980qku.3 for ; Mon, 20 Apr 2015 13:19:58 -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; bh=QPuP7FEzwxlXi3R4uMm4/M4/85EcoP8OoNN+mQd5pQI=; b=WreZur7OKu9l/swN3utZGQUVKkzQUV5YhJ+pW6LQsiJZLxhawyJnSg2MuBJFTMZw7h cFxEzGz/xjynP8ov7i2sgJzKsVqZUmQQCnD2ZFPI7FAfBMmbqOcI5M8niu5fbRyuzjoX V/eiU1EkKIM/JCyiGBp84amOWt88Ly/j+ZxSu9zSnImfslLui5sAPUTUGgLMIUybZ3Xr udIeJKFiUiagWE+O44RbP4zeG7aQDfdytQcEvO6kO4Xbeqkmt3xORC3B7C1jV6m5gMrp XDPAHyJPRT7UQm289wMFB3d/BiyxWjIJJgp5hID8L4sI3cpQ0aP1RUagGDpie/C3GBRi bS3Q== X-Gm-Message-State: ALoCoQmNxP/QoQFoltkG1jexR/QbDgsLCu03mcVfRhsv6c3tvjlNNBOq5R8xfO/cOmyw6/txbeoc X-Received: by 10.55.31.32 with SMTP id f32mr31725569qkf.81.1429561198893; Mon, 20 Apr 2015 13:19:58 -0700 (PDT) Received: from localhost.localdomain (pool-72-71-243-249.cncdnh.fast00.myfairpoint.net. [72.71.243.249]) by mx.google.com with ESMTPSA id 77sm15240386qhf.44.2015.04.20.13.19.57 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Apr 2015 13:19:58 -0700 (PDT) From: David Long To: linux-arm-kernel@lists.infradead.org, Russell King Subject: [PATCH v6 6/6] kprobes: Add arm64 case in kprobe example module Date: Mon, 20 Apr 2015 16:19:47 -0400 Message-Id: <1429561187-3661-7-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1429561187-3661-1-git-send-email-dave.long@linaro.org> References: <1429561187-3661-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150420_132021_403018_8F6B181D X-CRM114-Status: GOOD ( 10.26 ) X-Spam-Score: -1.0 (-) Cc: "Jon Medhurst \(Tixy\)" , Steve Capper , Ananth N Mavinakayanahalli , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Anil S Keshavamurthy , Masami Hiramatsu , sandeepa.s.prabhu@gmail.com, William Cohen , davem@davemloft.net X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sandeepa Prabhu Add info prints in sample kprobe handlers for ARM64 Signed-off-by: Sandeepa Prabhu --- samples/kprobes/kprobe_example.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/samples/kprobes/kprobe_example.c b/samples/kprobes/kprobe_example.c index 366db1a..51d459c 100644 --- a/samples/kprobes/kprobe_example.c +++ b/samples/kprobes/kprobe_example.c @@ -42,6 +42,10 @@ static int handler_pre(struct kprobe *p, struct pt_regs *regs) " ex1 = 0x%lx\n", p->addr, regs->pc, regs->ex1); #endif +#ifdef CONFIG_ARM64 + pr_info("pre_handler: p->addr = 0x%p, pc = 0x%lx\n", + p->addr, (long)regs->pc); +#endif /* A dump_stack() here will give a stack backtrace */ return 0; @@ -67,6 +71,10 @@ static void handler_post(struct kprobe *p, struct pt_regs *regs, printk(KERN_INFO "post_handler: p->addr = 0x%p, ex1 = 0x%lx\n", p->addr, regs->ex1); #endif +#ifdef CONFIG_ARM64 + pr_info("post_handler: p->addr = 0x%p, pc = 0x%lx\n", + p->addr, (long)regs->pc); +#endif } /*