From patchwork Fri Jun 29 09:31:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 10495943 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6B4B360325 for ; Fri, 29 Jun 2018 09:33:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B54C29213 for ; Fri, 29 Jun 2018 09:33:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F943299A2; Fri, 29 Jun 2018 09:33:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA49A29213 for ; Fri, 29 Jun 2018 09:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935609AbeF2JdV convert rfc822-to-8bit (ORCPT ); Fri, 29 Jun 2018 05:33:21 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:54520 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935602AbeF2JdU (ORCPT ); Fri, 29 Jun 2018 05:33:20 -0400 Received: from 79.184.253.185.ipv4.supernova.orange.pl (79.184.253.185) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 7f30c14fcd3324ef; Fri, 29 Jun 2018 11:33:18 +0200 From: "Rafael J. Wysocki" To: "Schmauss, Erik" Cc: Andy Shevchenko , Toralf =?ISO-8859-1?Q?F=F6rster?= , "Moore, Robert" , ACPI Devel Maling List , Linux Kernel , Guenter Roeck Subject: Re: small dmesg regression in kernel 4.17.3 Date: Fri, 29 Jun 2018 11:31:59 +0200 Message-ID: <3440214.eqW5gfvlOh@aspire.rjw.lan> In-Reply-To: References: <8837a9e2-e614-e2bf-ed32-6d49de4dd4ed@gmx.de> MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Friday, June 29, 2018 12:13:54 AM CEST Schmauss, Erik wrote: > > > -----Original Message----- > > From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com] > > Sent: Wednesday, June 27, 2018 10:29 AM > > To: Toralf Förster ; Schmauss, Erik > > > > Cc: ACPI Devel Maling List ; Linux Kernel > kernel@vger.kernel.org> > > Subject: Re: small dmesg regression in kernel 4.17.3 > > > > +Cc: Erik > > > > On Tue, Jun 26, 2018 at 8:57 PM, Toralf Förster > > wrote: > > > The attached dmesg contains non printable chars 0x01 33 around "ACPI > > > BIOS Error (bug): Could not resolve" which is a new issue compared to > > > the dmesg of 4.17.2 > > > > > > System is a stable hardened Gentoo Linux at a ThinkPad T440s. > > > > I bet the below commit makes this. > > > > commit 2e78935d1e27d31955ad2dad4abe6c453cf669fd > > Author: Erik Schmauss > > Date: Fri Jun 1 12:06:43 2018 -0700 > > > > ACPICA: AML parser: attempt to continue loading table after error > > > > > Hi Andy, > > > So, it does add leading '\n' which flushes buffers followed by printing the > > message you see. But, I'm guessing now, kernel adds a default level since it's > > going to dmesg which you can see as unprintable symbols. > > What do you mean by a default level? > > > Personally I'm not a fan of leading '\n':s since it brings more pain than fixing > > something. It has special meaning (flushing buffers) and many developers forget > > this. > > This leading '\n' made it in Linux kernel unintentionally. It was originally intended as a change for acpiexec and it makes the dmesg look strange. I'll send out a fix. Which would be something like the patch below I suppose? --- From: Rafael J. Wysocki Subject: [PATCH] ACPICA: Drop leading newlines from error messages Commit 5088814a6e93 (ACPICA: AML parser: attempt to continue loading table after error) unintentionally added leading newlines to error messages emitted by ACPICA which caused unexpected things to be printed to the kernel log. Drop these newlines (which effectively reverts the part of commit 5088814a6e93 adding them). Fixes: 5088814a6e93 (ACPICA: AML parser: attempt to continue loading table after error) Reported-by: Toralf Förster Reported-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/uterror.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-pm/drivers/acpi/acpica/uterror.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/uterror.c +++ linux-pm/drivers/acpi/acpica/uterror.c @@ -182,19 +182,19 @@ acpi_ut_prefixed_namespace_error(const c switch (lookup_status) { case AE_ALREADY_EXISTS: - acpi_os_printf("\n" ACPI_MSG_BIOS_ERROR); + acpi_os_printf(ACPI_MSG_BIOS_ERROR); message = "Failure creating"; break; case AE_NOT_FOUND: - acpi_os_printf("\n" ACPI_MSG_BIOS_ERROR); + acpi_os_printf(ACPI_MSG_BIOS_ERROR); message = "Could not resolve"; break; default: - acpi_os_printf("\n" ACPI_MSG_ERROR); + acpi_os_printf(ACPI_MSG_ERROR); message = "Failure resolving"; break; }