From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22097 invoked by alias); 24 Mar 2004 14:50:58 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22074 invoked from network); 24 Mar 2004 14:50:57 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sources.redhat.com with SMTP; 24 Mar 2004 14:50:57 -0000 Received: (qmail 20664 invoked by uid 10); 24 Mar 2004 14:50:56 -0000 Received: (qmail 17940 invoked by uid 500); 24 Mar 2004 14:50:48 -0000 From: Ian Lance Taylor To: Eli Zaretskii Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [PATCH/ezannoni_pie-20040323-branch] New branch and pie References: <16481.2186.51092.295353@localhost.redhat.com> Date: Wed, 24 Mar 2004 14:50:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-03/txt/msg00558.txt.bz2 Eli Zaretskii writes: > > From: Elena Zannoni > > Date: Tue, 23 Mar 2004 23:03:22 -0500 > > > > I gave up updating the old branch that I had created for PIE work. > > I just created a new one: ezannoni_pie-20040323-branch. > > Thanks. > > Any pointers to previous discussions of the reason(s) for this? I > cannot say I understand what is this supposed to do. Are you asking about what PIE is supposed to do, or something abour Elena's support for it? PIE is a hack to make executables more secure. The theory is that worms attack your system by causing a stack overrun on your program and by controlling what they write onto the stack. In an ordinary executable, the worm code can know precisely where the executable is located in memory, and they can take advantage of that fact to let the stack overrun code call into the executable directly. Using PIE means that the worm can not successfully call into the executable, because it doesn't know what location to call. I think it's kind of a desperation move, personally. It's trivial for a worm to make direct system calls. I would be all for PIE if it were free or nearly free, but it's not. It makes the executable larger, and it adds relocations which make the executable slower to load. This is in contract to exec-shield-randomize, for example, which randomizes the sbrk and stack address so that worms can't rely on a particular stack location when executing. As protection against worms this is very nearly useless, but it's also pretty much free, so I think it's a good idea. Ian