From owner-freebsd-geom@FreeBSD.ORG Thu Mar 15 05:23:53 2012 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B5952106566B for ; Thu, 15 Mar 2012 05:23:53 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 46D118FC08 for ; Thu, 15 Mar 2012 05:23:52 +0000 (UTC) Received: by wibhj6 with SMTP id hj6so6721285wib.13 for ; Wed, 14 Mar 2012 22:23:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding:x-gm-message-state; bh=P3KHYaTWBYPr50xGIJw/egsIZ8cZyjL8B17vl03X5FA=; b=NU5gzzQ+yRZuvJjXXcIFuUSiEUY+H7HSCS/mgIn4xMOdcpJHJLWIaHOmT/YmFM9JLG FqlrbF/2Hxb1RgP9Oi8r6v8xN5ocsT4bo7Yh0tZf3MAErNyXW1Ur8rsZ1MfDX4NufDFW jrX8gslkQfGo89c8ViNJvcVHrmTG+XAFT/80CsjcIVIdVEoWXZPTOfSWNKhVhjTGRtEN zmM4g0WymBo+diSubApwpN+U/DgCWIxOVzu//KWYAsRFwtgrcR91kiWUIMuDDNBLZ8ti U9Wn80yi03bAZhe8RQEmoaEQNaUJBUwWV9B/UNwHHVN+LktpDCl7EWW4thiajxXvIoJ+ QMNg== Received: by 10.216.134.155 with SMTP id s27mr3591586wei.80.1331789032153; Wed, 14 Mar 2012 22:23:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.96.231 with HTTP; Wed, 14 Mar 2012 22:23:32 -0700 (PDT) In-Reply-To: References: From: Juli Mallett Date: Wed, 14 Mar 2012 22:23:32 -0700 Message-ID: To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlZUuktjKuEk5OFMYebz7saihvoKDSx0ZmfEPK8nZ9FieTH+ugtZK6gxEW5lTWOYc0MlAon Subject: Re: libgeom's use of kernel pointer identifiers / proper internalization of opaque strings X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 05:23:53 -0000 Hello again, I haven't gotten any feedback on this problem in the last 10 days and at this point think the path I took is the best one forward at this time. It's my plan to commit in the near future (within a few days, I suppose) unless anyone has an objection. If anyone wants to give it a review or if multiple people decide to test it on their systems, I'd be happy to commit earlier. Thanks, Juli. On Sun, Mar 4, 2012 at 21:32, Juli Mallett wrote: > Hey folks, > > libgeom assumes that the id and ref parameters from the kernel can be > represented as userland pointers. =C2=A0This is certainly handy in terms = of > making the pointer substitution that occurs straightforward, but it > breaks running a 32-bit libgeom on a 64-bit kernel where the first > 32-bits of the kernel pointers are identical and non-zero. =C2=A0It seems > to me that using strtoumax and uintmax_t for the opaque identifiers > and making the pointers separate fields will give better behavior in > general (no crashes on unresolved references in the kernel due to > someone forgetting to properly declare a class) and also fix this > problem. > > If that is undesirable, then using gident to do internalization on the > fly either using strtoumax or using the strings directly might be > better. =C2=A0Here's a rough cut of using the strings to do internalizati= on > which I've tested and believe can be committed. =C2=A0If anyone feels lik= e > reviewing it or suggesting a better fix to libgeom, I'd be happy to > hear it. > > http://people.freebsd.org/~jmallett/internalize-libgeom-ids.diff > > CCing Nathan W. who does not see this problem on PowerPC64, but I > suspect could under the right circumstances. > > Thanks, > Juli. > > PS: Please CC me as I am not subscribed to the list. =C2=A0And if you thi= nk > the patch is great, just commit me. =C2=A0I don't really want to touch > libgeom.