Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932627AbVLNPtF (ORCPT ); Wed, 14 Dec 2005 10:49:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932624AbVLNPtE (ORCPT ); Wed, 14 Dec 2005 10:49:04 -0500 Received: from atlrel6.hp.com ([156.153.255.205]:11970 "EHLO atlrel6.hp.com") by vger.kernel.org with ESMTP id S932622AbVLNPtC (ORCPT ); Wed, 14 Dec 2005 10:49:02 -0500 From: Bjorn Helgaas To: "Luck, Tony" Subject: Re: [patch 2/2] /dev/mem validate mmap requests Date: Wed, 14 Dec 2005 08:48:56 -0700 User-Agent: KMail/1.8.3 Cc: linux-kernel@vger.kernel.org, "Andrew Morton" , linux-ia64@vger.kernel.org References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512140848.56570.bjorn.helgaas@hp.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1385 Lines: 30 On Tuesday 13 December 2005 5:25 pm, Luck, Tony wrote: > > Tony, can you ack/nak this please? It touches both ia64 and generic > > code. > > So if someone tries to mmap a range that spans across more than > one EFI memory descriptor, the size will get trimmed back to an > EFI memory boundary. Isn't that a problem since 1< is less than the default ia64 Linux page size? The EFI page size is smaller than the Linux page size, but firmware typically coalesces adjacent ranges with the same attributes. > I think you may need a more complex checker that does aggregation > of adjacent efi memory descriptors with the same attributes. We could, but I don't think it's worth it at this point. We've been using the same simple-minded scheme for validating /dev/mem read & write requests for quite a while with no problems, and I don't want to over-engineer this. If hot-plug memory is ever finished, the checker may have to be extended to comprehend regions described by ACPI as well as those described in the boot-time EFI memory map. I think that would be the right time to make it smarter about spanning descriptors. - 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/