From patchwork Tue Feb 17 23:11:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 5841991 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 308F79F373 for ; Tue, 17 Feb 2015 23:15:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6970020212 for ; Tue, 17 Feb 2015 23:15:20 +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 366EE201FA for ; Tue, 17 Feb 2015 23:15:19 +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 1YNrKM-0005oq-VR; Tue, 17 Feb 2015 23:13:14 +0000 Received: from mail-qa0-f46.google.com ([209.85.216.46]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YNrJM-0005Mf-9A for linux-arm-kernel@lists.infradead.org; Tue, 17 Feb 2015 23:12:15 +0000 Received: by mail-qa0-f46.google.com with SMTP id n4so28701660qaq.5 for ; Tue, 17 Feb 2015 15:11:50 -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=cm92gqRUPZks4ZzC3/kivbS9462fZHHnvgvcit5n8bUYwQEphxaTo6ehChhAZXrGvL 6qWug52dVs6Jlb+8lW3F+KM+xaflmrpD9mMel8W1mxO35uT+n4/X3FUxJ0YM8X7SpCKP KTpOCiqexLRkd9z6DBMuamYrxYJ2AjAmpfpvsmY5h9UDlMLfEUxG3IuHFSKt5xosS4S6 oMECI0M1mCx4gzrKkpaqi/lUs3/PQrrWdory5mupJsu4R1pYEMhh6a4E/AfVdxK7SEOl TEAwNRIVtOeAZ8it342TL9S3eAsR1umF3pxOeUPR7EkGrcWJwZmCxj23GxCRoNSK+oca dcGw== X-Gm-Message-State: ALoCoQmBgaow6XQ6uPy6uoH6hRGIXWfTLo/Re6xxqZMaL3hnmQWFWFkiTw7UNpz1KxrT+xhr7vRn X-Received: by 10.140.88.80 with SMTP id s74mr649345qgd.28.1424214710782; Tue, 17 Feb 2015 15:11:50 -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 e2sm4320004qaf.47.2015.02.17.15.11.49 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Feb 2015 15:11:50 -0800 (PST) From: David Long To: linux-arm-kernel@lists.infradead.org, Russell King Subject: [PATCH v5 6/6] kprobes: Add arm64 case in kprobe example module Date: Tue, 17 Feb 2015 18:11:41 -0500 Message-Id: <1424214701-4899-7-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1424214701-4899-1-git-send-email-dave.long@linaro.org> References: <1424214701-4899-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150217_151212_445141_4E41839C X-CRM114-Status: UNSURE ( 9.55 ) 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 Acked-by: Masami Hiramatsu --- 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 } /*