From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f49.google.com (mail-yx1-f49.google.com [74.125.224.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 145193242BA for ; Sun, 2 Aug 2026 18:50:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785696603; cv=none; b=XB3tcnKg35/F7V8I67h0cnWnrgHk0uPxLl03RpxoW0w4BEkN0Lo3QI9wuetNOI5X165MJeim2QMVGZPzALW1l9eiVuZVsdLDNl9Mt8s1DGuGitYs/0twy0fdaAg5ddSsRaOluJb+SP3dewNw2se9hq9rctw1GlcH2dmLR9JVk00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785696603; c=relaxed/simple; bh=L0svd3D0foAbS1pofZ2kwhRgyX0xQSmgHu3dPZH+i4Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MDOQ582aS1nlUEAdzhoptfEvNzyB2dmWDjxZmkHhzAj/Cfi65/ltmN7Iv9H/Ezcg9pINCsCgw8Sl2v6wpE11tlPLEbg+mbdsacwXT+ZfhDzOQfjhEhVz5oGGB0zcmQQAfaRIkZLcYMsdj61JZg+inmQuWfYfvSHMQAl3ZYYbQdk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZoQwcz27; arc=none smtp.client-ip=74.125.224.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZoQwcz27" Received: by mail-yx1-f49.google.com with SMTP id 956f58d0204a3-6681e7911b0so3483768d50.0 for ; Sun, 02 Aug 2026 11:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785696601; x=1786301401; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=JCOGXAiY1okgWD9P7MgJLnCxWDi+bKHeP2QdjRB5Ehg=; b=ZoQwcz27h5BjI7NgFB8M4mPyMqp7hxnpgbn6h/Ian3SYRBW9T92qmsln5UaLXUgWR4 Davj5R+ogiBvNa7w61t/Bh5agyeX4h4E9TMBA5XwpWrGEnsNekU+VhEiIqDX4osxx3th XNFp5gqWWADvP0JaWNizOtjFc5A9twdGboRfHxWQMHQ3aJLpV0VIs2RG7gKE2qNwdBNF jQnriCmJAXJQ1nFSNlmMWnfvPAh75sN6F5s0c0mM229nIy1pzOloGk40yQs5wQtx/L05 oSRD+bnZgE41KHgs7UF/tZDN5N9vxaEez1Yai2X0Q+y2JJ3uzzemYaafWVtCThIgoL37 RBYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785696601; x=1786301401; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JCOGXAiY1okgWD9P7MgJLnCxWDi+bKHeP2QdjRB5Ehg=; b=NV5++BZ5s7uHqZyXuqxd69SSaiHHvnSJ1abPv/yYGE+QqsOR7xnF0nFzNhmmEmgi2J 8PQ8RrUh9bdXraol+XsS2/LHx5V/l4H9ILSNgY99AU5uFToshXs5Jw0nJVZ8aCaH2ERh s+EskuP0iGi410FxYIaowhB3h4BS7yVHggLyzqu2isrEDVKF5hNsjoHOyS+sDiAE+x7l 25TQ8rbMmnXOPPqWa8YfzV867KQSVAdTQnBaEU4HNNsMwaT0JYwGOgeya4ME7Ts+0YN+ 6lAZSENPjfNHVuFPd+gbeRurciatGr1h3xWXrj9+rq6RoytfTvr4fH+pA27uIDVIE/eM uBig== X-Forwarded-Encrypted: i=1; AHgh+RpTGVTxNY7BRSpiIT5EC5LvttBvLynh1Un6KQ9RczO5+XvCCX77nGej7t9BIo/jZl0kH99RNK+5adcpk8Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yw1bpU3FyhVFbwtSnyJ6OG151RZBA2IWuMm79fOdg6CV5zx3KgP IzsgBBSaNTfxmG9QTDi+4XUv7vsJ53Uj6K5QVszvyUcUwdelZg4Nxph2 X-Gm-Gg: AR+sD11ucNUARa6bbUyECvlDDARO2cbhCCqimHzhntwqwY1jBvvEQoJP6cUjO0kPcyF RnYHpvdnvGXPiMdyBUdSHjHiiRLIcdfoKEaLvdakmf3kHZhrDVL9xpjWk+xAtOOUNxjOHf96KjN M/J9Bt3Z4fFs3fuAG+M85+d618guHU/t5mOVZFYQzDZ0pUyv/N6JDpjaTOqo2uGKDYlIKTbunJX YJd9zXLueezk4u78ayhcVklifMcnkB748WdKCbgCX2tmlahwe0zdHM08ooqhP7dBb3mXYzGwXmp +I7zl5UhRvYBKlwplhJRP0Yelw3WZGKJ46b4VMkR9zM9frnb+emmJqcZ8eAHIdz2Hw5GFnIicYn bL9iKQU13h0r+5ETWbgfsdiwUZmcwst6sXm0M2RtiEt5/PnOxOIFgw8KE9OpOvxCBvKncoZmhQo 31fjYMAHEKmk0JoQN4udQvMhg/y/7tDf2XqStgEhoiJfo+pu5DlUYMz7Tb/r+Kn4QNKY/8AI0HM sB+XQ8= X-Received: by 2002:a53:b711:0:b0:662:89c8:4a62 with SMTP id 956f58d0204a3-6694f095b5fmr6981875d50.18.1785696600981; Sun, 02 Aug 2026 11:50:00 -0700 (PDT) Received: from hoboy.vegasvil.org ([2600:1700:2430:6f6e:e2d5:5eff:fea5:802f]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-66948fcb3acsm4247511d50.10.2026.08.02.11.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2026 11:50:00 -0700 (PDT) Date: Sun, 2 Aug 2026 11:49:57 -0700 From: Richard Cochran To: Deep Shah Cc: netdev@vger.kernel.org, "David S . Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet , Andrew Lunn , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan , Vadim Fedorenko , Simon Horman Subject: Re: [PATCH net-next v3 2/2] selftests: ptp: add a regression test for the frequency adjustment overflow Message-ID: References: <20260801222923.39017-1-deepshah146@gmail.com> <20260801222923.39017-3-deepshah146@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260801222923.39017-3-deepshah146@gmail.com> On Sat, Aug 01, 2026 at 10:29:23PM +0000, Deep Shah wrote: > testptp's -f option stores the requested adjustment as an int ppb and > converts it to scaled ppm, so it cannot express the 64-bit scaled-ppm > values needed to overflow scaled_ppm_to_ppb() and bypass the max_adj > check enforced by ptp_clock_adjtime(). > > Add a small test that crafts struct timex.freq directly and verifies that > an overflowing frequency adjustment is rejected with -ERANGE. The test > skips when no frequency-adjustable PTP device is available. > > Signed-off-by: Deep Shah Acked-by: Richard Cochran