From patchwork Thu Oct 17 11:17:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sandeepa Prabhu X-Patchwork-Id: 3060311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A0191BF924 for ; Thu, 17 Oct 2013 11:22:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AB4B201E9 for ; Thu, 17 Oct 2013 11:22:37 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC51A20459 for ; Thu, 17 Oct 2013 11:22:32 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWldS-00054V-7n; Thu, 17 Oct 2013 11:20:59 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWld1-0000zx-5i; Thu, 17 Oct 2013 11:20:31 +0000 Received: from mail-pb0-f49.google.com ([209.85.160.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWlcJ-0000rB-7M for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2013 11:19:50 +0000 Received: by mail-pb0-f49.google.com with SMTP id xb12so2164026pbc.22 for ; Thu, 17 Oct 2013 04:19:25 -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=Alu4KKn75c+U6OcMRVa2FisjKZua/bL02dmFFAPtUkQ=; b=MsneMTQSGDYtihrN+Ny9F6Zxy7BLK5kjZfS54GwtmNeoGf1vJvtzK/XpqLb0jqB9JD p9stMYyivChi+uwSbWFSc7BUMct9h4vWR7kX99OfDglrD2HEnyw0IRQoBUGnS9gRSXnJ wOdZnhdWaqwCrsW8P8pM/DaxWYCt1eTIqZC5Z39U811nOhQsy67j62MiSChDgyhD8Wdo wwzAC2ziJssMTjLw0VlB2VjMFwN98+utkvZNmqJEZjcj7vmwBfr7Q1fJwmYzB1hvqC4f EyJLayOhXUk6tGsfA1InA1Ed49EnUw1UQlW4IJDc6OndwKyukSmTNLltCdFYkmOh+ZtU RkKQ== X-Gm-Message-State: ALoCoQnLwaRhGS/T7UYOaUaWSnYss6hpSZ8YW/eXcScG2I2lYzfL54QIGVzsBgBHfE7aWgVVN6oB X-Received: by 10.68.172.36 with SMTP id az4mr8054823pbc.48.1382008765404; Thu, 17 Oct 2013 04:19:25 -0700 (PDT) Received: from linaro-workstation.ban.broadcom.com ([202.122.18.226]) by mx.google.com with ESMTPSA id 7sm113711981paf.22.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Oct 2013 04:19:24 -0700 (PDT) From: Sandeepa Prabhu To: linux-arm-kernel@lists.infradead.org Subject: [PATCH RFC 6/6] kprobes: Add cases for arm and arm64 in sample module Date: Thu, 17 Oct 2013 16:47:51 +0530 Message-Id: <1382008671-4515-7-git-send-email-sandeepa.prabhu@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1382008671-4515-1-git-send-email-sandeepa.prabhu@linaro.org> References: <1382008671-4515-1-git-send-email-sandeepa.prabhu@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131017_071947_439955_D6895CF1 X-CRM114-Status: UNSURE ( 7.88 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.6 (-) Cc: linaro-kernel@lists.linaro.org, steve.capper@linaro.org, srikar@linux.vnet.ibm.com, patches@linaro.org, Sandeepa Prabhu , catalin.marinas@arm.com, Vijaya.Kumar@caviumnetworks.com, nico@linaro.org, will.deacon@arm.com, linux-kernel@vger.kernel.org, rostedt@goodmis.org, dsaxena@linaro.org, masami.hiramatsu.pt@hitachi.com, jiang.liu@huawei.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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=-3.6 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 Add info prints in sample kprobe handlers for ARM and ARM64 architecture. Signed-off-by: Sandeepa Prabhu --- samples/kprobes/kprobe_example.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/samples/kprobes/kprobe_example.c b/samples/kprobes/kprobe_example.c index 366db1a..0521246 100644 --- a/samples/kprobes/kprobe_example.c +++ b/samples/kprobes/kprobe_example.c @@ -42,6 +42,14 @@ static int handler_pre(struct kprobe *p, struct pt_regs *regs) " ex1 = 0x%lx\n", p->addr, regs->pc, regs->ex1); #endif +#ifdef CONFIG_ARM + printk(KERN_INFO "pre_handler: p->addr = 0x%p, pc = 0x%lx\n", + p->addr, regs->ARM_pc); +#endif +#ifdef CONFIG_ARM64 + printk(KERN_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 +75,14 @@ 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_ARM + printk(KERN_INFO "post_handler: p->addr = 0x%p, pc = 0x%lx\n", + p->addr, regs->ARM_pc); +#endif +#ifdef CONFIG_ARM64 + printk(KERN_INFO "post_handler: p->addr = 0x%p, pc = 0x%lx\n", + p->addr, (long)regs->pc); +#endif } /*