From owner-svn-src-head@FreeBSD.ORG Wed Oct 29 16:58:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 464BAEE; Wed, 29 Oct 2014 16:58:46 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC1946B2; Wed, 29 Oct 2014 16:58:45 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s9TGwfhK007556 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 29 Oct 2014 18:58:41 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s9TGwfhK007556 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s9TGwfXp007555; Wed, 29 Oct 2014 18:58:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 29 Oct 2014 18:58:40 +0200 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r273784 - in head/sys: amd64/ia32 compat/freebsd32 i386/i386 kern net Message-ID: <20141029165840.GG53947@kib.kiev.ua> References: <201410281528.s9SFSLs2013764@svn.freebsd.org> <20141029042007.N2423@besplex.bde.org> <20141029155230.GE53947@kib.kiev.ua> <201410291200.49330.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201410291200.49330.jhb@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2014 16:58:46 -0000 On Wed, Oct 29, 2014 at 12:00:49PM -0400, John Baldwin wrote: > On Wednesday, October 29, 2014 11:52:30 am Konstantin Belousov wrote: > > On Wed, Oct 29, 2014 at 06:26:42AM +1100, Bruce Evans wrote: > > > I just noticed some more API design errors. The pointer type for new > > > APIs should be [qualifed] wordsize_t *, not [qualified] void *. Using > > > void * reduces type safety for almost no benefits. The casuword() > > > family already doesn't use void *. > > casuword() has very limited use, it was invented for umtx, and used > > only there. That said, I tend to agree with somewhat implicit note > > that base argument for fuword() and family should be vm_offset_t. > > I think Bruce is suggesting 'volatile long *' or 'volatile int32_t *' > rather than vm_offset_t. In main text, yes. But there was a small note, and I better like the vm_offset_t thing than normal pointers to different address space. In fact, something like Linux' __user annotation + vm_offset_t, which would put it extremely explicit that the address cannot be used as pointer at all. But we do not have anything 'dimentional' which would allow to prevent mixing __user and normal pointers. Some day Intel may release CPUs with SMAP.