Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9097156pxu; Mon, 28 Dec 2020 06:34:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6YKU0orACWUxL+6zfVEj8/J5B3Q14SJzii4b8G0orXqxengCFPJirkBoo2Mf9e9zWOfye X-Received: by 2002:a50:a684:: with SMTP id e4mr41921597edc.148.1609166050393; Mon, 28 Dec 2020 06:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609166050; cv=none; d=google.com; s=arc-20160816; b=AzrQszA0HokD0PlP6soASKmlEHf3YX7VOY4DSWl+LrBLi6E434tenU/BguPZ9u8iN+ 2Ev7pg4YgrbuAxzCJCvGO8CGnnjsODo/XyuaQNE4dKeT/vryrQAQOm63x9dYq+5nURW8 IYMT1b1rRBnAfLCDjNCBCz4wzqUsgBChx1PGOQbnkQ70KdwmkSKEnUclIjlRmJGK5xxN hdAL+A+8gXN5aDj083z20CM3f2ROtvYD3ki9EkRRj+0KYsB9teqloM0vvQ33PMN0hH2q Ou37ZXDDucWGY2r7+QGaJe3WY5srLdjkzA0gD1A6RBrdXUuyhc68cVyl/h1yX8y/i0Tp eJ3A== 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=yCHAuihpAjddLwChdr0NpWvD3elESsGRbi+MWnH96b4=; b=iBfAoQ9i2ElhSXs0Yjvyd9FTJsn42alik9V7kfDXXSXNa+gv/POqjt0V4bh8xEiiub iHxifFQ+pI5ceurGacX4uUZvFOE6ld4bRp4PbfWDUAL2kAbcIGRC+SOKzwQXN3NJz8sS gL8yPLAl1D8mO/6eUkUaE0uBvCWR79IcJd6YEtQaJl9pPA+MaMJEoCawXUrCodqiwAxj 474iAfQdSBEKVrINlD/Cu/FIPU/7rJoKhq7DpZwEw9kYR4HTg8406Sp6z+O2O8AnnWBe 5WzlS05TJQlqNk1fUqw5w10933hPhbn6SfCD5WPXcBoAeJwNTvzaaQ7bEx+oFtRJ8/+X oeog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=GCYyH6U3; 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 v1si21705563edl.62.2020.12.28.06.33.46; Mon, 28 Dec 2020 06:34:10 -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=GCYyH6U3; 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 S2503501AbgL1O37 (ORCPT + 99 others); Mon, 28 Dec 2020 09:29:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:37894 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503408AbgL1O3y (ORCPT ); Mon, 28 Dec 2020 09:29:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5142922C7E; Mon, 28 Dec 2020 14:29:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165753; bh=Xpd+pIEKctHJU2+pXj8imbHkhlwWecnZgI8/5R8H2ho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GCYyH6U3QOw4Yr6zR+qyC4Mbv4ouAILLjzcSblWs7MrXLkKu5155Ies50XagFWZww Lf0uIniHOq03MApospDA/5zftcds5pS9wnSpvsXshx0Qs3rJzFuPhepQPrVIhILVhF slvBT+XN2BHpXDrznSdZ/OTFOVD2JyHpkvqefnvQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Michael Ellerman Subject: [PATCH 5.10 612/717] powerpc/xmon: Change printk() to pr_cont() Date: Mon, 28 Dec 2020 13:50:10 +0100 Message-Id: <20201228125050.234256296@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 @@ -178,7 +178,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); } }