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: <553A7F28.4040109@gmail.com>
Date:	Fri, 24 Apr 2015 10:36:40 -0700
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
	David Miller <davem@...emloft.net>,
	vivien.didelot@...oirfairelinux.com
CC:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel@...oirfairelinux.com
Subject: Re: [PATCH] net: mdio-gpio: support access that may sleep

On 24/04/15 10:25, Sergei Shtylyov wrote:
> On 04/24/2015 06:56 PM, Florian Fainelli wrote:
> 
>>>> Some systems using mdio-gpio may use gpio on message based busses,
>>>> which
>>>> require sleeping (e.g. gpio from an I2C I/O expander).
> 
>>>> Since this driver does not use IRQ handler, it is safe to use the
>>>> _cansleep suffixed gpio accessors.
> 
>>>> Signed-off-by: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
> 
>>> Since this is down underneath the layer of an MII bus, you cannot
>>> universally say that these routines are always called in a sleepable
>>> context.
> 
>>> The PHY layer, and the driver itself above that, might call these
>>> routines from timers, interruptes etc.
> 
>> The PHY library calls these routines from its state machine workqueue
>> for that reason, or from process context (when invoked via ethtool
>> ioctl). The only special case is phy_mac_interrupt() which is callable
>> from interrupt context,
> 
>    It is not (as we have discussed recently) -- cancel_work_sync() may
> sleep.

True, but that does not invalidate my comment, I meant to write that
this is the only function that you *might* potentially want to call from
interrupt context, and yet it does not trigger low-level I/O accesses to
the underlying MDIO bus, but instead uses the PHY library state machine
workqueue to do that.

Thanks for the reminder though, that needs fixing ;)
--
Florian
--
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