linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* small dmesg regression in kernel 4.17.3
@ 2018-06-26 17:57 Toralf Förster
  2018-06-27 17:28 ` Andy Shevchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Toralf Förster @ 2018-06-26 17:57 UTC (permalink / raw)
  To: linux-acpi; +Cc: Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

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.



-- 
Toralf
PGP C4EACDDE 0076E94E

[-- Attachment #2: dmesg-4.17.3 --]
[-- Type: application/octet-stream, Size: 43511 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: small dmesg regression in kernel 4.17.3
  2018-06-26 17:57 small dmesg regression in kernel 4.17.3 Toralf Förster
@ 2018-06-27 17:28 ` Andy Shevchenko
  2018-06-28 22:13   ` Schmauss, Erik
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Shevchenko @ 2018-06-27 17:28 UTC (permalink / raw)
  To: Toralf Förster, erik.schmauss; +Cc: ACPI Devel Maling List, Linux Kernel

+Cc: Erik

On Tue, Jun 26, 2018 at 8:57 PM, Toralf Förster <toralf.foerster@gmx.de> 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 <erik.schmauss@intel.com>
Date:   Fri Jun 1 12:06:43 2018 -0700

   ACPICA: AML parser: attempt to continue loading table after error


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.
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.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: small dmesg regression in kernel 4.17.3
  2018-06-27 17:28 ` Andy Shevchenko
@ 2018-06-28 22:13   ` Schmauss, Erik
  2018-06-29  9:31     ` Rafael J. Wysocki
  2018-06-29 10:43     ` Andy Shevchenko
  0 siblings, 2 replies; 6+ messages in thread
From: Schmauss, Erik @ 2018-06-28 22:13 UTC (permalink / raw)
  To: Andy Shevchenko, Toralf Förster, Moore, Robert
  Cc: ACPI Devel Maling List, Linux Kernel



> -----Original Message-----
> From: Andy Shevchenko [mailto:andy.shevchenko@gmail.com]
> Sent: Wednesday, June 27, 2018 10:29 AM
> To: Toralf Förster <toralf.foerster@gmx.de>; Schmauss, Erik
> <erik.schmauss@intel.com>
> Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>; Linux Kernel <linux-
> 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 <toralf.foerster@gmx.de>
> 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 <erik.schmauss@intel.com>
> 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.

Thanks for reporting it,

Erik
> 
> --
> With Best Regards,
> Andy Shevchenko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: small dmesg regression in kernel 4.17.3
  2018-06-28 22:13   ` Schmauss, Erik
@ 2018-06-29  9:31     ` Rafael J. Wysocki
  2018-06-29 17:40       ` Schmauss, Erik
  2018-06-29 10:43     ` Andy Shevchenko
  1 sibling, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2018-06-29  9:31 UTC (permalink / raw)
  To: Schmauss, Erik
  Cc: Andy Shevchenko, Toralf Förster, Moore, Robert,
	ACPI Devel Maling List, Linux Kernel, Guenter Roeck

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 <toralf.foerster@gmx.de>; Schmauss, Erik
> > <erik.schmauss@intel.com>
> > Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>; Linux Kernel <linux-
> > 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 <toralf.foerster@gmx.de>
> > 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 <erik.schmauss@intel.com>
> > 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 <rafael.j.wysocki@intel.com>
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 <toralf.foerster@gmx.de>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/acpica/uterror.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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;
 	}


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: small dmesg regression in kernel 4.17.3
  2018-06-28 22:13   ` Schmauss, Erik
  2018-06-29  9:31     ` Rafael J. Wysocki
@ 2018-06-29 10:43     ` Andy Shevchenko
  1 sibling, 0 replies; 6+ messages in thread
From: Andy Shevchenko @ 2018-06-29 10:43 UTC (permalink / raw)
  To: Schmauss, Erik
  Cc: Toralf Förster, Moore, Robert, ACPI Devel Maling List, Linux Kernel

On Fri, Jun 29, 2018 at 1:13 AM, Schmauss, Erik <erik.schmauss@intel.com> wrote:
>> On Tue, Jun 26, 2018 at 8:57 PM, Toralf Förster <toralf.foerster@gmx.de>
>> 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 <erik.schmauss@intel.com>
>> 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?

I can't find fast the better example, though if you look at  printk_get_level()
https://elixir.bootlin.com/linux/latest/source/include/linux/printk.h#L16

it will shed a light on a format. Thus, 0x01 0x33 means start of the
kernel error message (error is a level).

Kernel messaging protocol is defined in
https://elixir.bootlin.com/linux/latest/source/include/linux/kern_levels.h

This is my understanding on what's going on (I might be mistaken).

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: small dmesg regression in kernel 4.17.3
  2018-06-29  9:31     ` Rafael J. Wysocki
@ 2018-06-29 17:40       ` Schmauss, Erik
  0 siblings, 0 replies; 6+ messages in thread
From: Schmauss, Erik @ 2018-06-29 17:40 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andy Shevchenko, Toralf Förster, Moore, Robert,
	ACPI Devel Maling List, Linux Kernel, Guenter Roeck


> -----Original Message-----
> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-
> owner@vger.kernel.org] On Behalf Of Rafael J. Wysocki
> Sent: Friday, June 29, 2018 2:32 AM
> To: Schmauss, Erik <erik.schmauss@intel.com>
> Cc: Andy Shevchenko <andy.shevchenko@gmail.com>; Toralf Förster
> <toralf.foerster@gmx.de>; Moore, Robert <robert.moore@intel.com>; ACPI
> Devel Maling List <linux-acpi@vger.kernel.org>; Linux Kernel <linux-
> kernel@vger.kernel.org>; Guenter Roeck <linux@roeck-us.net>
> Subject: Re: small dmesg regression in kernel 4.17.3
> 
> 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 <toralf.foerster@gmx.de>; Schmauss, Erik
> > > <erik.schmauss@intel.com>
> > > Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>; Linux
> > > Kernel <linux- 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
> > > <toralf.foerster@gmx.de>
> > > 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 <erik.schmauss@intel.com>
> > > 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?

Yes, this is what I was thinking of

Thanks,

Erik
> 
> ---
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 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 <toralf.foerster@gmx.de>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/acpi/acpica/uterror.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> 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;
>  	}
> 
> --
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-06-29 17:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 17:57 small dmesg regression in kernel 4.17.3 Toralf Förster
2018-06-27 17:28 ` Andy Shevchenko
2018-06-28 22:13   ` Schmauss, Erik
2018-06-29  9:31     ` Rafael J. Wysocki
2018-06-29 17:40       ` Schmauss, Erik
2018-06-29 10:43     ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).