lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0i6m6B4D_TGCkNu69SJbTdQ5vq0QzjYtHqKZpiaCnGSOA@mail.gmail.com>
Date: Tue, 18 Feb 2025 20:13:20 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Colin Ian King <colin.i.king@...il.com>, Saket Dumbre <saket.dumbre@...el.com>
Cc: Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] ACPI: OSL: ratelimit ACPICA kernel messages

+Saket Dumbre

On Thu, Feb 13, 2025 at 7:16 PM Colin Ian King <colin.i.king@...il.com> wrote:
>
> In cases where the ACPI AML contains errors there can be quite a large
> amount of ACPICA kernel log spamming.

Except when someone wants to see them all which also happens.

And wouldn't this also rate limit debug messages from ACPICA
specifically enabled via the kernel command line?

If so, I'd rather find a way to tell ACPICA to be less verbose.

> Reduce this by rate limiting the messages.
>
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
> ---
>  drivers/acpi/osl.c | 20 ++++++++++++--------
>  1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
> index 5ff343096ece..d4ece68e0fd6 100644
> --- a/drivers/acpi/osl.c
> +++ b/drivers/acpi/osl.c
> @@ -159,17 +159,21 @@ void __printf(1, 0) acpi_os_vprintf(const char *fmt, va_list args)
>         if (acpi_in_debugger) {
>                 kdb_printf("%s", buffer);
>         } else {
> -               if (printk_get_level(buffer))
> -                       printk("%s", buffer);
> -               else
> -                       printk(KERN_CONT "%s", buffer);
> +               if (printk_ratelimit()) {
> +                       if (printk_get_level(buffer))
> +                               printk("%s", buffer);
> +                       else
> +                               printk(KERN_CONT "%s", buffer);
> +               }
>         }
>  #else
>         if (acpi_debugger_write_log(buffer) < 0) {
> -               if (printk_get_level(buffer))
> -                       printk("%s", buffer);
> -               else
> -                       printk(KERN_CONT "%s", buffer);
> +               if (printk_ratelimit()) {
> +                       if (printk_get_level(buffer))
> +                               printk("%s", buffer);
> +                       else
> +                               printk(KERN_CONT "%s", buffer);
> +               }
>         }
>  #endif
>  }
> --

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ