From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761629Ab3LIVvY (ORCPT ); Mon, 9 Dec 2013 16:51:24 -0500 Received: from cantor2.suse.de ([195.135.220.15]:44812 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752681Ab3LIVvV (ORCPT ); Mon, 9 Dec 2013 16:51:21 -0500 Date: Mon, 9 Dec 2013 22:51:18 +0100 (CET) From: Jiri Kosina To: "H.J. Lu" Cc: LKML , Josh Boyer , "H. Peter Anvin" Subject: Re: [PATCH] binfmt_elf: fix PIE load with randomization disabled In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Dec 2013, H.J. Lu wrote: > >> No, please don't do that. Normally, PIE has zero load address and kernel > >> can load it anywhere. There are multiple reasons why PIE has non-zero > >> load address. Saying you need to load a program above 4GB under x86-64, > >> you can't do that with normal dynamic executable. PIE with non-zero load > >> address is the only way to do that on x86-64. > > > > Hmm, so if it's because of 4G PT_LOAD limit, how about at least adding > > Yes. > > > randomized offset to the supplied vaddr? > > Yes, people who build PIE with non-zero vaddr can use > randomized vaddr. I don't follow you here. Do you suggest compile-time randomzation? > > PT_LOAD being non-zero causing randomization to be turned off seems like > > quite unexpected behavior to me, with a great potential to cause a lot of > > confusion. > > > > There should be no difference between dynamic executable and PIE > with non-zero vaddr when choosing where to load them. Could you please elaborate why do you think this statement is true? Thanks, -- Jiri Kosina SUSE Labs