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: <Z5JcCxGuQNH9bZYH@hoboy.vegasvil.org>
Date: Thu, 23 Jan 2025 07:11:07 -0800
From: Richard Cochran <richardcochran@...il.com>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	John Stultz <john.stultz@...aro.org>, Arnd Bergmann <arnd@...db.de>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH RESEND net] ptp: Ensure info->enable callback is always
 set

On Thu, Jan 23, 2025 at 02:19:46PM +0100, Thomas Weißschuh wrote:
> On 2025-01-23 10:38:37+0100, Michal Swiatkowski wrote:
> > What about other ops, did you check it too? Looks like it isn't needed,
> > but it sometimes hard to follow.
> 
> I couldn't find any missing, but I'm not familiar with the subsystem and
> didn't check too hard.

Initially all of the callbacks were required, but that requirement
became relaxed over time with getcycles64().

Now that we have more and more drivers, it wouldn't hurt to let
ptp_clock_register() check that the needed callbacks are valid.

> Note:
> 
> A follow-up fix would be to actually guard the users of ->enable and
> error out.

Yes, I would place checks at the call sites, within ptp_ioctl().

Thanks,
Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ