From owner-cvs-all Fri Apr 12 14: 5:37 2002 Delivered-To: cvs-all@freebsd.org Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by hub.freebsd.org (Postfix) with ESMTP id C5B9037B400; Fri, 12 Apr 2002 14:05:29 -0700 (PDT) Received: (from jake@localhost) by k6.locore.ca (8.11.6/8.11.6) id g3CL8g215070; Fri, 12 Apr 2002 17:08:42 -0400 (EDT) (envelope-from jake) Date: Fri, 12 Apr 2002 17:08:42 -0400 From: Jake Burkholder To: Alan Cox Cc: Thomas Moestl , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern sys_pipe.c Message-ID: <20020412170842.B10110@locore.ca> References: <200204121938.g3CJcfk69260@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from alc@cs.rice.edu on Fri, Apr 12, 2002 at 03:42:37PM -0500 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Apparently, On Fri, Apr 12, 2002 at 03:42:37PM -0500, Alan Cox said words to the effect of; > > > On Fri, 12 Apr 2002, Thomas Moestl wrote: > > > tmm 2002/04/12 12:38:41 PDT > > > > Modified files: > > sys/kern sys_pipe.c > > Log: > > Do not use pmap_kextract() to find out the physical address of a user > > belong to a user virtual address; while this happens to work on some > > architectures, it can't on sparc64, since user and kernel virtual > > address spaces overlap there (the distinction between them is done via > > separate address space identifiers). > > > > Why not pmap_extract() on the map->pmap? pmap_extract() is the equivalent > of pmap_kextract() for ordinary pmap's, i.e., not the kernel pmap. > > Alan Because the sparc64 pmap uses a hash table like structure for non-kernel pmaps with fixed size buckets. If there are too many hash collisions a mapping can be forced out causing a replacement and a soft fault on the next access. Basically, pmap_extract is not guaranteed to work for ordinary pmaps. Jake > > > Instead, look up the page in the vm_map of the process in question. > > > > Reviewed by: jake > > > > Revision Changes Path > > 1.102 +17 -6 src/sys/kern/sys_pipe.c > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message