Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Dec 2020 16:35:54 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Cy Schubert <Cy.Schubert@cschubert.com>, freebsd-arch@freebsd.org
Subject:   Re: struct timex and Linux adjtimex()
Message-ID:  <20201203163554.GG18452@spindle.one-eyed-alien.net>
In-Reply-To: <X8i4UIzzH7vxkKvH@kib.kiev.ua>
References:  <202012030523.0B35NsG7003810@slippy.cwsent.com> <X8i4UIzzH7vxkKvH@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

--Pql/uPZNXIm1JCle
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Thu, Dec 03, 2020 at 12:05:04PM +0200, Konstantin Belousov wrote:
> 2. Extend existing struct timex with struct timeval at the end of
>    the structure, but do not require it for any mode except when
>    ADJ_SETOFFSET is specified in modes.  In other words, syscall
>    should copyin legacy struct timex, and if ADJ_SETOFFSET is set,
>    copying struct timeval from the address right after timex.

Discussion seems to have selected option 1, but to put a stake in it,
this option should be avoided due to the complexity it imposes on system
call wrappers and argument validators.  In general, paths should be the
only arguments with lengths not immediately determinable from the type or
a length argument.  Anything that complicates determining the memory
footprint of a system call is to be avoided.

-- Brooks

--Pql/uPZNXIm1JCle
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJfyRPpAAoJEKzQXbSebgfAoFYIAJKQo4O8PC/eIydoLkiS2Gwf
kk46p43taa81b7brS2CSeNkUjNKKmICvoKYhEduM7U197wDK8aEm2AVg/dAidXVN
5vs8oQxHGyKO2WpIOAyOxHpAugKSJuerg37gG7oVwkYAhpOn+mZqCwdHkfiF/f1M
ssNmP6sOZ7+4BXyStsmYlMR3oXETBHmKeFGYeaBSzLFNOz8t9qKjER2+Nc6Rwz9K
V9g3J5qgvCCdcBNVp9FybxGq1Q/b1ii5OEGijWvLOGZB9ET9UwkXd6IF52U3Tq+L
+/y1Cid2EAjMDgECV4LCjgsFCm4Nwyo2imP2duIAutndPtQPhFVoAql3IOxLcns=
=th0k
-----END PGP SIGNATURE-----

--Pql/uPZNXIm1JCle--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20201203163554.GG18452>