Received: by 10.223.176.46 with SMTP id f43csp1677673wra; Wed, 24 Jan 2018 21:31:30 -0800 (PST) X-Google-Smtp-Source: AH8x2279wCe18CQpTMMD9UPc1/vGZfFh4kjyk5ZbFblW2xsYMjGLT/8qlH83aBknEbWrdbma4Pqn X-Received: by 2002:a17:902:8f94:: with SMTP id z20-v6mr10245933plo.72.1516858290216; Wed, 24 Jan 2018 21:31:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516858290; cv=none; d=google.com; s=arc-20160816; b=Szs07SjeG6Nhl95wNiofRf85gG3OgtNl4/5wfvUaKfTUDrbpjwfqYRC2OUDb+WGemV 0k2hsymQpJVEq1WSJ4MsXDuVvhF0IBpOMC/EcjreeyQJ+YQdW0fMHZfrhxemcV0uiT3U MVS1c/xXxwkM1DE0YRTiB9iPdh/ZVYOebADrLKOSu7JOM6yr5m8fy/VT68pyPZ/XriTh 3NA12HZuXWc/D0ia/WxAdS3h5wvTCgdy4RZlDt5TsEFyCuVwmImlLuvcsLoOUWjzpn3I oN7rCE9vcAZM707MLgWCUpBX/EmUTKJ8mkgLgCUj6581Gj8hwvkrGRNG9RA45H3ngdpy YPHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dmarc-filter:arc-authentication-results; bh=bBgxKs1zwKZA1EaRDChKxBsgW49nmpBsrBVipEbt/lA=; b=qJ1CxnNue2RjbaeorFakthJPGsEs1sIoKAzTnC6gBH9IIwGTNctwNioU/5HvUjc+NI ZON932fY5SJcjnxXVP7CdJLOuP/Cngfn7SHfYtyDVUUTzszKbjBMcKmzUsDLefBHGb0P PdCqMDJ8GuJqIf5jrO2IPWJNIZpuM9xec2DxVcbU867kcYT0z3vVlhbMFshWNzySmPjl ty6kAKfdzMEUFEv9Vdy6pmL0nNU+jY0h4NKHxVdq1OhUoaKGwmhKP3Y2Yzjl+LhU2KIE KDQy+8FEsswa0SpDYqUp/3YP7Qg9DJh5T6C97T+W+BmbQubiRxiay9pemTY9ygRdk1HH OSCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8si4047021pfe.266.2018.01.24.21.31.16; Wed, 24 Jan 2018 21:31:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751324AbeAYF32 (ORCPT + 99 others); Thu, 25 Jan 2018 00:29:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:42426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbeAYF31 (ORCPT ); Thu, 25 Jan 2018 00:29:27 -0500 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4268F21785; Thu, 25 Jan 2018 05:29:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4268F21785 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org From: Masami Hiramatsu To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, Masami Hiramatsu , Ananth N Mavinakayanahalli , Anil S Keshavamurthy , "David S . Miller" , Jon Medhurst , Will Deacon , Arnd Bergmann , David Howells , Heiko Carstens , "Tobin C . Harding" , Linus Torvalds Subject: [PATCH 5/8] kprobes/arm: Fix %p uses in error messages Date: Thu, 25 Jan 2018 14:29:02 +0900 Message-Id: <151685814207.3099.8908722443473501855.stgit@devbox> X-Mailer: git-send-email 2.13.6 In-Reply-To: <151685799071.3099.10383062804474021403.stgit@devbox> References: <151685799071.3099.10383062804474021403.stgit@devbox> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix %p uses in error messages by removing it and using general dumper. Signed-off-by: Masami Hiramatsu --- arch/arm/probes/kprobes/core.c | 10 +++++----- arch/arm/probes/kprobes/test-core.c | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/probes/kprobes/core.c index 52d1cd14fda4..8f37d505194f 100644 --- a/arch/arm/probes/kprobes/core.c +++ b/arch/arm/probes/kprobes/core.c @@ -291,8 +291,8 @@ void __kprobes kprobe_handler(struct pt_regs *regs) break; case KPROBE_REENTER: /* A nested probe was hit in FIQ, it is a BUG */ - pr_warn("Unrecoverable kprobe detected at %p.\n", - p->addr); + pr_warn("Unrecoverable kprobe detected.\n"); + dump_kprobe(p); /* fall through */ default: /* impossible cases */ @@ -617,11 +617,11 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) if (orig_sp != stack_addr) { struct pt_regs *saved_regs = (struct pt_regs *)kcb->jprobe_saved_regs.ARM_sp; - printk("current sp %lx does not match saved sp %lx\n", + pr_err("current sp %lx does not match saved sp %lx\n", orig_sp, stack_addr); - printk("Saved registers for jprobe %p\n", jp); + pr_err("Saved registers for jprobe\n"); show_regs(saved_regs); - printk("Current registers\n"); + pr_err("Current registers\n"); show_regs(regs); BUG(); } diff --git a/arch/arm/probes/kprobes/test-core.c b/arch/arm/probes/kprobes/test-core.c index 9ed0129bed3c..b5c892e24244 100644 --- a/arch/arm/probes/kprobes/test-core.c +++ b/arch/arm/probes/kprobes/test-core.c @@ -1460,7 +1460,6 @@ static bool check_test_results(void) print_registers(&result_regs); if (mem) { - pr_err("current_stack=%p\n", current_stack); pr_err("expected_memory:\n"); print_memory(expected_memory, mem_size); pr_err("result_memory:\n");