Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261958AbVD0S6h (ORCPT ); Wed, 27 Apr 2005 14:58:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261959AbVD0S4v (ORCPT ); Wed, 27 Apr 2005 14:56:51 -0400 Received: from caramon.arm.linux.org.uk ([212.18.232.186]:29714 "EHLO caramon.arm.linux.org.uk") by vger.kernel.org with ESMTP id S261958AbVD0Szr (ORCPT ); Wed, 27 Apr 2005 14:55:47 -0400 Date: Wed, 27 Apr 2005 19:55:38 +0100 From: Russell King To: Jes Sorensen Cc: Christoph Hellwig , Jeff Garzik , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: returning non-ram via ->nopage, was Re: [patch] mspec driver for 2.6.12-rc2-mm3 Message-ID: <20050427195538.A964@flint.arm.linux.org.uk> Mail-Followup-To: Jes Sorensen , Christoph Hellwig , Jeff Garzik , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20050413204335.GA17012@infradead.org> <20050424101615.GA22393@infradead.org> <20050425144749.GA10093@infradead.org> <426FB56B.5000006@pobox.com> <20050427155526.GA25921@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from jes@wildopensource.com on Wed, Apr 27, 2005 at 02:03:50PM -0400 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1663 Lines: 39 On Wed, Apr 27, 2005 at 02:03:50PM -0400, Jes Sorensen wrote: > >>>>> "Christoph" == Christoph Hellwig writes: > > Christoph> On Wed, Apr 27, 2005 at 11:53:15AM -0400, Jeff Garzik > Christoph> wrote: > >> I don't see anything wrong with a ->nopage approach. > >> > >> At Linus's suggestion, I used ->nopage in the implementation of > >> sound/oss/via82cxxx_audio.c. > > Christoph> The difference is that you return kernel memory (actually > Christoph> pci_alloc_consistant memory that has it's own set of > Christoph> problems), while this is memory not in mem_map, so he > Christoph> allocates some regularly kernel memory too to have a struct > Christoph> page and just leaks it > > Are you suggesting then that we change do_no_page to handle this as a > special return value then? If you're looking to mmap dma memory, ARM already supports the API which was discussed (although not properly imho) on linux-arch. I previously posted a potential patch for x86, but it has the problem that remap_pfn_range() will not work on such memory because it isn't marked reserved. In addition, if you're mmaping dma memory on x86 as is, you're providing a potential security hole - the x86 DMA memory allocator does not extend its zeroing to cover the entire last page of the allocation. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/