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: 21095 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f198.google.com (mail-gg0-f198.google.com [209.85.161.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2C63D25B8B for ; Thu, 17 Oct 2013 11:19:27 +0000 (UTC) Received: by mail-gg0-f198.google.com with SMTP id j1sf3221876ggn.5 for ; Thu, 17 Oct 2013 04:19:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Alu4KKn75c+U6OcMRVa2FisjKZua/bL02dmFFAPtUkQ=; b=NY6VbKoQQZsgo3LALO6mKWZHcPE4GYMdLyfcfl6Pbswsw0dRi+/jyKt4BscfNyBqi0 xaXAFMesAL8lV2WVWX5scOtti1yqFrKn9BT2kAXZAcHnZu281neRsLHah4NmVjRukSH6 LFDLiJeWrzV8qQEDWe7IPYlvwtJipNGIcUSyrpVBCGGUp6yE8ogg648erv8ZQTqDOKMZ Il+TLev/BU0esPvMLJjrnODhWmyYx2TYMbycBQnCAK3dlUunrvLw6C4zIC1XYeqU1+O2 6qtAWh+qHNoo755gUXYfjekeqyKTZLpdb1A407LdUFYx7nzNOAd8QkaZfHyFPqmEB8HI SHdA== X-Received: by 10.236.90.67 with SMTP id d43mr7634172yhf.36.1382008766923; Thu, 17 Oct 2013 04:19:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.43 with SMTP id f11ls824778qey.33.gmail; Thu, 17 Oct 2013 04:19:26 -0700 (PDT) X-Received: by 10.58.215.135 with SMTP id oi7mr252366vec.27.1382008766804; Thu, 17 Oct 2013 04:19:26 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id sc5si26088004vdc.48.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Oct 2013 04:19:26 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id oz11so899825veb.22 for ; Thu, 17 Oct 2013 04:19:26 -0700 (PDT) X-Gm-Message-State: ALoCoQkttLanDr+JyeJTSiyXY2lpjZFDVnFo8DZepGpDqlMJ8K3BlZk0GZD2pxljjbcI5TzsTBXS X-Received: by 10.58.254.200 with SMTP id ak8mr6514819ved.12.1382008766723; Thu, 17 Oct 2013 04:19:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp111931vcz; Thu, 17 Oct 2013 04:19:26 -0700 (PDT) X-Received: by 10.68.163.132 with SMTP id yi4mr7803772pbb.158.1382008765828; Thu, 17 Oct 2013 04:19:25 -0700 (PDT) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by mx.google.com with ESMTPS id gu5si13868443pac.130.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 17 Oct 2013 04:19:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.181 is neither permitted nor denied by best guess record for domain of sandeepa.prabhu@linaro.org) client-ip=209.85.192.181; Received: by mail-pd0-f181.google.com with SMTP id y13so2545353pdi.26 for ; Thu, 17 Oct 2013 04:19:25 -0700 (PDT) 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 Cc: linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, steve.capper@linaro.org, nico@linaro.org, srikar@linux.vnet.ibm.com, rostedt@goodmis.org, masami.hiramatsu.pt@hitachi.com, dsaxena@linaro.org, jiang.liu@huawei.com, Vijaya.Kumar@caviumnetworks.com, Sandeepa Prabhu 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sandeepa.prabhu@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 } /*