[ntp:hackers] SIGIO and fuzz
kardel at ntp.org
Wed Aug 14 05:55:46 UTC 2013
To be more precise, we do fuzz the time also in the SIGIO case, but the
non SIGIO case makes sure the Lamport advance is obeyed.
The comment in libntp/systime.c is
* Ensure result is strictly greater than prior result (ignoring
* sys_residual's effect for now) once sys_fuzz has been
This would be possible in the SIOIO case also when get_systime() is
called from the signal handler, but
we cannot call any output functions like msyslog() because we cannot
call non-async signal safe
code from inside a SIGIO handler path. We may be able to restore the
Lamport check for SIGIO if we
manage to move the error/debug reporting out of the get_systime() path.
This coul be done by
saving the time variables and check whether they have been set after
processing a paket when SIGIO
is blocked. We might lose a message or two, but the warning would get out.
On 08/14/13 01:11, Harlan Stenn wrote:
> In http://bugs.ntp.org/show_bug.cgi?id=2433 Frank Kardel notes that we
> can change from a low-impact runtime check to a no-impact compile-time
> check, and in examining this situation he noted that we only "fuzz" the
> time if we are *not* using signaled I/O.
> I talked with Dave Mills about this, and he can't remember why this
> might have been a good idea, and thinks we should probably always "fuzz"
> the time.
> Does anybody know a reason we should leave the current behavior alone?
More information about the hackers