From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756943Ab0JLHp2 (ORCPT ); Tue, 12 Oct 2010 03:45:28 -0400 Received: from one.firstfloor.org ([213.235.205.2]:46368 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756713Ab0JLHp1 (ORCPT ); Tue, 12 Oct 2010 03:45:27 -0400 Date: Tue, 12 Oct 2010 09:45:22 +0200 From: Andi Kleen To: Marco Stornelli Cc: Andi Kleen , Linux Kernel , Linux Embedded , Linux FS Devel , Tim Bird , linux-mm@kvack.org Subject: Re: [PATCH 14(16] pramfs: memory protection Message-ID: <20101012074522.GA20436@basil.fritz.box> References: <4CB1EBA2.8090409@gmail.com> <87aamm3si1.fsf@basil.nowhere.org> <4CB34A1A.3030003@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CB34A1A.3030003@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 11, 2010 at 07:32:10PM +0200, Marco Stornelli wrote: > Il 10/10/2010 18:46, Andi Kleen ha scritto: > > This won't work at all on x86 because you don't handle large > > pages. > > > > And it doesn't work on x86-64 because the first 2GB are double > > mapped (direct and kernel text mapping) > > > > Thirdly I expect it won't either on architectures that map > > the direct mapping with special registers (like IA64 or MIPS) > > Andi, what do you think to use the already implemented follow_pte > instead? Has all the same problems. Really you need an per architecture function. Perhaps some architectures could use a common helper, but certainly not all. x86 already has some infrastructure for this, but it currently has serious problems too (like not merging mappings on unmap) and is generally overdesigned ugly code. -Andi