From patchwork Sun Jan 11 04:03:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 5605591 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 D23C79F358 for ; Sun, 11 Jan 2015 04:09:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06E2220584 for ; Sun, 11 Jan 2015 04:09:06 +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 2B57920582 for ; Sun, 11 Jan 2015 04:09:05 +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 1YA9mx-0003iL-C7; Sun, 11 Jan 2015 04:06:07 +0000 Received: from mail-qa0-f48.google.com ([209.85.216.48]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YA9kn-0001Dr-BL for linux-arm-kernel@lists.infradead.org; Sun, 11 Jan 2015 04:03:57 +0000 Received: by mail-qa0-f48.google.com with SMTP id v8so1780103qal.7 for ; Sat, 10 Jan 2015 20:03:31 -0800 (PST) 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=Xqk99kVHFI35tVMrhw9Dx4c/P4TN9o6BKDKCAq7xVZmVnNittfXwvdk9YSGMGC1HNR nykLBRBxGdo7uPCUKnalMKzzerlZLRnQV0B11E5AIVh1buc80V0fzV0Y1b4rlQGWPLkM WmhSKkem+QkOqEZAjrJk9BLM0/lcs3orTP7sYHHOVwIwOWVjWRD4G5WVsYRtY39b/0IV s8kTQcT6aM8TYOOvuv7k+qBtEJsh0lTUHvZYLCkuTfl0XauBWLYGTi8CJg4qDydQD/g0 Ar8Na8q/DhNdBbWKrepP8PYr65Zs5XKSa+/OkmETVbcs+lYQn/chMcus4VaKBov0kdqr BMtw== X-Gm-Message-State: ALoCoQluR8/wsWg22N1Hst9RZk8xHE8gHXce9eyLQ86mriNzo3SxYOCu6gtm3rCmkIHqAAM0MHoy X-Received: by 10.140.41.169 with SMTP id z38mr37239011qgz.56.1420949011436; Sat, 10 Jan 2015 20:03:31 -0800 (PST) Received: from localhost.localdomain (pool-72-71-243-249.cncdnh.fast00.myfairpoint.net. [72.71.243.249]) by mx.google.com with ESMTPSA id l91sm11357784qge.34.2015.01.10.20.03.30 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 10 Jan 2015 20:03:31 -0800 (PST) From: David Long To: linux-arm-kernel@lists.infradead.org, Russell King Subject: [PATCH v4 6/6] kprobes: Add arm64 case in kprobe example module Date: Sat, 10 Jan 2015 23:03:21 -0500 Message-Id: <1420949002-3726-7-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1420949002-3726-1-git-send-email-dave.long@linaro.org> References: <1420949002-3726-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150110_200353_517100_C9D691F7 X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: "Jon Medhurst \(Tixy\)" , Steve Capper , Ananth N Mavinakayanahalli , Sandeepa Prabhu , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Anil S Keshavamurthy , Masami Hiramatsu , 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 } /*