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: 42947 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f197.google.com (mail-we0-f197.google.com [74.125.82.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8EE3C218E0 for ; Sun, 11 Jan 2015 04:03:42 +0000 (UTC) Received: by mail-we0-f197.google.com with SMTP id w61sf7070304wes.0 for ; Sat, 10 Jan 2015 20:03:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=QPuP7FEzwxlXi3R4uMm4/M4/85EcoP8OoNN+mQd5pQI=; b=MDHvEpPT9HNX7bwk8tLlwS8flo3d/EWl9zvc3482dV8wbY5EhdA4yU6Kfv1bwupew/ +wEFfRSULsfGWGeH+67y4rjrrhAcRDSZhDO4gAmHtbRTV/23xuvXd/uyKHy/V7PWkXs+ CY4BNQJU17jjZxdEbpYz+OItdAv6pvRD2e1Trj4CYI1tkhrH/gb5XXKgkDo7yDBDgGWB 9+uAJc+Ei+J8E88o8q5vXmFTZDjMU1gyPzZZkOfDrDG1Be4/ykjb/SjX+m/ZBExYeB7M ZqKdcPdFvR/kRkp7L9yKPYFR7N7H2AKF3g02oPYNNFZPzSrQ33ZP3dGSEULIoAiXCeMj Otsw== X-Gm-Message-State: ALoCoQmHclHei9+ffarLQ1BM9vndpUNNu1tWKdj0v5bQ4YwltWGb5HogdxnmbP0qpa9BEfLvq0i3 X-Received: by 10.180.228.38 with SMTP id sf6mr1320435wic.5.1420949021878; Sat, 10 Jan 2015 20:03:41 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.104 with SMTP id x8ls600161laj.4.gmail; Sat, 10 Jan 2015 20:03:41 -0800 (PST) X-Received: by 10.112.91.43 with SMTP id cb11mr29779140lbb.63.1420949021727; Sat, 10 Jan 2015 20:03:41 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id zp10si17731371lbb.104.2015.01.10.20.03.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 10 Jan 2015 20:03:41 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id gd6so19922571lab.1 for ; Sat, 10 Jan 2015 20:03:41 -0800 (PST) X-Received: by 10.152.87.100 with SMTP id w4mr30050887laz.71.1420949021655; Sat, 10 Jan 2015 20:03:41 -0800 (PST) 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.112.9.200 with SMTP id c8csp744918lbb; Sat, 10 Jan 2015 20:03:41 -0800 (PST) X-Received: by 10.224.23.133 with SMTP id r5mr29466441qab.88.1420949012056; Sat, 10 Jan 2015 20:03:32 -0800 (PST) Received: from mail-qc0-f178.google.com (mail-qc0-f178.google.com. [209.85.216.178]) by mx.google.com with ESMTPS id a5si18059356qat.0.2015.01.10.20.03.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 10 Jan 2015 20:03:32 -0800 (PST) Received-SPF: pass (google.com: domain of dave.long@linaro.org designates 209.85.216.178 as permitted sender) client-ip=209.85.216.178; Received: by mail-qc0-f178.google.com with SMTP id p6so14373267qcv.9 for ; Sat, 10 Jan 2015 20:03:31 -0800 (PST) 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 Cc: Sandeepa Prabhu , William Cohen , Steve Capper , Catalin Marinas , Will Deacon , "Jon Medhurst (Tixy)" , Masami Hiramatsu , Ananth N Mavinakayanahalli , Anil S Keshavamurthy , , linux-kernel@vger.kernel.org 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: dave.long@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) 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: , 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 } /*