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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170613152014.tax42aevmsfdopxa@gmail.com>
Date:   Tue, 13 Jun 2017 17:20:14 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Juergen Gross <jgross@...e.com>
Cc:     linux-kernel@...r.kernel.org, xen-devel@...ts.xenproject.org,
        x86@...nel.org, boris.ostrovsky@...cle.com, hpa@...or.com,
        tglx@...utronix.de, mingo@...hat.com, tony.luck@...el.com,
        bp@...en8.de
Subject: Re: [PATCH v2] xen/mce: don't issue error message for failed
 /dev/mcelog registration


* Juergen Gross <jgross@...e.com> wrote:

> When running under Xen as dom0 /dev/mcelog is being registered by Xen
> instead of the normal mcelog driver. Avoid an error message being
> issued by the mcelog driver in this case. Instead issue an informative
> message that Xen has registered the device.
> 
> Signed-off-by: Juergen Gross <jgross@...e.com>
> ---
>  arch/x86/kernel/cpu/mcheck/dev-mcelog.c | 11 +++++++++--
>  drivers/xen/mcelog.c                    |  2 ++
>  2 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/mcheck/dev-mcelog.c b/arch/x86/kernel/cpu/mcheck/dev-mcelog.c
> index 9c632cb88546..4eb5f7d1d593 100644
> --- a/arch/x86/kernel/cpu/mcheck/dev-mcelog.c
> +++ b/arch/x86/kernel/cpu/mcheck/dev-mcelog.c
> @@ -388,9 +388,16 @@ static __init int dev_mcelog_init_device(void)
>  	/* register character device /dev/mcelog */
>  	err = misc_register(&mce_chrdev_device);
>  	if (err) {
> -		pr_err("Unable to init device /dev/mcelog (rc: %d)\n", err);
> -		return err;
> +		if (err == -EBUSY)
> +			/* Xen dom0 might have registered the device already. */
> +			pr_info("Unable to init device /dev/mcelog, already registered");
> +		else {
> +			pr_err("Unable to init device /dev/mcelog (rc: %d)\n",
> +			       err);
> +			return err;
> +		}

Please only use balanced curly braces in conditional statements.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ