From owner-svn-src-head@FreeBSD.ORG Tue Nov 16 00:34:35 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C3BA106564A; Tue, 16 Nov 2010 00:34:35 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id C842F8FC16; Tue, 16 Nov 2010 00:34:34 +0000 (UTC) Received: by qyk32 with SMTP id 32so416918qyk.13 for ; Mon, 15 Nov 2010 16:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=mkzxH9xDxcs5/0AYhsEZxlnrezRZOKDMWVxRw4lRHIY=; b=U3kIFN/t6P9vFdHiGKon01hOQkzi6DA061GrO3SKCBEOJrUAuG25HzQJxxqEfWT7zC WtpNakisFHlQ6CjoiPf8kBmmmSTGKZDHfGAVH7Dsby89lMsjJDzdR26MRMgZdX+swTqn h+OS3YKr7E0bIgfBByCvIhPqHexGePIipAReQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=hbFgnmVg5H63VJqIch9448+0xFyy0dlCM0Fxi1VxJrVQPLPe2ghxlhqWbpiRLL9XKZ mPAkRNAlk0rjY58I7wnuAsa3IfMMHnzWcFyZd+iHcpKeFu4K0toVsjF+ll30NSUe2YFE 7138hbIyhzkmqjalxiQzDpe2mkIeE/uFwhq3k= Received: by 10.229.212.5 with SMTP id gq5mr5572598qcb.275.1289867673596; Mon, 15 Nov 2010 16:34:33 -0800 (PST) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.229.231.143 with HTTP; Mon, 15 Nov 2010 16:33:53 -0800 (PST) In-Reply-To: <20101115171016.GB20524@onelab2.iet.unipi.it> References: <201011121302.oACD2Qjt009385@svn.freebsd.org> <20101115171016.GB20524@onelab2.iet.unipi.it> From: Ivan Voras Date: Tue, 16 Nov 2010 01:33:53 +0100 X-Google-Sender-Auth: zJWXgp7gaxFYd6597YXNOynBguI Message-ID: To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r215178 - in head: lib/libc/sys sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 16 Nov 2010 00:34:35 -0000 On 15 November 2010 18:10, Luigi Rizzo wrote: > 2. [generic] passing pointers between userland and kernel > requires remapping the pointer when going up or down. > As the mapping would be application specific, i don't > see much use in allowing room for a pointer without kernel code > to map userland <-> kernel pointers. I'm not thinking of passing a *working* pointer into the kernel but used as a cookie, similar to how it's used in kqueue: the intention being the application can send and get a pointer which means something to the application, not something usable to the kernel. Without using intptr_t, if an application wants to hang a structure on the cookie, it needs to maintain its own translation table (index-to-pointer).