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:	Mon, 06 Jun 2016 07:51:57 -0600
From:	"Jan Beulich" <JBeulich@...e.com>
To:	"Boris Ostrovsky" <boris.ostrovsky@...cle.com>
Cc:	"David Vrabel" <david.vrabel@...rix.com>,
	"xen-devel" <xen-devel@...ts.xenproject.org>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@...cle.com>,
	"Juergen Gross" <JGross@...e.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] xen-pciback: return proper values during BAR
 sizing

>>> On 06.06.16 at 15:03, <boris.ostrovsky@...cle.com> wrote:
> On 06/06/2016 04:11 AM, Jan Beulich wrote:
>> @@ -225,38 +225,42 @@ static inline void read_dev_bar(struct p
>>  			   (PCI_BASE_ADDRESS_SPACE_MEMORY |
>>  				PCI_BASE_ADDRESS_MEM_TYPE_64))) {
>>  			bar_info->val = res[pos - 1].start >> 32;
>> -			bar_info->len_val = res[pos - 1].end >> 32;
>> +			bar_info->len_val = -resource_size(&res[pos - 1]) >> 32;
>>  			return;
>>  		}
>>  	}
>>  
>> +	if (!res[pos].flags ||
>> +	    (res[pos].flags & (IORESOURCE_DISABLED | IORESOURCE_UNSET |
>> +			       IORESOURCE_BUSY)))
>> +		return;
> 
> Why are you not making this check first thing in the routine?

For one, pos isn't set there yet. And I'd also rather avoid the
complications resulting from 64-bit memory resources spanning
two entries.

Jan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ