Subject: Re: [PATCH net 0/2] gve: Fix NULL dereferencing with PTP clock

From: Simon Horman <[email-masked]>
Date: Thu, 30 Oct 2025 09:48:42 +0000

On Thu, Oct 30, 2025 at 09:43:57AM +0000, Simon Horman wrote:
> On Wed, Oct 29, 2025 at 11:45:38AM -0700, Joshua Washington wrote:
> > From: Tim Hostetler <[email-masked]>
> > 
> > This patch series fixes NULL dereferences that are possible with gve's
> > PTP clock due to not stubbing certain ptp_clock_info callbacks.
> > 
> > Tim Hostetler (2):
> >   gve: Implement gettimex64 with -EOPNOTSUPP
> >   gve: Implement settime64 with -EOPNOTSUPP
> > 
> >  drivers/net/ethernet/google/gve/gve_ptp.c | 15 +++++++++++++++
> >  1 file changed, 15 insertions(+)
> 
> Hi Joshua and Tim,
> 
> I think that the approach of enhancing the caller to only
> call these callbacks if they are non NULL, as per the patch below,
> seems more robust. It would fix all drivers in one go.
> 
> - [PATCH] ptp: guard ptp_clock_gettime() if neither gettimex64 nor
>   https://lore.kernel.org/all/[email-masked]/

Oops, I see that I should have read to the end of that thread
where Tim joins the discussion.

It seems that this patchset is appropriate as it's expected
that drivers expect an implementation of a variant of these callbacks.