Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031760AbWLGHKa (ORCPT ); Thu, 7 Dec 2006 02:10:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1031761AbWLGHKa (ORCPT ); Thu, 7 Dec 2006 02:10:30 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:42458 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031760AbWLGHK3 (ORCPT ); Thu, 7 Dec 2006 02:10:29 -0500 Subject: Re: Obtaining a list of memory address ranges allocated to processes From: Arjan van de Ven To: Stephen Torri Cc: Linux Kernel In-Reply-To: <1165449386.13079.30.camel@base.torri.org> References: <1165449386.13079.30.camel@base.torri.org> Content-Type: text/plain Organization: Intel International BV Date: Thu, 07 Dec 2006 08:10:26 +0100 Message-Id: <1165475426.3233.476.camel@laptopd505.fenrus.org> Mime-Version: 1.0 X-Mailer: Evolution 2.8.1.1 (2.8.1.1-3.fc6) Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 923 Lines: 22 On Wed, 2006-12-06 at 17:56 -0600, Stephen Torri wrote: > I am trying to create a custom ELF and Windows PE loader for the purpose > of security research. I am having a difficult time finding how to > allocate memory for a binary at the desired address in memory > (especially if its non-relocatable). I would like to see why I cannot > get memory allocated at the exact address request in the binary headers. > Is there a program or system call that allows me to see a list of memory > address ranges allocated to the running processes on a system? Hi, check the /proc//maps and /proc//smaps files... they have exactly what you need Greetings, Arjan van de Ven - 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/