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>] [day] [month] [year] [list]
Message-ID: <20160209135857.GB26641@gmail.com>
Date:	Tue, 9 Feb 2016 14:58:57 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc:	linux-kernel@...r.kernel.org, Borislav Petkov <bp@...e.de>,
	Andy Lutomirski <luto@...capital.net>,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] x86/mce: Remove the "Unable to init device /dev/mcelog"
 message


* Konrad Rzeszutek Wilk <konrad.wilk@...cle.com> wrote:

> This code is run unconditionaly on bootup - and if the machine
> does not expose the MCE capability this scary message shows up.
> 
> It is not needed as one can get that information from:
> 
>  1) Observing there are no /dev/mcelog
>  2) Running with 'initcall_debug' to see what the return code was
>     -EIO, -ENOMEM, -EBUSY
> 
> CC: Borislav Petkov <bp@...e.de>
> Cc: Andy Lutomirski <luto@...capital.net>
> Cc: H. Peter Anvin <hpa@...or.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> CC: Ingo Molnar <mingo@...nel.org>
> Reported-by: Marek Marczykowski-Górecki <marmarek@...isiblethingslab.com>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> ---
>  arch/x86/kernel/cpu/mcheck/mce.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index a006f4c..1c0132f 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -2525,8 +2525,6 @@ err_out_mem:
>  	free_cpumask_var(mce_device_initialized);
>  
>  err_out:
> -	pr_err("Unable to init device /dev/mcelog (rc: %d)\n", err);
> -
>  	return err;
>  }

So the message is useful if it was not initialized for some anomalous reason.

What we want instead is to handle this case differently:

        if (!mce_available(&boot_cpu_data)) {
                err = -EIO;
                goto err_out;
        }

and not print a warning in that case, i.e. do:

        if (!mce_available(&boot_cpu_data))
		return -EIO;

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ