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: <48BB2814.6020000@vyatta.com>
Date:	Sun, 31 Aug 2008 16:24:04 -0700
From:	Stephen Hemminger <stephen.hemminger@...tta.com>
To:	Ben Hutchings <bhutchings@...arflare.com>
CC:	Stephen Hemminger <shemminger@...tta.com>,
	Stephen Hemminger <shemminger@...ux-foundation.org>,
	Jeff Garzik <jgarzik@...ox.com>, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] sky2: EEPROM read/write bug fixes

Ben Hutchings wrote:
> Stephen Hemminger wrote:
>   
>> On Thu, 28 Aug 2008 08:30:35 -0700
>> Stephen Hemminger <shemminger@...ux-foundation.org> wrote:
>>
>>     
>>> On Thu, 28 Aug 2008 12:13:25 +0100
>>> Ben Hutchings <bhutchings@...arflare.com> wrote:
>>>
>>>       
>>>> Stephen Hemminger wrote:
>>>>         
>>>>> Cleanup and harden the routines accessing the EEPROM.
>>>>>   1. Prevent spin forever waiting for the TWSI bus
>>>>>   2. Fix write eeprom to write full words rather than only 16 bits 
>>>>>     Luckly the vendor doesn't provide EEPROM in Linux format so it must never
>>>>>     have been used.
>>>>>   3. Don't allow partial eeprom writes, not needed, not safe.
>>>>>           
>>>> [...]
>>>>
>>>> You should be able to replace the VPD access code with calls through
>>>> pci_dev->vpd->ops - though you'd need to remove some declarations from
>>>> drivers/pci/pci.h to include/linux/pci.h.
>>>>
>>>> Ben.
>>>>
>>>>         
>>> Generically a good idea, but it won't work for this device.
>>> It turns out that the read/write timeouts in pci/access.c are too
>>> short. Since the pci vpd code spins under spin lock with irq's disabled,
>>> it really can't wait for up to 10ms!
>>>       
>> You can show that the pci->vpd code won't work because any access to
>> /sys/class/net/eth0/device/vpd gets ETIMEDOUT.
>>     
>
> Then please change the time limit.  There is no time limit for VPD in the
> PCI spec so I started with a value that I knew was enough for our devices.
>
> Ben.
>
>   
The time limit is part of the generic pci vpd ops reading code. Maybe if 
I have time, I'll have sky2 driver
overload the vpd->ops with its own ops, but not sure if it is really 
worth it.  What besides device/vpd uses
or plans to use vpd ops?

--
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