From patchwork Wed Apr 27 18:53:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 8962041 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 618469F1C1 for ; Wed, 27 Apr 2016 18:56:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E34E20259 for ; Wed, 27 Apr 2016 18:56:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7B682026F for ; Wed, 27 Apr 2016 18:56:38 +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 1avUcM-0001Uc-06; Wed, 27 Apr 2016 18:55:22 +0000 Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1avUat-0006yL-CJ for linux-arm-kernel@lists.infradead.org; Wed, 27 Apr 2016 18:53:52 +0000 Received: by mail-qk0-x233.google.com with SMTP id n63so22697338qkf.0 for ; Wed, 27 Apr 2016 11:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/fYZc3jKfnIg/VrkHd0RwdakiR4lbb6j25MvYc0ToqY=; b=ER/FSo01ciJeS86yPywciEJmjs4O0iSjrhd5KiZ18U3AyInDpMt7OrgzyyS6cs5dxI WI+iiq8vjtl2IAAnetJ98YWCuGZ6eJnUDVrnmvcheTSuF786cXEOKbx7LU40jjJzykJN pTumxVGGfzsTh7C34nmmRw2vY0MVQTLSgonfo= 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=/fYZc3jKfnIg/VrkHd0RwdakiR4lbb6j25MvYc0ToqY=; b=IWBKMJ6Dh4nZx1bpK5OiNloWeWAbA+93dAvFZ7vcz21KXwu0y5YPbvltbq3E2V8752 a8s3cAD/YZp6W8diRH6qtzfyTiTuyOJJPZObOaOMGzptVTBTq3i8IK6FFOscT4NT4gP0 7gtwXZEJX8iGD58XmMmIwUnomLyLvqLOCO5M+gII43FfdmeLa2lfhyvqWSyQcHfr8bLf z6oXJ6ehIhsn6bzaQfT/WJUTdegTQ2+wHZDfS5T8CudO43pfcGtY592ogP4XCI3ZXpvc RSR75qS+Azwtomq6CMLcUFuJknx6PJFBPIzI+eEFy7q3tPYweahKb5o+3FJIIZ7FTPKo 8NXA== X-Gm-Message-State: AOPr4FVAhF7eydU2KupRMEC29GiNViUl9EXEa5kyjDkfG553wKfee6FmXMcygqUVkGjUE9Xw X-Received: by 10.55.20.83 with SMTP id e80mr10732184qkh.196.1461783210313; Wed, 27 Apr 2016 11:53:30 -0700 (PDT) Received: from solstice.hsd1.nh.comcast.net ([2601:191:8000:f700:ecf0:c045:ec9f:ed60]) by smtp.googlemail.com with ESMTPSA id b18sm1604432qkc.9.2016.04.27.11.53.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Apr 2016 11:53:29 -0700 (PDT) From: David Long To: Catalin Marinas , Will Deacon , Sandeepa Prabhu , William Cohen , Pratyush Anand , Steve Capper , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marc Zyngier Subject: [PATCH v12 10/10] kprobes: Add arm64 case in kprobe example module Date: Wed, 27 Apr 2016 14:53:05 -0400 Message-Id: <1461783185-9056-11-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1461783185-9056-1-git-send-email-dave.long@linaro.org> References: <1461783185-9056-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160427_115351_526308_9D882786 X-CRM114-Status: GOOD ( 11.17 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Petr Mladek , Viresh Kumar , John Blackwood , Feng Kan , Zi Shen Lim , Dave P Martin , Yang Shi , Vladimir Murzin , Kees Cook , "Suzuki K. Poulose" , Mark Brown , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ard Biesheuvel , Greg Kroah-Hartman , Mark Salyzyn , James Morse , Christoffer Dall , Andrew Morton , Robin Murphy , Jens Wiklander , Balamurugan Shanmugam 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=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 --- 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 727eb21..0c72b8a 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 } /*