Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 May 2019 09:40:18 -0700
From:      John Baldwin <jhb@FreeBSD.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        Mark Johnston <markj@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r347063 - head/sys/kern
Message-ID:  <c9723f2e-a1d6-3df0-405c-1d9933e4e651@FreeBSD.org>
In-Reply-To: <20190508001838.B1127@besplex.bde.org>
References:  <201905032126.x43LQilu092655@repo.freebsd.org> <335d828e-ac61-bc59-bac3-f80f27b951c7@FreeBSD.org> <20190506184502.GA35464@raichu> <52484f6b-fdae-565b-6c03-37a63d56ad30@FreeBSD.org> <20190508001838.B1127@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 5/7/19 8:45 AM, Bruce Evans wrote:
> On Mon, 6 May 2019, John Baldwin wrote:
> 
>> On 5/6/19 11:45 AM, Mark Johnston wrote:
>>> On Mon, May 06, 2019 at 11:07:18AM -0700, John Baldwin wrote:
>>>> On 5/3/19 2:26 PM, Mark Johnston wrote:
>>>>> Author: markj
>>>>> Date: Fri May  3 21:26:44 2019
>>>>> New Revision: 347063
>>>>> URL: https://svnweb.freebsd.org/changeset/base/347063
>>>>>
>>>>> Log:
>>>>>   Disallow excessively small times of day in clock_settime(2).
> 
> This actually disallows negative timespecs in clock_settime(), with
> collateral disallowment for small positive times.

FWIW, clock_settime already disallows negative times due to the
existing check in the previous two lines:

	if (ats->tv_nsec < 0 || ats->tv_nsec >= 1000000000 ||
	    ats->tv_sec < 0)
		return (EINVAL);

I would probably lean towards not disallowing negative times as I
said in one of my earlier replies, but given we have that blanket
check already in place, the current patch doesn't seem to make
things much worse.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c9723f2e-a1d6-3df0-405c-1d9933e4e651>