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, 19 Mar 2015 12:40:05 -0500
From:	Tom Lendacky <thomas.lendacky@....com>
To:	David Laight <David.Laight@...LAB.COM>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:	David Miller <davem@...emloft.net>
Subject: Re: [PATCH net-next 06/10] amd-xgbe: Set DMA mask based on hardware
 register value

On 03/19/2015 12:32 PM, David Laight wrote:
> From: Tom Lendacky
>> The hardware supplies a value that indicates the DMA range that it
>> is capable of using. Use this value rather than hard-coding it in
>> the driver.
> ...
>> +	/* Translate the address width setting into actual number */
>> +	switch (hw_feat->dma_width) {
>> +	case 0:
>> +		hw_feat->dma_width = 32;
>> +		break;
>> +	case 1:
>> +		hw_feat->dma_width = 40;
>> +		break;
>> +	case 2:
>> +		hw_feat->dma_width = 48;
>> +		break;
>> +	}
>> +
>
> I see a glaring problem should the hardware ever return 3.

Except this version of the hardware can't return a 3 and any future
versions will have a different device tree id or ACPI id and won't
match this driver (or the driver will be updated at that point to
support the newer versions).  I could have it default to 32 if you
feel it's really needed, though.

Thanks,
Tom

>
> 	David
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ