From owner-svn-src-all@freebsd.org Tue Feb 7 17:58:38 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11117CD5FDE; Tue, 7 Feb 2017 17:58:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6D69BD8; Tue, 7 Feb 2017 17:58:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 02EBA10A791; Tue, 7 Feb 2017 12:58:37 -0500 (EST) From: John Baldwin To: Edward Tomasz Napierala Cc: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r313352 - in head/sys: compat/cloudabi compat/freebsd32 compat/linux vm Date: Tue, 07 Feb 2017 09:55:25 -0800 Message-ID: <3460210.7qRYCLqZx1@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170207125508.GA62670@brick> References: <201702062057.v16KvCtI069664@repo.freebsd.org> <20170207083909.GX2092@kib.kiev.ua> <20170207125508.GA62670@brick> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Tue, 07 Feb 2017 12:58:37 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2017 17:58:38 -0000 On Tuesday, February 07, 2017 12:55:08 PM Edward Tomasz Napierala wrote: > On 0207T1039, Konstantin Belousov wrote: > > On Mon, Feb 06, 2017 at 03:03:11PM -0800, John Baldwin wrote: > > > On Monday, February 06, 2017 08:57:12 PM Edward Tomasz Napierala wrote: > > > > Author: trasz > > > > Date: Mon Feb 6 20:57:12 2017 > > > > New Revision: 313352 > > > > URL: https://svnweb.freebsd.org/changeset/base/313352 > > > > > > > > Log: > > > > Add kern_vm_mmap2(), kern_vm_mprotect(), kern_vm_msync(), kern_vm_munlock(), > > > > kern_vm_munmap(), and kern_vm_madvise(), and use them in various compats > > > > instead of their sys_*() counterparts. > > > > > > > > Reviewed by: ed, dchagin, kib > > > > MFC after: 2 weeks > > > > Sponsored by: DARPA, AFRL > > > > Differential Revision: https://reviews.freebsd.org/D9378 > > > > > > I know kib@ suggested kern_vm_ instead of the vm_ you had suggested, > > > but just kern_ would be more consistent. That is what we have done with > > > every other system call. (e.g. there isn't kern_socket_bind, kern_socket_listen, > > > etc., but just kern_bind() and kern_listen()). > > > > Note that the kern_vm_* functions are not quite regular syscall helpers. > > The big issue with them, which caused my suggestion, is that the > > functions cannot be declared in sys/syscallsubr.h, because their > > declarations depend on the vm/*.h namespace. > > Exactly; they use vm-specific types (vm_offset_t, for example). And I > wanted to avoid changing the types all over the place, at least for now. You would only need though right? None of the actual objects are used, just things like vm_prot_t? OTOH, kern_* is currently only used for things that are syscall implementations and generally take syscall arguments directly (or close approximations of syscall arguments). It is annoying to lose the consistency in meaning. -- John Baldwin