From patchwork Tue Nov 18 06:32:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 40996 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 32F6B246D4 for ; Tue, 18 Nov 2014 06:33:07 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id 10sf12252864lbg.5 for ; Mon, 17 Nov 2014 22:33:06 -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=acVO2V07BZvt6qozfYy1TGj0Ra9KfXQyu4u+tW2xV9qiax2JfVizxjFMrz6gfbSzdz 2KWydorh3j74tZ2XV8x9Zgp20+QKkOVbCbQfyGLFknoYY2Z1K33WUaowkeyXjTrXoq7P 38bgdRa1OQFFbFL8JKGjogK6k5o/VSnHNP5AuknDgq5wAgK0EYCmJu9MRdMdroOIGI+H HA10PPwBsNPThNHQOwfqm+6sm5Q1Qp4p+LeKeje+1fYipliF6nnhGFWKfg6kS0V9UJ5+ PREDZyK51Q4jBizwPKS3PsMQpXII2MIadmEOy89s1h3pFtF6Wfrz9pYMzadaXxC4r/CU ID6w== X-Gm-Message-State: ALoCoQmGrDX2vHI+x8j8uMhrAxwKr0X77D0Q7o07A1NvLxz5Jam8wNkGfSfL3bziSPox31+JERyl X-Received: by 10.112.154.194 with SMTP id vq2mr1399957lbb.10.1416292386105; Mon, 17 Nov 2014 22:33:06 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.229 with SMTP id p5ls976448laf.4.gmail; Mon, 17 Nov 2014 22:33:05 -0800 (PST) X-Received: by 10.152.204.70 with SMTP id kw6mr16196633lac.85.1416292385961; Mon, 17 Nov 2014 22:33:05 -0800 (PST) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id kr10si54400516lac.72.2014.11.17.22.33.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 22:33:05 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by mail-lb0-f176.google.com with SMTP id 10so16941765lbg.21 for ; Mon, 17 Nov 2014 22:33:05 -0800 (PST) X-Received: by 10.112.189.10 with SMTP id ge10mr33202401lbc.23.1416292385794; Mon, 17 Nov 2014 22:33:05 -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.184.201 with SMTP id ew9csp1282131lbc; Mon, 17 Nov 2014 22:33:05 -0800 (PST) X-Received: by 10.224.54.195 with SMTP id r3mr24332793qag.73.1416292384076; Mon, 17 Nov 2014 22:33:04 -0800 (PST) Received: from mail-qg0-f50.google.com (mail-qg0-f50.google.com. [209.85.192.50]) by mx.google.com with ESMTPS id o1si67301167qat.26.2014.11.17.22.33.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 22:33:04 -0800 (PST) Received-SPF: pass (google.com: domain of dave.long@linaro.org designates 209.85.192.50 as permitted sender) client-ip=209.85.192.50; Received: by mail-qg0-f50.google.com with SMTP id e89so5194513qgf.23 for ; Mon, 17 Nov 2014 22:33:02 -0800 (PST) X-Received: by 10.140.104.65 with SMTP id z59mr40160481qge.75.1416292382677; Mon, 17 Nov 2014 22:33:02 -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 9sm36315651qau.37.2014.11.17.22.33.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 22:33:02 -0800 (PST) From: David Long To: linux-arm-kernel@lists.infradead.org, Russell King Cc: Sandeepa Prabhu , William Cohen , Catalin Marinas , Will Deacon , "Jon Medhurst (Tixy)" , Masami Hiramatsu , Ananth N Mavinakayanahalli , Anil S Keshavamurthy , , linux-kernel@vger.kernel.org Subject: [PATCH v3 4/5] kprobes: Add arm64 case in kprobe example module Date: Tue, 18 Nov 2014 01:32:54 -0500 Message-Id: <1416292375-29560-5-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1416292375-29560-1-git-send-email-dave.long@linaro.org> References: <1416292375-29560-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.217.176 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 } /*