struct timex and Linux adjtimex()

Brooks Davis brooks at freebsd.org
Thu Dec 3 16:36:01 UTC 2020


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20201203/3e981da1/attachment.sig>


More information about the freebsd-arch mailing list