Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751524AbcLEIPS (ORCPT ); Mon, 5 Dec 2016 03:15:18 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:58444 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751373AbcLEIPD (ORCPT ); Mon, 5 Dec 2016 03:15:03 -0500 X-AuditID: cbfee61a-f79916d0000062de-fd-584521fa53be From: Maninder Singh To: catalin.marinas@arm.com, will.deacon@arm.com, christoffer.dall@linaro.org, marc.zyngier@arm.com, pbonzini@redhat.com, rkrcmar@redhat.com, cmetcalf@mellanox.com, panand@redhat.com, mark.rutland@arm.com, maninder1.s@samsung.com, james.morse@arm.com, akpm@linux-foundation.org, sandeepa.s.prabhu@gmail.com, labbott@redhat.com, shijie.huang@arm.com, ard.biesheuvel@linaro.org, wangkefeng.wang@huawei.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, pankaj.m@samsung.com, ajeet.y@samsung.com, cpgs@samsung.com, Vaneet Narang Subject: [PATCH 1/1] arm64: Correcting format specifier for printing 64 bit addresses Date: Mon, 05 Dec 2016 13:39:53 +0530 Message-id: <1480925393-8386-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrJIsWRmVeSWpSXmKPExsVy+t9jQd1fiq4RBpOnG1u8eDWBxWLO+jVs Fv8/7Ga0eL+sh9Hixet/jBbv+vUsXh7StLi/bzmTxZyphRYfTx1nt1i55weTxabH11gtLu+a w2ZxeH4bi8XfO//YLJZevwhUtvoFo8W9N1uZLPZv+8dqsaHzNpPFoyUH2CzudM1isjh0ci6j RePn+4wWLz+eYHGQ9Fgzbw2jx85Zd9k9Wo68ZfW4c20Pm8eJGb9ZPM5vWsPssXlJvcez6YeZ PN7vu8rm0bdlFaPH501yAdxRbjYZqYkpqUUKqXnJ+SmZeem2SqEhbroWSgp5ibmptkoRur4h QUoKZYk5pUCekQEacHAOcA9W0rdLcMu4dCSjoEeu4sCsDrYGxv8SXYycHBICJhJrPt5nhbDF JC7cW8/WxcjFISQwi1Hi+rx97BDOT0aJfa1X2UCq2AT0JFbt2sMCkhARmMss8XntarAEs8AD Roljy3NBbGGBcIlJHQ/B4iwCqhIHm86BreAVcJPofHmAEWKdnMTJY5NZJzByL2BkWMUokVqQ XFCclJ5rmJdarlecmFtcmpeul5yfu4kRHI3PpHYwHtzlfohRgINRiYe3w8UlQog1say4MvcQ owQHs5II7wUZ1wgh3pTEyqrUovz4otKc1OJDjKZAB0xklhJNzgcmirySeEMTcxNzYwMLc0tL EyMlcd7G2c/ChQTSE0tSs1NTC1KLYPqYODilGhgNXU32bfG88GZ1uMTWTw/vh+/U0r2/+GtQ /W8rNs3JZj0/vpUa3fnsx7U7jU1NTLDZ7aWvZvKfK70TF28uOl64tFSPNXdd4vmyDdU7jX1k RL1UDgs84dXVMre94fzqwIHqxvSFZv1cC3hfPjHibWW+tu8Go02GfUlc4aPmIxtXBX71KWXY VqXEUpyRaKjFXFScCADyHsW43AIAAA== X-MTR: 20000000000000000@CPGS Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3749 Lines: 101 This patch corrects format specifier for printing 64 bit addresses. Signed-off-by: Maninder Singh Signed-off-by: Vaneet Narang --- arch/arm64/kernel/signal.c | 2 +- arch/arm64/kvm/sys_regs.c | 8 ++++++-- arch/arm64/mm/fault.c | 15 ++++++++++----- arch/arm64/mm/mmu.c | 4 ++-- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index c7b6de6..c89d5fd 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -155,7 +155,7 @@ asmlinkage long sys_rt_sigreturn(struct pt_regs *regs) badframe: if (show_unhandled_signals) - pr_info_ratelimited("%s[%d]: bad frame in %s: pc=%08llx sp=%08llx\n", + pr_info_ratelimited("%s[%d]: bad frame in %s: pc=%016llx sp=%016llx\n", current->comm, task_pid_nr(current), __func__, regs->pc, regs->sp); force_sig(SIGSEGV, current); diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 87e7e66..89bf5c1 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -1554,8 +1554,12 @@ static void unhandled_cp_access(struct kvm_vcpu *vcpu, WARN_ON(1); } - kvm_err("Unsupported guest CP%d access at: %08lx\n", - cp, *vcpu_pc(vcpu)); + if (params->is_32bit) + kvm_err("Unsupported guest CP%d access at: %08lx\n", + cp, *vcpu_pc(vcpu)); + else + kvm_err("Unsupported guest CP%d access at: %016lx\n", + cp, *vcpu_pc(vcpu)); print_sys_reg_instr(params); kvm_inject_undefined(vcpu); } diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c index a78a5c4..d96a42a 100644 --- a/arch/arm64/mm/fault.c +++ b/arch/arm64/mm/fault.c @@ -77,7 +77,7 @@ void show_pte(struct mm_struct *mm, unsigned long addr) pr_alert("pgd = %p\n", mm->pgd); pgd = pgd_offset(mm, addr); - pr_alert("[%08lx] *pgd=%016llx", addr, pgd_val(*pgd)); + pr_alert("[%016lx] *pgd=%016llx", addr, pgd_val(*pgd)); do { pud_t *pud; @@ -177,7 +177,7 @@ static void __do_kernel_fault(struct mm_struct *mm, unsigned long addr, * No handler, we'll have to terminate things with extreme prejudice. */ bust_spinlocks(1); - pr_alert("Unable to handle kernel %s at virtual address %08lx\n", + pr_alert("Unable to handle kernel %s at virtual address %016lx\n", (addr < PAGE_SIZE) ? "NULL pointer dereference" : "paging request", addr); @@ -198,9 +198,14 @@ static void __do_user_fault(struct task_struct *tsk, unsigned long addr, struct siginfo si; if (unhandled_signal(tsk, sig) && show_unhandled_signals_ratelimited()) { - pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0x%03x\n", - tsk->comm, task_pid_nr(tsk), fault_name(esr), sig, - addr, esr); + if (compat_user_mode(regs)) + pr_info("%s[%d]: unhandled %s (%d) at 0x%08lx, esr 0x%03x\n", + tsk->comm, task_pid_nr(tsk), fault_name(esr), sig, + addr, esr); + else + pr_info("%s[%d]: unhandled %s (%d) at 0x%016lx, esr 0x%03x\n", + tsk->comm, task_pid_nr(tsk), fault_name(esr), sig, + addr, esr); show_pte(tsk->mm, addr); show_regs(regs); } diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 17243e4..cbf444c 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -683,9 +683,9 @@ void __init early_fixmap_init(void) pr_warn("pmd %p != %p, %p\n", pmd, fixmap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)), fixmap_pmd(fix_to_virt(FIX_BTMAP_END))); - pr_warn("fix_to_virt(FIX_BTMAP_BEGIN): %08lx\n", + pr_warn("fix_to_virt(FIX_BTMAP_BEGIN): %016lx\n", fix_to_virt(FIX_BTMAP_BEGIN)); - pr_warn("fix_to_virt(FIX_BTMAP_END): %08lx\n", + pr_warn("fix_to_virt(FIX_BTMAP_END): %016lx\n", fix_to_virt(FIX_BTMAP_END)); pr_warn("FIX_BTMAP_END: %d\n", FIX_BTMAP_END); -- 1.9.1