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]
Date:	Thu, 7 Jul 2016 10:55:28 +0000
From:	Paul Durrant <Paul.Durrant@...rix.com>
To:	David Vrabel <david.vrabel@...rix.com>,
	Wei Liu <wei.liu2@...rix.com>,
	David Vrabel <david.vrabel@...rix.com>
CC:	"xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
	"Jan Beulich" <JBeulich@...e.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [Xen-devel] [PATCH] xen-netback: correct return value checks on
 xenbus_scanf()

> -----Original Message-----
> From: netdev-owner@...r.kernel.org [mailto:netdev-
> owner@...r.kernel.org] On Behalf Of David Vrabel
> Sent: 07 July 2016 11:45
> To: Wei Liu; David Vrabel
> Cc: xen-devel@...ts.xenproject.org; Jan Beulich; netdev@...r.kernel.org
> Subject: Re: [Xen-devel] [PATCH] xen-netback: correct return value checks
> on xenbus_scanf()
> 
> On 07/07/16 11:35, Wei Liu wrote:
> > On Thu, Jul 07, 2016 at 10:58:16AM +0100, David Vrabel wrote:
> >> On 07/07/16 08:57, Jan Beulich wrote:
> >>> Only a positive return value indicates success.
> >>
> >> This is not correct.
> >>
> >
> > Do you mean the commit message is not correct or the code is not
> > correct? If it is the formal, do you have any suggestion to fix it?
> 
> This code is correct as-is, thus the commit message is wrong or misleading.
> 

Is that true? Jan is correct in saying that only >0 is an indicator of success according to the usual semantics of sccanf(). Personally I think the code would be clearer if the checks for failure were < 1 rather than <= 0.

  Paul

> David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ