From patchwork Mon Jun 27 03:06:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 9199851 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 6040760754 for ; Mon, 27 Jun 2016 03:12:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5416428555 for ; Mon, 27 Jun 2016 03:12:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46E6628564; Mon, 27 Jun 2016 03:12:03 +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 52FAD28555 for ; Mon, 27 Jun 2016 03:12:02 +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 1bHMwa-00057m-S0; Mon, 27 Jun 2016 03:10:40 +0000 Received: from mail-qt0-x233.google.com ([2607:f8b0:400d:c0d::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bHMtb-0000oj-2r for linux-arm-kernel@lists.infradead.org; Mon, 27 Jun 2016 03:07:36 +0000 Received: by mail-qt0-x233.google.com with SMTP id c34so16478595qte.0 for ; Sun, 26 Jun 2016 20:07:14 -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=2t5EN+nuTWbVoyoBg7aEBdBMCzeEuiB2hecOFM0zTTM=; b=Tiyx3QzLRXKtQ1xFSAxiuN29xN0dQrh/W3i96s/MiOCiu/oLxWkcElvDZ6NoeIX4ij NTncLqC0SqMzJPBPtEfxA7QpJapIyhJL18/S8Dx4EjpsQXnNafUBB6vMuWInPbepphKw TvDUqo0dZRiXbi8jmyEHaAvxOmyeAJo8/Ngzc= 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=2t5EN+nuTWbVoyoBg7aEBdBMCzeEuiB2hecOFM0zTTM=; b=QW3TmjfzNPRTVXgQmdJrlF6B3lilWfZQpWNft/NfDg1bPq1FVrpSx6vUtxIxDPN3fe 42rA1BylB/t3Nv9spnkSMx/LGKAGLMxOmaomK1hSmvjOc13TKl1glD2rGZnKpnDpjpqW RHzoddvYz3h0u6i+dgLvKq1faWS3j11PCzkDf5XeywnMgRWaFMjVZ4ITNbIV9SaaKdnH pNqI6FtcuX2ZRRSOTDVbhScroc3skCbNsUhsx79NDcei8wkLdmjxwq5r9k9gnDlk614k iaw8GaOGydGMv43EyXzUJzpWDKCwuq5/HlkCRijMBjHA+BMY8FUdesMdoifc3pAkoVk5 UDaQ== X-Gm-Message-State: ALyK8tKYaN8kViliNMBg420EYGZG541FSAIUEvTs1O535AJthCnXufyHwS90ghp2mOUqk/uI X-Received: by 10.200.45.178 with SMTP id p47mr20137041qta.27.1466996834023; Sun, 26 Jun 2016 20:07:14 -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 e187sm262769qkf.35.2016.06.26.20.07.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Jun 2016 20:07:13 -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 v14 10/10] kprobes: Add arm64 case in kprobe example module Date: Sun, 26 Jun 2016 23:06:53 -0400 Message-Id: <1466996813-23295-11-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1466996813-23295-1-git-send-email-dave.long@linaro.org> References: <1466996813-23295-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160626_200735_320334_57E53679 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 Signed-off-by: David A. Long --- 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 } /*