Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2959237imu; Mon, 19 Nov 2018 08:38:21 -0800 (PST) X-Google-Smtp-Source: AJdET5cbtOGwTOeXZIZSy/NfONgCyWzsLwHD38eZHnOxnnY1S9vPdi8zhxeJnHeJH8RYDXP9RZcM X-Received: by 2002:a62:3346:: with SMTP id z67-v6mr24088349pfz.112.1542645501550; Mon, 19 Nov 2018 08:38:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645501; cv=none; d=google.com; s=arc-20160816; b=mH3lP90It9fXcyv1/KvA4Jq3x2iT+UD+Pph+MDeqQkXm5yQnx4sEl2GLMJTQpL7wUu Ggx+bNqh1hP6RNie+YFOi3vseugJ43AAVvKespEmfNBgKvi8qsMLEP1H7xht/54nrte9 Ae+VdOm+AEcYhCTjmeKXzD2QwMjqMiQtMHj2vnltQZf2TALQgjprt30W/X6d7X5NumCb CtjPon9eui2/bpl84AkxbNY4v4H3cWzBLPhUXyxotfYTPlJ0zWHJ2aXj8ZgUJDZ+4UZ7 yyvB65uR4oJFU7WeUVlKcciiDskjeE2bUAbhWs1rq+N1ZQSiwTweuRctMoseSfYyPVoD ZWnQ== 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:dkim-signature; bh=v0fe0AnCYdtuWlXmRG9y9ZouVdgIMcDlRCk3Z9RTNaE=; b=UbfYMIyJpwwrOWryR/J+CESmyKzjtmUcqmUXjk05k8JT35Z9RZ8OJ9Wfoimbfkbv/1 n2PHygmvyMq8xmyMUo4p3I6DuSkR8YQJUgU4LlZ1XTx3O4ApbxxjKPuVVCGHJgHk7mQP LkfaqjIz/e52TE4b+m1DOo9patG+iGCzNnHVnwc//qHIlxcUC88Mv1w8pvZbsjUGnxE2 9Wnw/GBdGljyQ8huOBXWcQilorQ8OjPL0elE4L9hEbuyX+kCLntNvLvvAeTphKQ3Il9E hA/xJU9UJ82BVIVQlA+T3BSbS66R1sAvAzgyZrDsNjgUfCVo/YLcR6ldDayAKMOLCCVk r6HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Wp2TNMRh; 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 v5si38016963pgg.1.2018.11.19.08.38.06; Mon, 19 Nov 2018 08:38:21 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Wp2TNMRh; 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 S1732039AbeKTDBC (ORCPT + 99 others); Mon, 19 Nov 2018 22:01:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:32770 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730931AbeKTDBB (ORCPT ); Mon, 19 Nov 2018 22:01:01 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (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 AF4D02147D; Mon, 19 Nov 2018 16:36:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645412; bh=6chEzC1K5yjV6wRb+fyTECAiaBmuapAfXvEOmFOZgdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wp2TNMRhEvohna/vn7A5nhP5kz3vwO3nnzGDUF8JzZIDeau7IKBNH4w5DArsygGC7 lzpu0G7wdNZ+5r4a87uHD3jNEqxbE07W4cgEXMV9w5ArM70NswIAQuo2PqKif2D9PU tO3bJljWDb8L81tlSTT8SZEW1ClbR17MPr2c7vaU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Daniel Thompson Subject: [PATCH 4.19 153/205] kdb: use correct pointer when btc calls btt Date: Mon, 19 Nov 2018 17:27:40 +0100 Message-Id: <20181119162638.885529246@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe Leroy commit dded2e159208a9edc21dd5c5f583afa28d378d39 upstream. On a powerpc 8xx, 'btc' fails as follows: Entering kdb (current=0x(ptrval), pid 282) due to Keyboard Entry kdb> btc btc: cpu status: Currently on cpu 0 Available cpus: 0 kdb_getarea: Bad address 0x0 when booting the kernel with 'debug_boot_weak_hash', it fails as well Entering kdb (current=0xba99ad80, pid 284) due to Keyboard Entry kdb> btc btc: cpu status: Currently on cpu 0 Available cpus: 0 kdb_getarea: Bad address 0xba99ad80 On other platforms, Oopses have been observed too, see https://github.com/linuxppc/linux/issues/139 This is due to btc calling 'btt' with %p pointer as an argument. This patch replaces %p by %px to get the real pointer value as expected by 'btt' Fixes: ad67b74d2469 ("printk: hash addresses printed with %p") Cc: Signed-off-by: Christophe Leroy Reviewed-by: Daniel Thompson Signed-off-by: Daniel Thompson Signed-off-by: Greg Kroah-Hartman --- kernel/debug/kdb/kdb_bt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/kernel/debug/kdb/kdb_bt.c +++ b/kernel/debug/kdb/kdb_bt.c @@ -179,14 +179,14 @@ kdb_bt(int argc, const char **argv) kdb_printf("no process for cpu %ld\n", cpu); return 0; } - sprintf(buf, "btt 0x%p\n", KDB_TSK(cpu)); + sprintf(buf, "btt 0x%px\n", KDB_TSK(cpu)); kdb_parse(buf); return 0; } kdb_printf("btc: cpu status: "); kdb_parse("cpu\n"); for_each_online_cpu(cpu) { - sprintf(buf, "btt 0x%p\n", KDB_TSK(cpu)); + sprintf(buf, "btt 0x%px\n", KDB_TSK(cpu)); kdb_parse(buf); touch_nmi_watchdog(); }