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:	Wed, 10 Feb 2016 20:05:47 -0800
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Woojung.Huh@...rochip.com, davem@...emloft.net
Cc:	netdev@...r.kernel.org, opendmb@...il.com
Subject: Re: [PATCH net-next 2/3] lan78xx: setting phy features in phy driver



On 10/02/2016 15:18, Woojung.Huh@...rochip.com wrote:
>>> +static int lan88xx_config_init(struct phy_device *phydev)
>>> +{
>>> +	phydev->supported &= phydev->drv->features;
>>> +	phydev->advertising &= phydev->drv->features;
>>
>> This looks suspicious, phy_probe() takes the driver supported features
>> and assigns it to phydev->supported, and phydev->advertising, is not
>> that working somehow?
>>
>> genphy_config_init() does look at the current MII_BMRS value to
>> determine what is supported by the PHY, and masks it in
>> phydev->supported, so that could indeed be an issue if we had not had a
>> change to mask with the supported modes before.
>>
>> I think we need more explanation here as to what kind of bug you may
>> have been observing, there could be one.
> 
> SUPPORTED_Pause & SUPPORTED_Asym_Pause set at phydev->features  are removed by genphy_config_init().
> As you pointed, it may be better to modify genphy_config_init() than each driver's config_init routine.

I see, that is definitively a bug, we should not clear these bits if the
Ethernet MAC driver asked for them.
--
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ