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] [day] [month] [year] [list]
Message-Id: <20140320.171339.838529247165735046.davem@davemloft.net>
Date:	Thu, 20 Mar 2014 17:13:39 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	richardcochran@...il.com
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	ben@...adent.org.uk, christian.riesch@...cron.at,
	stefan.sorensen@...ctralink.com
Subject: Re: [PATCH net-next v2 1/9] ptp: introduce programmable pins.

From: Richard Cochran <richardcochran@...il.com>
Date: Thu, 20 Mar 2014 21:43:08 +0100

> On Mon, Mar 17, 2014 at 09:25:34PM -0400, David Miller wrote:
>> 
>> This locking seems unnecessarily complex to me.  You should be able to
>> do the stateless sanity checks, take the mutex, then do all of the
>> rest of the operations until the end of the function before
>> dropping the lock.
>> 
>> So just take the lock once over the operations that need it.
> 
> The idea was to avoid holding the mutex when invoking the driver
> callbacks (.verify and .enable). Mostly this is my paranoia that some
> bad driver will call back into the core via ptp_set_pinfunc().

During my review, I checked all the implementations of said methods
and they all universally adjust software state and return.

> But you are right that the result is overly complex. I'll make the
> callers of ptp_set_pinfunc hold the mutex, and so the set path will
> look just like the get path.

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