From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B12C27EFFA for ; Tue, 28 Oct 2025 23:45:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761695132; cv=none; b=MhpTZTfj6CC4e7INDRy96vhheIpTpmxs0aC07G/JRDvJDCJBjgEsG5KyI1lsH89SX4Up+8meKI2TyB+9JwXf8EtfSGEsfbgl7aTaMLW0KelU5JgRjQSd64DqqzXY1tHwQJjrzppv94AqRmzgaiGxSmgd9nhAc8YXu57JvR0f4Gw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761695132; c=relaxed/simple; bh=pvORYJ5rE/jqWp1h5Wifw8LnZkhqt67QzZd23qnqtEs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rhxRX8Q9QOiq1/rKedT7SReWg1IgtKEM+jrZfzIAHegJsz06qRq23+Hc3+S69dNMRuyB6sqXggqnNrYFc80ZBRmRIcFHApa6C5Os3wHVp76Pfh6b+a4URgiXWy+A/gBfHHWDEtRkVfBhmkHp8X5zA3SySkSwIDDiDF6bRc6LjWw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=s9hBZqgV; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="s9hBZqgV" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1761695118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bVdLbIqZfPVV9nzaikXAAecCSd3I2FTL+HXFgib0190=; b=s9hBZqgVlWkSOYt6BK5gYHgMND6u8gafxaO3QunUF18Km/MlmW4ZJJnamgtdya4sIRTTe5 Krw+3ruO6soP5Svqstsmj+NMp81kDf572yxl555qKDIyUmenGdBF4GwGMzubUe6w2AHYYG NjuB85dDSetbSCOCyivijDWUHG/XNBI= Date: Tue, 28 Oct 2025 23:45:13 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] ptp: guard ptp_clock_gettime() if neither gettimex64 nor To: Jakub Kicinski , Kuniyuki Iwashima Cc: richardcochran@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, junjie.cao@intel.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, syzbot+c8c0e7ccabd456541612@syzkaller.appspotmail.com, syzkaller-bugs@googlegroups.com, thostet@google.com References: <20251028155318.2537122-1-kuniyu@google.com> <20251028161309.596beef2@kernel.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20251028161309.596beef2@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 28.10.2025 23:13, Jakub Kicinski wrote: > On Tue, 28 Oct 2025 15:51:50 +0000 Kuniyuki Iwashima wrote: >> From: Richard Cochran >> Date: Tue, 28 Oct 2025 07:09:41 -0700 >>> On Tue, Oct 28, 2025 at 05:51:43PM +0800, Junjie Cao wrote: >>>> Syzbot reports a NULL function pointer call on arm64 when >>>> ptp_clock_gettime() falls back to ->gettime64() and the driver provides >>>> neither ->gettimex64() nor ->gettime64(). This leads to a crash in the >>>> posix clock gettime path. >>> >>> Drivers must provide a gettime method. >>> >>> If they do not, then that is a bug in the driver. >> >> AFAICT, only GVE does not have gettime() and settime(), and >> Tim (CCed) was preparing a fix and mostly ready to post it. > > cc: Vadim who promised me a PTP driver test :) Let's make sure we > tickle gettime/setting in that test.. Heh, call gettime/settime is easy. But in case of absence of these callbacks the kernel will crash - not sure we can gather good signal in such case?