From patchwork Fri Jul 8 16:35:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 9221439 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 65DA460572 for ; Fri, 8 Jul 2016 16:39:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56CD9264F4 for ; Fri, 8 Jul 2016 16:39:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B30C26538; Fri, 8 Jul 2016 16:39:57 +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 CE78E264F4 for ; Fri, 8 Jul 2016 16:39:56 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLYnX-0006eU-7l; Fri, 08 Jul 2016 16:38:39 +0000 Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bLYlb-0004BN-81 for linux-arm-kernel@lists.infradead.org; Fri, 08 Jul 2016 16:36:41 +0000 Received: by mail-qk0-x236.google.com with SMTP id t127so40518541qkf.1 for ; Fri, 08 Jul 2016 09:36:18 -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=TeI0CIF2/kOAaSeiXsyBAFNgB6fnPasgqQuGn5V0WeY=; b=EE6NWiTd0n8zbKWH+wtNh19NE5h3eZ25TvJu9f60zPaaXHbu8VQIYWXHidxo/BCzpw r3oQzmq9q/wJlqbCo0QxuiOBaHbsbCtT7XpERDaGvAyJBN1L3rNTXYrY4LUut1v+MwgU Qqv2pqor5+RvnqyfLqVATEg0mLGBa4vo2r2I4= 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=TeI0CIF2/kOAaSeiXsyBAFNgB6fnPasgqQuGn5V0WeY=; b=FZke+rOWfIgpzEml++WXOMIz1xCAM46H5GEvc9HANWWEraFIIk3Asgy0jYJ/E3otk6 iBPPvyd71wc5Jdqv65VlvP+MTIhOtczX9A8Fou/GVHSMQkUhk43/fZdzL5kNFau/U9Yh KR6IKSnNvzI7HCeHQALBy8npMJeSGW87k2K/Vm0AFBi14RaErJqZlbesoOIUhEnziAAd YBIR3GSFg0/LjftN/uZWbwVV/oHqv81JLNmF2o7KSMu0ikNmNkl6Hr8JlOLgau8xjKc/ f5N0DJoOO2IzBIBeJfpvh8egKSeBs5u7s4fDgU1xGpeXE2+94ueQrrfUE5bGH6mEquWv qS2g== X-Gm-Message-State: ALyK8tJ6v+a1o/lPHdBqrryIvvcbsIEa2WrGsi1T6lGqPE6XFwNJzdMlw5B9pH+w4CvLiCaD X-Received: by 10.55.64.65 with SMTP id n62mr7920066qka.98.1467995778119; Fri, 08 Jul 2016 09:36:18 -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 l27sm2254627qtc.34.2016.07.08.09.36.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Jul 2016 09:36:17 -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 v15 10/10] kprobes: Add arm64 case in kprobe example module Date: Fri, 8 Jul 2016 12:35:54 -0400 Message-Id: <1467995754-32508-11-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1467995754-32508-1-git-send-email-dave.long@linaro.org> References: <1467995754-32508-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160708_093639_715330_06E274C5 X-CRM114-Status: GOOD ( 11.12 ) 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 Signed-off-by: David A. Long Acked-by: Masami Hiramatsu --- samples/kprobes/kprobe_example.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/samples/kprobes/kprobe_example.c b/samples/kprobes/kprobe_example.c index ed0ca0c..f3b61b4 100644 --- a/samples/kprobes/kprobe_example.c +++ b/samples/kprobes/kprobe_example.c @@ -46,6 +46,11 @@ 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("<%s> pre_handler: p->addr = 0x%p, pc = 0x%lx," + " pstate = 0x%lx\n", + p->symbol_name, p->addr, (long)regs->pc, (long)regs->pstate); +#endif /* A dump_stack() here will give a stack backtrace */ return 0; @@ -71,6 +76,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("<%s> post_handler: p->addr = 0x%p, pstate = 0x%lx\n", + p->symbol_name, p->addr, (long)regs->pstate); +#endif } /*