From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761808AbXGEUxf (ORCPT ); Thu, 5 Jul 2007 16:53:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759662AbXGEUx2 (ORCPT ); Thu, 5 Jul 2007 16:53:28 -0400 Received: from mx1.redhat.com ([66.187.233.31]:59384 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758894AbXGEUx1 (ORCPT ); Thu, 5 Jul 2007 16:53:27 -0400 Message-ID: <468D5A3A.1010306@redhat.com> Date: Thu, 05 Jul 2007 16:53:14 -0400 From: Chuck Ebbert Organization: Red Hat User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Jiri Kosina CC: Jakub Jelinek , Andrew Morton , Jan Kratochvil , Ingo Molnar , Rik van Riel , linux-kernel@vger.kernel.org, Ernie Petrides Subject: Re: [PATCH][RESEND] PIE randomization References: <20070511125629.3df919cf.akpm@linux-foundation.org> <20070511133651.63f8a14d.akpm@linux-foundation.org> <20070522161642.b71ddacb.akpm@linux-foundation.org> <20070704082554.GQ7012@devserv.devel.redhat.com> In-Reply-To: Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 07/04/2007 01:35 PM, Jiri Kosina wrote: > On Wed, 4 Jul 2007, Jakub Jelinek wrote: > >> The above highlighted changes are the cause of random segfaults of PIE >> binaries. See >> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=246623 > > Thanks a lot for pointing this out. Andrew, could this be folded into > pie-randomization.patch please? > > > From: Jiri Kosina > > pie randomization: fix BAD_ADDR macro > > pie-randomization.patch makes the load_addr in load_elf_interp() the load > bias of ld.so (difference between the actual load base address and first > PT_LOAD segment's p_vaddr). If the difference equals (on x86) to > 0xfffff000 (which is valid [1]), SIGSEGV is incorrectly sent. > > This patch changes the BAD_ADDR so that it catches the mappings to the > error-area properly. But what about this patch that made the opposite change: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ce51059be56f63762089412b3ece348067afda85 There was a reason for that change...