From patchwork Fri Jun 3 03:26:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 9151613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CA3F86074E for ; Fri, 3 Jun 2016 03:29:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBEDC27BFA for ; Fri, 3 Jun 2016 03:29:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B04712832B; Fri, 3 Jun 2016 03:29:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 74CB327BFA for ; Fri, 3 Jun 2016 03:29:52 +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 1b8fmf-0002WA-FD; Fri, 03 Jun 2016 03:28:29 +0000 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b8flL-0001H1-1u for linux-arm-kernel@lists.infradead.org; Fri, 03 Jun 2016 03:27:08 +0000 Received: by mail-qk0-x22f.google.com with SMTP id i187so42763249qkd.3 for ; Thu, 02 Jun 2016 20:26:46 -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=68nmo+Lr/Svyap1CLkdWZbOkfYo65mbTOInZ22X1dgs=; b=MnUJuMcfM+Z4wB5SuKicO+265NUkfK8ja4MCVEBja7/QGPuWofIZeef46PEAi/RaEK yQJfbxPuhEkHv3K2izT9QP3NGT25CI7rCquE00L2f3h0jhNIo/9WSg1As7i2w9j6YZfZ SKuwTF5njJZSSU6wZDqL+w1lBHvrUeKHOhaEo= 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=68nmo+Lr/Svyap1CLkdWZbOkfYo65mbTOInZ22X1dgs=; b=Pu3XRgtN50svzdUOc9WYl+Y8/6uT8UrrT4j8QWKbiCUUNeavy8i3hjOFQoJFtjnGaO tBIcif6NOC1VCD9efU5A4M7u24IMy29XXmHlIM24xmWQ5dVHZwIqpVU8r+r9Wri83Dhr MnmOqguUJ4LG5DF0lG3xpw3ilUl6vM1dl/Jmuxs13oaiI8ac32qkYOf5acIX0B5I+Qyo ULsXjDP8PovhmOM3yfkhTghA/o+Yv/8SPSE9hmhW5oB3CvA+ouZyj39LmubfZNn7kVXe 6IMCxlyH3A9EGiTdIpeTXVMwqMnhuuG15EX78b0HWAQ0tlGbYD8rx0CmFh1JI/l+YBAg yTqw== X-Gm-Message-State: ALyK8tLbvV60LaDaQfw2gAgPSIh2bkpZ+zQRYecO/1vKCdmxorMtRmZMBVzm65cJHmmEILe+ X-Received: by 10.55.55.20 with SMTP id e20mr1263990qka.11.1464924406025; Thu, 02 Jun 2016 20:26:46 -0700 (PDT) Received: from localhost.localdomain (pool-72-71-243-181.cncdnh.fast00.myfairpoint.net. [72.71.243.181]) by smtp.googlemail.com with ESMTPSA id 30sm359841qgx.19.2016.06.02.20.26.44 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 02 Jun 2016 20:26:45 -0700 (PDT) From: David Long To: Catalin Marinas , Huang Shijie , James Morse , Marc Zyngier , Pratyush Anand , Sandeepa Prabhu , Will Deacon , William Cohen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Steve Capper , Masami Hiramatsu , Li Bin Subject: [PATCH v13 10/10] kprobes: Add arm64 case in kprobe example module Date: Thu, 2 Jun 2016 23:26:24 -0400 Message-Id: <1464924384-15269-11-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1464924384-15269-1-git-send-email-dave.long@linaro.org> References: <1464924384-15269-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160602_202707_358898_4DFFA794 X-CRM114-Status: GOOD ( 11.40 ) 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: Jisheng Zhang , Mark Rutland , Daniel Thompson , Vladimir Murzin , Petr Mladek , Ard Biesheuvel , Jens Wiklander , Robin Murphy , Mark Brown , Suzuki K Poulose , Dave P Martin , Andrey Ryabinin , yalin wang , Yang Shi , Zi Shen Lim , John Blackwood , Andrew Morton , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Adam Buchbinder , Christoffer Dall MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sandeepa Prabhu Add info prints in sample kprobe handlers for ARM64 Signed-off-by: Sandeepa Prabhu Acked-by: Masami Hiramatsu --- 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 ed0ca0c..aad8e6f 100644 --- a/samples/kprobes/kprobe_example.c +++ b/samples/kprobes/kprobe_example.c @@ -46,6 +46,10 @@ static int handler_pre(struct kprobe *p, struct pt_regs *regs) " ex1 = 0x%lx\n", p->symbol_name, 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; @@ -71,6 +75,10 @@ static void handler_post(struct kprobe *p, struct pt_regs *regs, printk(KERN_INFO "<%s> post_handler: p->addr = 0x%p, ex1 = 0x%lx\n", p->symbol_name, 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 } /*