Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9178728pxu; Mon, 28 Dec 2020 08:32:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7lyinepUXCjkt2+hqn91CraCWcETV2SqCQwYrE5XGrK4l0Ks8WM7gTsB+826F5I/O7W+A X-Received: by 2002:a17:907:41e3:: with SMTP id nb3mr42970642ejb.378.1609173129063; Mon, 28 Dec 2020 08:32:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173129; cv=none; d=google.com; s=arc-20160816; b=fZAH+lj/DcrErjxpyg6hupY1nKFBFlLOaZo+G4I4sQwTRAx4omqpu7/JsrUnGbAtwv hRTy5CrfGsUEn/NfCntmuuZ9bZwSJgrgweY+MGn3l+ajewqIwQ2JEN0g3m0/3vtMxL4Q YZdGWahkphzh0ZVNFF60dmrKJJ+E4re8fh52C8ywkTCpAf0OSZUI18L7DpbnZr2gKFlD HxKd2VddDjDRWl8v+uLffF/YCeJaRD7wysm+f5bEFzf7GOs4KLBbwV59Qi10+qO6UaFs hQBfgp5PcWxPyJIbV/U3sRkcT5u/akpMKqBl1OtnJkUezhaecFgw4pdkYmPRolgyeUGA qx6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CvGBLgzAJOumXON9J5KELIXMsWtY2DfSKbMGL3L9YyM=; b=JF9yNa9+Q+H7/c2GzcmkRs3Gw7CVWrbHs1SacUoNNZMzvJxaANmnaKoyGxh3xiO2kE 5znO6hLSkeYXJOg9J5cQ7msWoRxcjmg2C6Mdw5T7ELXAE8aBc5+lG2rS70IyiwNftvMD fUARUtWaHmVxhSz1zcCa7kjozUFZvcfQ0AYJxapaMh1RNcLsJ6gFRgwg/0dIe1IWIAXV hI8BUQEkAMW4hN/TojtOhuduFTo/svJVPz+/Q0ba54iVPYTcf7l06wkW/ZtmGunrCziN e0jNmQmuqMJPi0ubMUj7skVO8fmM7hbKSuoRbAtYi3cT6HOgLPbbZHSZE1SMpFPIQho6 XuHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uNKdrzMI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si18314546ejz.538.2020.12.28.08.31.46; Mon, 28 Dec 2020 08:32:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uNKdrzMI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633642AbgL1Q3p (ORCPT + 99 others); Mon, 28 Dec 2020 11:29:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:34616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729191AbgL1NHJ (ORCPT ); Mon, 28 Dec 2020 08:07:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 10FF1208B6; Mon, 28 Dec 2020 13:06:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160813; bh=prpfV/7K5WxJDZkiaCAbTfjnEQzp7qDjT+B6Bxk0+rs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uNKdrzMIEU+bTNJGu2zC71elGLd8O4rVivMuWwUCgIqfBOuOaaEmcwNlCU1wgs/F5 wcNgyU8bc5DDbW5W0+34JnRiJYLwEPTou76mRpDUEJsxw/8v4jlGz4dOu+PjMYFiKX c9jPldfr4Hxd+ioAk1awOd0Vt0SlJzuvF2TeAmN0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Michael Ellerman Subject: [PATCH 4.9 157/175] powerpc/xmon: Change printk() to pr_cont() Date: Mon, 28 Dec 2020 13:50:10 +0100 Message-Id: <20201228124900.850183967@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy commit 7c6c86b36a36dd4a13d30bba07718e767aa2e7a1 upstream. Since some time now, printk() adds carriage return, leading to unusable xmon output if there is no udbg backend available: [ 54.288722] sysrq: Entering xmon [ 54.292209] Vector: 0 at [cace3d2c] [ 54.292274] pc: [ 54.292331] c0023650 [ 54.292468] : xmon+0x28/0x58 [ 54.292519] [ 54.292574] lr: [ 54.292630] c0023724 [ 54.292749] : sysrq_handle_xmon+0xa4/0xfc [ 54.292801] [ 54.292867] sp: cace3de8 [ 54.292931] msr: 9032 [ 54.292999] current = 0xc28d0000 [ 54.293072] pid = 377, comm = sh [ 54.293157] Linux version 5.10.0-rc6-s3k-dev-01364-gedf13f0ccd76-dirty (root@po17688vm.idsi0.si.c-s.fr) (powerpc64-linux-gcc (GCC) 10.1.0, GNU ld (GNU Binutils) 2.34) #4211 PREEMPT Fri Dec 4 09:32:11 UTC 2020 [ 54.293287] enter ? for help [ 54.293470] [cace3de8] [ 54.293532] c0023724 [ 54.293654] sysrq_handle_xmon+0xa4/0xfc [ 54.293711] (unreliable) ... [ 54.296002] [ 54.296159] --- Exception: c01 (System Call) at [ 54.296217] 0fd4e784 [ 54.296303] [ 54.296375] SP (7fca6ff0) is in userspace [ 54.296431] mon> [ 54.296484] Use pr_cont() instead. Fixes: 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Christophe Leroy [mpe: Mention that it only happens when udbg is not available] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c8a6ec704416ecd5ff2bd26213c9bc026bdd19de.1607077340.git.christophe.leroy@csgroup.eu Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/xmon/nonstdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/powerpc/xmon/nonstdio.c +++ b/arch/powerpc/xmon/nonstdio.c @@ -182,7 +182,7 @@ void xmon_printf(const char *format, ... if (n && rc == 0) { /* No udbg hooks, fallback to printk() - dangerous */ - printk("%s", xmon_outbuf); + pr_cont("%s", xmon_outbuf); } }