Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9230168pxu; Mon, 28 Dec 2020 09:55:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/DFZFJiwwQ4JE/xwYzPSmFfcSW4aLhBV/PILyrfTQGe2q+fSI9U7Dzo1wacqkX5yPYyvD X-Received: by 2002:a17:906:ce21:: with SMTP id sd1mr41603863ejb.396.1609178148178; Mon, 28 Dec 2020 09:55:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609178148; cv=none; d=google.com; s=arc-20160816; b=pt8QeSDrkGvDbNW2HkQOEoKuCEmG7Gce480NMXa7zKObAqDt0N5Ty7KslRcQlMldwf /CEpPC/xn5tvbrMuBe0c4+sXBX9JxALexKFZXu9d6jEd7czL93slAKlQj3t/1Uyl5CKa ByOJybkD6zDnAj1lgQWlHI/jdl4gBe+7uO1I4v1m0m+9FAqn+R8p2MPkUINfJKXk0ydz bdtlzmju293RdTebTB0TEzR8LloRDpUKiJDdY1zuL9N7CEbNnL6MqW4HmZikCf22y1wQ r36KmWC+5D5xkoEHhvehp3++95qsAI4wPKy4buZPghg6PLWN7O/67fOLqBPXYbqqfZam et7g== 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=oSARiGnRi9vy7mR5+ghPJ17P91gYgsVJZiuc6c/Ryy7pysA83BQTaAsfpl+xTGx5Z2 /uVAFDIMX/6F1YvuYvrhAdVxeB46a9oeyctrwn6EP//+uP/NST0tNmfXrPux80cdeQ/j oqTVBxpkR02JYRNjCBcLdFrrKkfwJTFimWye0nEicqvlco8sUaHuuUFtXTDOllJjO+oj AJiBgTjqG41VwJLdv/IIUaHIVGCkGwKk5wu8itWgD72X4DC5j9ieSFciCawtQkyTiVp4 12P56YA2stlDLKofIFPU6dh2dNYv8QNLL4xWcdXwk9POaR+WkFZLUvTlTYipoMvD8Q/G ndrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BiP5KjvK; 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 q1si6105345ejn.161.2020.12.28.09.55.26; Mon, 28 Dec 2020 09:55:48 -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=BiP5KjvK; 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 S1731627AbgL1NRv (ORCPT + 99 others); Mon, 28 Dec 2020 08:17:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:45502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731575AbgL1NRc (ORCPT ); Mon, 28 Dec 2020 08:17:32 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B009022B37; Mon, 28 Dec 2020 13:17:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161436; bh=prpfV/7K5WxJDZkiaCAbTfjnEQzp7qDjT+B6Bxk0+rs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BiP5KjvKwhT9/5eyrLpR0ArneBQZ2SAR2cD5aBoiTghlS507IEKYy2bg784mT6DzN usduH/7mq7UfIPRZMPyQVSKFF2MZqpslzjVBePq/Hqyb9Fsn3SrKMdRJkk633xbYzN VeL4IdbrVtZYv502q4mi4Q0loE+G43deYD+ZOkNo= 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.14 213/242] powerpc/xmon: Change printk() to pr_cont() Date: Mon, 28 Dec 2020 13:50:18 +0100 Message-Id: <20201228124915.155964290@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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); } }