svn commit: r292777 - in head: lib/libc/sys sys/kern

Ian Lepore ian at freebsd.org
Sun Dec 27 17:10:46 UTC 2015


On Sun, 2015-12-27 at 15:37 +0000, Dmitry Chagin wrote:
> Author: dchagin
> Date: Sun Dec 27 15:37:07 2015
> New Revision: 292777
> URL: https://svnweb.freebsd.org/changeset/base/292777
> 
> Log:
>   Verify that tv_sec value specified in settimeofday() and
> clock_settime()
>   (CLOCK_REALTIME case) system calls is non negative.
>   This commit hides a kernel panic in atrtc_settime() as the
> clock_ts_to_ct()
>   does not properly convert negative tv_sec.
>   
>   ps. in my opinion clock_ts_to_ct() should be rewritten to properly
> handle
>   negative tv_sec values.
>   
>   Differential Revision:	https://reviews.freebsd.org/D4714
>   Reviewed by:		kib
>   
>   MFC after:	1 week

IMO, this change is completely unacceptable.  If there is a bug in
atrtc code, then by all means fix it, but preventing anyone from
setting valid time values on the system because one driver's code can't
handle it is just wrong.

-- Ian



More information about the svn-src-all mailing list