From patchwork Wed Mar 9 05:32:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Long X-Patchwork-Id: 8542361 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CAB17C0553 for ; Wed, 9 Mar 2016 05:37:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F0D52201EF for ; Wed, 9 Mar 2016 05:37:31 +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 20E652015A for ; Wed, 9 Mar 2016 05:37:31 +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 1adWmm-0000hW-Tu; Wed, 09 Mar 2016 05:35:53 +0000 Received: from mail-pf0-x22f.google.com ([2607:f8b0:400e:c00::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1adWlC-0006EE-Uo for linux-arm-kernel@lists.infradead.org; Wed, 09 Mar 2016 05:34:19 +0000 Received: by mail-pf0-x22f.google.com with SMTP id u190so1622077pfb.3 for ; Tue, 08 Mar 2016 21:33:54 -0800 (PST) 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=jhO89N6PnL1zfS3BwvM/YTC1qHrUFsEi6VWqGyMwvCriypW2Om09tBe5Rs1Qrmq/Sa RS1uMYmpnxo0LaYp0rObbijhVmoeoA2pw5r1Mr4ciUjgeDGIOS4t9u+Nl387uUDuQgaH GA8ZLd8Paey1Ny0UQEvpWzAaWp1D4UOuLIpjY= 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=moFAjOS7RWLRHfOkEAkDudJSvvAosYydqqiMJDlrd3FNuq5TaQ6gV657fK8YQUwFRH 3xFbD/5tj715WFugfizuj3dTWGJhYRpqr2UZ8R3y0KHTQgO+f5FPhkzsbmxetEqM3ye0 tPKw7+Yqsmn/CQIe36x60vs5Ipkz05WK/lgVCvmfePmSyoCS9bbQ2wUSXuzMDZCwFIxz 5WwcPi4Q4TpMAGM2Ds2+ocg9TWPYvDODY30I/kqenXrd7DCl7ogd2BS2tPAfzTqkwb77 6gtKaI62mEJ4UhBg7nFE+iG/N3eCPw/zfBJ0pG3Di+vF/yjeh3Kdfm9Np78297yddkIx m6JQ== X-Gm-Message-State: AD7BkJJ7DvM9Ypq293xK83uOOBSKGuW/e+9jG6sJM/ViOV+MdouHSa7UEUj/UdzX+8rtcjlS X-Received: by 10.98.68.73 with SMTP id r70mr48225020pfa.136.1457501634258; Tue, 08 Mar 2016 21:33:54 -0800 (PST) Received: from solstice.IMGCGCW.net (110-170-137-3.static.asianet.co.th. [110.170.137.3]) by smtp.googlemail.com with ESMTPSA id v9sm8799041pfi.50.2016.03.08.21.33.46 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2016 21:33:53 -0800 (PST) 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 v11 9/9] kprobes: Add arm64 case in kprobe example module Date: Wed, 9 Mar 2016 00:32:23 -0500 Message-Id: <1457501543-24197-10-git-send-email-dave.long@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457501543-24197-1-git-send-email-dave.long@linaro.org> References: <1457501543-24197-1-git-send-email-dave.long@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160308_213415_356579_C64946AC X-CRM114-Status: GOOD ( 10.88 ) 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=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 } /*