Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 28 Dec 2002 23:11:02 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 28 Dec 2002 23:11:02 -0500 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:13843 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Sat, 28 Dec 2002 23:11:01 -0500 Date: Sat, 28 Dec 2002 20:13:44 -0800 (PST) From: Linus Torvalds To: Jeff Dike cc: linux-kernel@vger.kernel.org, Ingo Molnar Subject: Re: [PATCH] Allow UML kernel to run in a separate host address space In-Reply-To: <200212282337.SAA04085@ccure.karaya.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1530 Lines: 38 On Sat, 28 Dec 2002, Jeff Dike wrote: > torvalds@transmeta.com said: > > On Sat, 28 Dec 2002, Jeff Dike wrote: > > > > > 3 - Ability to manipulate a child's address space (i.e. mmap, munmap, > > > mprotect on an address space which is not current->mm) > > > > Well, #3 falls under "ptrace()" as far as I'm concerned, > > Not exactly. UML needs to be able to fiddle an address space that has no > process in it (swapout, COWing, maybe a few other things). But that is an address space that it should already has access to through, since it created it in the first place (ie it would fall under the normal "sys_mm_indirect()" case). The thing that I _really_ don't want to have is soem uncontrolled way to generate accesses to existing "struct mm_struct"s, since that is really dangerous from a security standpoint. We could have a PTRACE_GET_MM_FD kind of thing for ptrace (and then the gdb/tracer can use that to create mappings in the process), but the reason I want that "hook" to be through ptrace itself is simply that it's a known interface to control other unrelated processes. So if you create the MM's yourself, you can use the indirection directly. But if you want to control your children or unrelated processes, you use ptrace to get the hook. Linus - 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/