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: <78ae3bc7-fbd9-5f69-3177-67eeb3f43201@suse.com>
Date:   Tue, 30 May 2017 17:03:50 +0200
From:   Juergen Gross <jgross@...e.com>
To:     Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        linux-kernel@...r.kernel.org, xen-devel@...ts.xenproject.org
Subject: Re: [PATCH] xen: don't print error message in case of missing
 Xenstore entry

On 30/05/17 15:25, Boris Ostrovsky wrote:
> On 05/29/2017 05:13 AM, Juergen Gross wrote:
>> When registering for the Xenstore watch of the node control/sysrq the
>> handler will be called at once. Don't issue an error message if the
>> Xenstore node isn't there, as it will be created only when an event
>> is being triggered.
>>
>> Signed-off-by: Juergen Gross <jgross@...e.com>
>> ---
>>  drivers/xen/manage.c | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
>> index c1ec8ee80924..7ddd0803da23 100644
>> --- a/drivers/xen/manage.c
>> +++ b/drivers/xen/manage.c
>> @@ -277,8 +277,11 @@ static void sysrq_handler(struct xenbus_watch *watch, const char *path,
>>  	err = xenbus_transaction_start(&xbt);
>>  	if (err)
>>  		return;
>> -	if (xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key) < 0) {
>> -		pr_err("Unable to read sysrq code in control/sysrq\n");
>> +	err = xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key);
>> +	if (err < 0) {
>> +		if (err != -ENOENT)
> 
> Can we distinguish initialization invocation from actual watch firing?
> E.g. '|| (system_state >= SYSTEM_RUNNING)'?

The watch will fire again after suspend/resume (e.g. live migration).


Juergen

> 
> -boris
> 
>> +			pr_err("Error %d reading sysrq code in control/sysrq\n",
>> +			       err);
>>  		xenbus_transaction_end(xbt, 1);
>>  		return;
>>  	}
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ