From owner-dev-commits-src-all@freebsd.org Wed Jan 6 00:03:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62EBD4D6D0C; Wed, 6 Jan 2021 00:03:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D9V2026fMz3syn; Wed, 6 Jan 2021 00:03:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:11:fde3:f137:e47f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 6772A459F; Wed, 6 Jan 2021 00:03:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 022ca2fc7fe0 - main - Add aio_writev and aio_readv To: Alan Somers , Brooks Davis Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202101030259.1032x5hV006606@gitrepo.freebsd.org> <20210105231100.GD94898@spindle.one-eyed-alien.net> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/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TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Tue, 5 Jan 2021 16:03:17 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2021 00:03:20 -0000 On 1/5/21 3:26 PM, Alan Somers wrote: > On Tue, Jan 5, 2021 at 4:11 PM Brooks Davis wrote: > >> On Sat, Jan 02, 2021 at 10:09:04PM -0700, Alan Somers wrote: >>> On Sat, Jan 2, 2021 at 9:39 PM Jessica Clarke >> wrote: >>> >>>> On 3 Jan 2021, at 02:59, Alan Somers wrote: >>>>> diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master >>>>> index b7ea5e939635..aaa0a1277461 100644 >>>>> --- a/sys/kern/syscalls.master >>>>> +++ b/sys/kern/syscalls.master >>>>> @@ -1477,7 +1477,17 @@ >>>>> _In_opt_ struct sigevent *sig >>>>> ); >>>>> } >>>>> -258-271 AUE_NULL UNIMPL nosys >>>>> +258 AUE_AIO_WRITEV STD { >>>>> + int aio_writev( >>>>> + _Inout_ struct aiocb *aiocbp >>>>> + ); >>>>> + } >>>>> +259 AUE_AIO_READV STD { >>>>> + int aio_readv( >>>>> + _Inout_ struct aiocb *aiocbp >>>>> + ); >>>>> + } >>>>> +260-271 AUE_NULL UNIMPL nosys >>>>> 272 AUE_O_GETDENTS COMPAT11 { >>>>> int getdents( >>>>> int fd, >>>> >>>> Should these not be added to the end? >>>> >>>> Jess >>>> >>> >>> Should they be? I'm not aware of any requirement to add new syscalls to >>> the end. I put them here so they would be next to the other AIO >> syscalls. >> >> Yes. I'm sorry I missed this in the review. It's vastly easier to audit >> these files and address conflicts if they are append-only. We're also >> using these syscall numbers internally specifically to avoid conflicts >> with new syscalls. Please move them to the end. >> >> I do see that we only provide extremely outdated advice in the comments >> of syscalls.master. I'll take a look at improving this and the wiki >> page. >> >> Thanks, >> Brooks >> > > Ok, I'll move them. And could you please elaborate on how we're "using > these syscall numbers internally"? CheriBSD has some custom syscalls for testing in those slots. There's not really a way you could have known that though. The comments in syscalls.master are not always helpful. For example, the comment above 250 is not clear at all. It was added in r14219 and only applied to 250 and 251 at the time. r244439 added 252-254 which do seem to fall under that umbrella, and then r25537 add a big blob of reserved slots so FreeBSD system calls started at 300, but without really defining what the range was for. Presumably it was for OpenBSD/NetBSD compat still, but we also abandoned that idea entirely in r330517. Since the comment is worded poorly some folks read it as reserving a larger range, see commit r152845 for example which doesn't seem merited given the history (and given that r151867 was not similarly asked to be reverted). Humm, that comment was removed in r330517 and then brought back in r332086. I do think we should explicitly reserve our existing holes for "vendor" system calls that forks can use without having to worry about future conflicts. -- John Baldwin