Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752785AbcDZWdw (ORCPT ); Tue, 26 Apr 2016 18:33:52 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:35970 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752463AbcDZWdv (ORCPT ); Tue, 26 Apr 2016 18:33:51 -0400 MIME-Version: 1.0 In-Reply-To: <20160426205030.GI13997@two.firstfloor.org> References: <20160426205030.GI13997@two.firstfloor.org> From: Andy Lutomirski Date: Tue, 26 Apr 2016 15:33:30 -0700 Message-ID: Subject: Re: [PATCH 5/8] x86/arch_prctl/64: Remove FSBASE/GSBASE < 4G optimization To: Andi Kleen Cc: Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Borislav Petkov , Brian Gerst Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 840 Lines: 19 On Tue, Apr 26, 2016 at 1:50 PM, Andi Kleen wrote: > On Tue, Apr 26, 2016 at 12:23:28PM -0700, Andy Lutomirski wrote: >> As far as I know, the optimization doesn't work on any modern distro >> because modern distros use high addresses for ASLR. Remove it. > > I disagree with this patch. For example it will be a regression > for static executables. And randomly making old systems slower is a bad > idea. That's odd. statically linked glibc uses low addresses, even in PIE mode. I wonder why. In any event, this isn't actually much of a performance regression, it has no effect on normal dynamically linked programs, and it's a considerably simplification, so I still think it's a good idea. It also removes some nasty special cases from code that is already way too full of special cases for comfort. --Andy