diff mbox

acpi/apei/erst: Remove "Error" from initialization and disable output

Message ID 1500337283-25734-1-git-send-email-prarit@redhat.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Prarit Bhargava July 18, 2017, 12:21 a.m. UTC
The word "Error" is used by many QA groups and users as a keyword to
indicate that there is a critical failure during system bootup. The ESRT
code would interact better with these scripts if the word "Error" was
dropped from non-error messages.  Other ACPI features only use the acronym
for initialization and disable messages so the ESRT code should do the
same.

Remove "Error Record Serialization Table" and replace it with "ACPI ESRT"
in the messages.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: ying.huang@intel.com
---
 drivers/acpi/apei/erst.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Borislav Petkov July 18, 2017, 5:26 a.m. UTC | #1
On Mon, Jul 17, 2017 at 08:21:23PM -0400, Prarit Bhargava wrote:
> The word "Error" is used by many QA groups and users as a keyword to
> indicate that there is a critical failure during system bootup. The ESRT
> code would interact better with these scripts

... which is a thinly veiled way of saying: my scripts can't
differentiate between an error being reported and the word "error" so
let's "fix" the kernel.

Jeez. Fix your scripts instead.
Prarit Bhargava July 18, 2017, 11:29 a.m. UTC | #2
On 07/18/2017 01:26 AM, Borislav Petkov wrote:
> On Mon, Jul 17, 2017 at 08:21:23PM -0400, Prarit Bhargava wrote:
>> The word "Error" is used by many QA groups and users as a keyword to
>> indicate that there is a critical failure during system bootup. The ESRT
>> code would interact better with these scripts
> 
> ... which is a thinly veiled way of saying: my scripts can't
> differentiate between an error being reported and the word "error" so
> let's "fix" the kernel.
> 
> Jeez. Fix your scripts instead.
> 

Boris, I'd agree with you but this is one of those places where I think we
should bend a bit.  Error and Warning are indications of a failure, and we
should consider special casing them.  I would agree if this were one or two
scripts but I've heard complaints from 3 different companies about this.

It's a minor fix in the grander scheme of things.

P.
--
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
Borislav Petkov July 18, 2017, 2:07 p.m. UTC | #3
On Tue, Jul 18, 2017 at 07:29:40AM -0400, Prarit Bhargava wrote:
> Boris, I'd agree with you but this is one of those places where I think we
> should bend a bit.  Error and Warning are indications of a failure, and we
> should consider special casing them.

Woahahahahah, you're killing me! I haven't laughed so hard for a while
now. Thanks, I guess...

Special-casing "error" and "warning". Stop the presses, the kernel
decided to special-case two english words. News at 11.

> I would agree if this were one or two scripts but I've heard
> complaints from 3 different companies about this.

Three companies, huh? Three *whole* companies? Or just three engineers
who can't grep?

Of course, if you say three companies, that should at least give more
weight to your already insane argument.

Here's a counter-argument: with the gazillion abbreviations in dmesg,
actually having a print statement *explain* what it is trying to say is
refreshing and really helpful.
Linda Knippers July 18, 2017, 3:46 p.m. UTC | #4
On 7/18/2017 1:26 AM, Borislav Petkov wrote:
> On Mon, Jul 17, 2017 at 08:21:23PM -0400, Prarit Bhargava wrote:
>> The word "Error" is used by many QA groups and users as a keyword to
>> indicate that there is a critical failure during system bootup. The ESRT
>> code would interact better with these scripts
>
> ... which is a thinly veiled way of saying: my scripts can't
> differentiate between an error being reported and the word "error" so
> let's "fix" the kernel.
>
> Jeez. Fix your scripts instead.

I'll risk exposing myself to ridicule by agreeing with Prarit.

Most ACPI tables are referenced by their 4 letter abbreviations
anyway so this seems like a simple and helpful change, consistent
with other ACPI table references.

-- ljk
--
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
Borislav Petkov July 18, 2017, 4:38 p.m. UTC | #5
On Tue, Jul 18, 2017 at 11:46:11AM -0400, Linda Knippers wrote:
> Most ACPI tables are referenced by their 4 letter abbreviations
> anyway so this seems like a simple and helpful change, consistent
> with other ACPI table references.

I guess today is ridiculous ideas day. :-(

When are you guys going to understand that restricting dmesg *wording*
is never going to fly. It is going to be a losing game of whack-a-mole
for you. You can't really enforce it on people to stop using certain
words in dmesg just because it'll break your scripts. I can't believe
we're still *wasting* time talking about this insanity.

So let me point you in a better direction: have you guys heard of printk
loglevels? The number that gets prepended to each line in dmesg?


$ dmesg -r
...

<6>[    4.656173] i801_smbus 0000:00:1f.3: SMBus using PCI interrupt
<3>[    4.657280] irq: Invalid fwnode type (2) for irqdomain
<4>[    4.660181] ACPI Warning: SystemIO range 0x0000000000000428-0x000000000000042F conflicts with OpRegion 0x0000000000000400-0x000000000000047F (\_SB.PCI0.LPC.PMIO) (20170303/utaddress-247)
<6>[    4.662265] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver

6 is KERN_INFO, 3 is KERN_ERR, 4 is KERN_WARNING and so on.

If you really want to look for errors and warnings, you should use those
loglevels. Like everyone else does. And if messages have the wrong
loglevels, they should be fixed.

This is how it should be done reliably - the stress being on *reliably*
- not by grepping for words.
diff mbox

Patch

diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index ec4f507b524f..a796b9d91e20 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -1129,8 +1129,7 @@  static int __init erst_init(void)
 		goto err;
 
 	if (erst_disable) {
-		pr_info(
-	"Error Record Serialization Table (ERST) support is disabled.\n");
+		pr_info("ACPI ERST support is disabled.\n");
 		goto err;
 	}
 
@@ -1187,8 +1186,7 @@  static int __init erst_init(void)
 	if (!erst_erange.vaddr)
 		goto err_release_erange;
 
-	pr_info(
-	"Error Record Serialization Table (ERST) support is initialized.\n");
+	pr_info("ACPI ERST support is initialized.\n");
 
 	buf = kmalloc(erst_erange.size, GFP_KERNEL);
 	spin_lock_init(&erst_info.buf_lock);