From patchwork Mon Dec 5 08:06:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maninder Singh X-Patchwork-Id: 9460599 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 3C06C6022E for ; Mon, 5 Dec 2016 08:14:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B41E204BA for ; Mon, 5 Dec 2016 08:14:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C396206AC; Mon, 5 Dec 2016 08:14:04 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 81F97204BA for ; Mon, 5 Dec 2016 08:14:03 +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 1cDoO1-00024d-Ef; Mon, 05 Dec 2016 08:12:33 +0000 Received: from mailout2.samsung.com ([203.254.224.25]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cDoNw-0001xS-2l for linux-arm-kernel@lists.infradead.org; Mon, 05 Dec 2016 08:12:29 +0000 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OHP003FXDG3ASA0@mailout2.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 05 Dec 2016 17:12:03 +0900 (KST) X-AuditID: cbfee61a-f79916d0000062de-e0-5845215313fc Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 25.AF.25310.35125485; Mon, 5 Dec 2016 17:12:03 +0900 (KST) Received: from localhost.localdomain ([107.108.92.210]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OHP00JW1DFQHG20@mmp2.samsung.com>; Mon, 05 Dec 2016 17:12:03 +0900 (KST) 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 Subject: [PATCH 1/1] arm64: Correcting format specifier for printing 64 bit addresses Date: Mon, 05 Dec 2016 13:36:54 +0530 Message-id: <1480925214-1597-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrKIsWRmVeSWpSXmKPExsVy+t9jQd1gRdcIg6urJSxevJrAYjFn/Ro2 i/8fdjNavF/Ww2jx4vU/Rot3/XoW9/ctZ7KYM7XQ4uOp4+wWK/f8YLLY9Pgaq8XlXXPYLA7P b2Ox+HvnH5vF0usXgcpWv2C0uPdmK5PF/m3/WC02dN5msni05ACbxZ2uWUwWh07OZbRo/Hyf 0eLlxxMsDhIea+atYfTYOesuu0fLkbesHneu7WHzODHjN4vH+U1rmD02L6n3eDb9MJPH+31X 2Tz6tqxi9Pi8SS6AO8rNJiM1MSW1SCE1Lzk/JTMv3VYpNMRN10JJIS8xN9VWKULXNyRISaEs MacUyDMyQAMOzgHuwUr6dgluGZeOZBT0yFUcmNXB1sD4X6KLkZNDQsBE4tHCPiYIW0ziwr31 bF2MXBxCArMYJeb9OQvl/GSUOH96ASNIFZuAnsSqXXtYQBIiAnOZJT6vXQ1WxSxwjlHi3ske NpAqYYFwiUkdD4FsDg4WAVWJDVPdQcK8Am4S+yZsh1onJ3Hy2GTWCYzcCxgZVjFKpBYkFxQn peca5qWW6xUn5haX5qXrJefnbmIER+EzqR2MB3e5H2IU4GBU4uHtcHGJEGJNLCuuzD3EKMHB rCTCe0HGNUKINyWxsiq1KD++qDQntfgQoynQ/onMUqLJ+cAEkVcSb2hibmJubGBhbmlpYqQk zts4+1m4kEB6YklqdmpqQWoRTB8TB6dUA2OwXJtbrX/RdQuHllVrdn1dl3DEbvGjSb+yRea+ OLczzTlVfJ1SwmHxjM5LrWuk35kdeZ5a7NiV27TNZ5LgrJKvS01uxt06Kq5vtvjInneT/TeZ pC+MLvjAeO3R3ONTHT4zs9gtTz+7oMXVeeWu1Qss/t778d07sKktXfP387gLb10/PHJaYrZW iaU4I9FQi7moOBEA5FhxMtgCAAA= X-MTR: 20000000000000000@CPGS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161205_001228_397005_055FEA2F X-CRM114-Status: GOOD ( 11.65 ) 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: Vaneet Narang , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, ajeet.y@samsung.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, pankaj.m@samsung.com 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 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);