Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp5233260imd; Tue, 30 Oct 2018 14:10:00 -0700 (PDT) X-Google-Smtp-Source: AJdET5fvQO+D3p/BO/2/CsiaEBa3SagDXyRluFNwAu/AeIebkdHuZSFlIMFXOvsprRJHLZwYw1Wz X-Received: by 2002:a62:1693:: with SMTP id 141-v6mr322123pfw.183.1540933800646; Tue, 30 Oct 2018 14:10:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540933800; cv=none; d=google.com; s=arc-20160816; b=eB9c023UeaFfq8ZhnPc+x2Byqk//hflRiupnV0LBMVU6JQnjOqAC1kADXOyp4WOuS8 6MZshwEdAtXrNm9Zvmv4/vOIWX4zAeSjQ+g2htPNr06UBfzsj6t55eio6SCyYOsojHyy tO3ZSLcqJJLAHXMj8PAAg2kXkVVU6ONzeQMTpUDyON7T/zfKjHDHtmTVBaDps27AeB9o BAUeXqWS90MJJQ2iJpV7Yleq0jYpJJ48A6VMcGlW8sAibkBpw+ebwAGqdeeXdKrcSSes Qxpg8N4sYl9IGLRWwW7XFAEzkrVj2aIF8pggVgKjDmkViVnHFYnZjGAP6KK+5k6IBnZw 8EmA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Rd+EwWnhdNULWnMyDKWiMFEcBqwQiPE8Kj6FeGusdGw=; b=mclMUNmZjvkq8tZVFb/OpWYM1Ck3xCSQvuucrT4Y+6iNfA+i6jWDEilKNp2HiMKTAp RvIF12ZTkvRMWcAT4hWcEGVqRu9nKKxOzovNQm0KvodjEZE1dd//VgXHY6A0Eg4x8RLB KNm96q+4TEnUsByShWBKythpTFPK/TcGWhQ3iEeOr5pnwnRXxACDSps2JWPxbEWSI4uC NVOzgccJHcCptSnhKr2EOZCWZZOBNv+wlCpEqvWlPJWiVmaAnROnLhLc9ym7kPcEHmWx x83Hxb/xqFmwwL5J58lB9GMpswux1clJXPlf/Lv/RG0JFHcSgVX8/7ImwzNGRtdWH8XV dypg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Z+wZt8YG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g67-v6si13840381plb.163.2018.10.30.14.09.45; Tue, 30 Oct 2018 14:10:00 -0700 (PDT) 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=@chromium.org header.s=google header.b=Z+wZt8YG; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727713AbeJaFs4 (ORCPT + 99 others); Wed, 31 Oct 2018 01:48:56 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:34170 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726840AbeJaFs4 (ORCPT ); Wed, 31 Oct 2018 01:48:56 -0400 Received: by mail-pl1-f195.google.com with SMTP id f10-v6so6165167plr.1 for ; Tue, 30 Oct 2018 13:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Rd+EwWnhdNULWnMyDKWiMFEcBqwQiPE8Kj6FeGusdGw=; b=Z+wZt8YGDzwCvs2UOc8+2hBz3Us8cAgDe3BsGibatmowaR+QthmtKWCQLSea36iWFF /6c4gzrELEuLQhNHx28xT8SSyImq+0bYeK5zWqc8UdBvKaA0Ar/Y54+5kdJ7pvdQuYLn 6gkc2TRIS2RvlDH67MyVcsV52nQ1KXKU4juLk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Rd+EwWnhdNULWnMyDKWiMFEcBqwQiPE8Kj6FeGusdGw=; b=EuXSWJd09YYzICfqPljewN9wo4I0jAetiSwGCS83Y9qHVXN+UW5FKv5tyPMnaTR2Vz FczYwZ6jt9VTmos55Bk4lVpeY0uGazKMtJFKZ8MjAQVaYmt+imgA3j0AF3tJ6kkrncxw 7sGfT/95HlhBYn+eEw8TSFyYe5UMcPHZi1JmbX1RFqhby716kI8h1rxyv6r+G2/3Gcy1 v7KFcEfawxGoRSuNdvBABnGYBsxKF8dhSBDAIHTJk1fNGljAuHq8MgoABgv4MbTIicvg yy9/aTCXhKiE9HWoa6fyfydFiIhGL/EfFvjbtWboPZaiEZQyJEt5jLBS2XFYXshmNWdt AaIg== X-Gm-Message-State: AGRZ1gLdXDYiie/QoNmU0I9K/SDX7dM1/zVYiI3zfLvlfTC2yfdyv83Y eTVmc4OSJOpF1wIrco8QuHoQSA== X-Received: by 2002:a17:902:be0f:: with SMTP id r15-v6mr286670pls.170.1540932832888; Tue, 30 Oct 2018 13:53:52 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id n2-v6sm18560753pgg.86.2018.10.30.13.53.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 13:53:51 -0700 (PDT) From: Douglas Anderson To: Jason Wessel , Daniel Thompson Cc: "Tobin C . Harding" , joe@perches.com, Douglas Anderson , stable@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH] kdb: Fix btc (backtrace on each cpu) crash Date: Tue, 30 Oct 2018 13:53:34 -0700 Message-Id: <20181030205334.148162-1-dianders@chromium.org> X-Mailer: git-send-email 2.19.1.568.g152ad8e336-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Typing 'btc' on kdb doing all sorts of fail. Sometimes it would crash, sometimes display nothing, and sometimes hang. Bisect tracked this down to the commit ad67b74d2469 ("printk: hash addresses printed with %p"), suggesting an obvious fix. The pointer used internally in kdb shouldn't be hashed, so switch it to %px. Fixes: ad67b74d2469 ("printk: hash addresses printed with %p") Cc: stable@vger.kernel.org Signed-off-by: Douglas Anderson --- kernel/debug/kdb/kdb_bt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/debug/kdb/kdb_bt.c b/kernel/debug/kdb/kdb_bt.c index 6ad4a9fcbd6f..7921ae4fca8d 100644 --- 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(); } -- 2.19.1.568.g152ad8e336-goog