Thread (7 messages) flat view 7 messages, 4 authors, 1d ago

Re: [PATCH net-next v3 2/2] selftests: ptp: add a regression test for the frequency adjustment overflow

From: Richard Cochran <richardcochran@gmail.com>
Date: 2026-08-02 18:50:01
Also in: linux-kselftest, lkml

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 <redacted>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help