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: <ZXWVSXqAkOGRs3UG@gentoo.org>
Date:   Sun, 10 Dec 2023 11:39:05 +0100
From:   Guilherme Amadio <amadio@...too.org>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
        Ravi Bangoria <ravi.bangoria@....com>,
        Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] x86/nmi: Rate limit unknown NMI messages

On Fri, Dec 08, 2023 at 05:52:11PM -0800, Namhyung Kim wrote:
> On some AMD machines, unknown NMI messages were printed on the console
> continuously when using perf command with IBS.  It was reported that it
> can slow down the kernel.  Let's ratelimit the unknown NMI messages.
> 
> Cc: Ravi Bangoria <ravi.bangoria@....com>
> Cc: Guilherme Amadio <amadio@...too.org>

The rate of messages on the console were proportional to the sampling frequency
when I noticed this happening, so this is a welcome change. Thank you!

Acked-by: Guilherme Amadio <amadio@...too.org>

Best regards,
-Guilherme

> Cc: Stephane Eranian <eranian@...gle.com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  arch/x86/kernel/nmi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
> index 17e955ab69fe..d23867901186 100644
> --- a/arch/x86/kernel/nmi.c
> +++ b/arch/x86/kernel/nmi.c
> @@ -303,13 +303,13 @@ unknown_nmi_error(unsigned char reason, struct pt_regs *regs)
>  
>  	__this_cpu_add(nmi_stats.unknown, 1);
>  
> -	pr_emerg("Uhhuh. NMI received for unknown reason %02x on CPU %d.\n",
> -		 reason, smp_processor_id());
> +	pr_emerg_ratelimited("Uhhuh. NMI received for unknown reason %02x on CPU %d.\n",
> +			     reason, smp_processor_id());
>  
>  	if (unknown_nmi_panic || panic_on_unrecovered_nmi)
>  		nmi_panic(regs, "NMI: Not continuing");
>  
> -	pr_emerg("Dazed and confused, but trying to continue\n");
> +	pr_emerg_ratelimited("Dazed and confused, but trying to continue\n");
>  }
>  NOKPROBE_SYMBOL(unknown_nmi_error);
>  
> -- 
> 2.43.0.472.g3155946c3a-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ