From owner-freebsd-arch@FreeBSD.ORG Wed Jul 23 05:12:11 2008 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11ED6106567D for ; Wed, 23 Jul 2008 05:12:11 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx08.syd.optusnet.com.au (fallbackmx08.syd.optusnet.com.au [211.29.132.10]) by mx1.freebsd.org (Postfix) with ESMTP id 2A4BF8FC15 for ; Wed, 23 Jul 2008 05:12:06 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by fallbackmx08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m6MHIQE2025652 for ; Wed, 23 Jul 2008 03:18:27 +1000 Received: from c220-239-252-11.carlnfd3.nsw.optusnet.com.au (c220-239-252-11.carlnfd3.nsw.optusnet.com.au [220.239.252.11]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m6MHIKrK025636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Jul 2008 03:18:22 +1000 Date: Wed, 23 Jul 2008 03:18:20 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Alfred Perlstein In-Reply-To: <20080721214104.GF76659@elvis.mu.org> Message-ID: <20080723025519.F18257@delplex.bde.org> References: <34889018-8358-46AC-897E-32767FB84E14@mac.com> <200807211049.47579.jhb@freebsd.org> <20080721214104.GF76659@elvis.mu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Marcel Moolenaar , freebsd-arch@FreeBSD.org Subject: Re: RFC: cross-libkvm/libthread_db/proc_service X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2008 05:12:11 -0000 On Mon, 21 Jul 2008, Alfred Perlstein wrote: > Isn't it a bit strange to export 64bit pointers to 32 bit userspace? Only for pointers in kernel objects, and I think the proposed change doesn't touch that. kvm_read() doesn't use pointers for kernel addresses. It uses unsigned longs. But even uintmax_t is not enough in general, since the application uintmax_t might be too small to represent a kernel pointer. The type used shouldn't be fixed-width, but typedefed in an MD way like vm_offset_t. vm_offset_t gives the correct integral type to use for (mapped) kernel addresses and related compat_fewer_bit[s] type[s] are needed in userland. It would probably be too hard to support the general case which requires the compat types to be arrays or structs. Bruce