From patchwork Mon Jun 15 19:07:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 6611961 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 6CC2D9F1C1 for ; Mon, 15 Jun 2015 19:29:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E84920489 for ; Mon, 15 Jun 2015 19:29:18 +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 82E962047D for ; Mon, 15 Jun 2015 19:29:17 +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 1Z4a0K-00021p-Cl; Mon, 15 Jun 2015 19:25:08 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z4a0H-0001U9-SF for linux-arm-kernel@bombadil.infradead.org; Mon, 15 Jun 2015 19:25:06 +0000 Received: from mail-qk0-f180.google.com ([209.85.220.180]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z4ZjS-0004QE-6Z for linux-arm-kernel@lists.infradead.org; Mon, 15 Jun 2015 19:07:43 +0000 Received: by qkhq76 with SMTP id q76so58951583qkh.2 for ; Mon, 15 Jun 2015 12:07:19 -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=B+hRkvdrJzH98ZKPQra7p+2SRSk8fQ8Zq6x1YdExkZtqsrMxAtLhccSXCXGJzbyo90 /6IWZkFpUxKQStkTQBS20OIRTUmqq7b5veGtyQl3UAF6D65Yaii8s9uUXhmenfD0T5wy uR5UtnoFkZMhfjKh5awCMDqAQHvdC37S/CKIv+I4ulBE7/kxS6EjwueYjltV+QX7jrb3 ge467EYt6sV7T4hPC8Bh+LDfWkGR7hN8IysFmzPMMOZfY00Mmdo9ARKBzMWjGjDSeF+i 8rruQvETXCqrMcOdcnQIUC2hTWPYVRcoxH+rP3Wd8D/G/p2rXIr2Z/eCvBxogdi4bmgi pTCg== X-Gm-Message-State: ALoCoQn7fb4Pc9Bi8/e9Fsgu3e1W4k5LLkF2wYZCV6y0lIJfRpx0EozNYO2uEu7CP+nQwBrDvU1+ X-Received: by 10.55.16.67 with SMTP id a64mr63008315qkh.31.1434395239766; Mon, 15 Jun 2015 12:07:19 -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 6sm6748404qks.37.2015.06.15.12.07.18 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 15 Jun 2015 12:07:19 -0700 (PDT) From: David Long To: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, Russell King Subject: [PATCH v7 7/7] kprobes: Add arm64 case in kprobe example module Date: Mon, 15 Jun 2015 15:07:09 -0400 Message-Id: <1434395229-6654-8-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1434395229-6654-1-git-send-email-dave.long@linaro.org> References: <1434395229-6654-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150615_200742_340979_92A8E943 X-CRM114-Status: GOOD ( 10.92 ) X-Spam-Score: -2.6 (--) Cc: "Jon Medhurst \(Tixy\)" , Steve Capper , Ananth N Mavinakayanahalli , linux-kernel@vger.kernel.org, Anil S Keshavamurthy , Masami Hiramatsu , Mark Brown , 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.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 } /*