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: <498f5ad7-c203-9b21-c153-e3496755b88d@suse.com>
Date:   Tue, 13 Jun 2017 18:13:18 +0200
From:   Juergen Gross <jgross@...e.com>
To:     Ingo Molnar <mingo@...nel.org>
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

On 13/06/17 17:20, Ingo Molnar wrote:
> 
> * 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.

Okay, will change.


Juergen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ