From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756838AbaICVrs (ORCPT ); Wed, 3 Sep 2014 17:47:48 -0400 Received: from terminus.zytor.com ([198.137.202.10]:53127 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756792AbaICVrq (ORCPT ); Wed, 3 Sep 2014 17:47:46 -0400 Message-ID: <54078C74.2060804@zytor.com> Date: Wed, 03 Sep 2014 14:47:32 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Matt Fleming , Ard Biesheuvel CC: Maarten Lankhorst , Ulf Winkelvos , Matt Fleming , LKML , "x86@kernel.org" , "linux-efi@vger.kernel.org" , Seth Forshee , Matthew Garrett Subject: Re: [REGRESSION] "efi: efistub: Convert into static library" and preparation patches References: <5405E186.2080406@canonical.com> <20140902192941.GB3001@console-pimps.org> <5406D0DB.90401@canonical.com> <54073409.6030004@canonical.com> <20140903175948.GH3001@console-pimps.org> In-Reply-To: <20140903175948.GH3001@console-pimps.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Any reason we can't reuse the existing GOT fixup code in the early x86 > boot code? We're not executing it before the EFI boot stub atm, which is > the reason Maarten is hitting these difficulties. > > Maarten, does the following help? > > If not, Ard please go ahead with option #2 above. Overkill yes, but I've > done the single __attribute__() hacks in other projects and someone > (usually me) always eventually forgets to tag some instance. > I think we really have two options: either fix up the GOT (which may be a null operation, if the GOT is empty) or we add a compile-time check that the GOT is empty, lest we will keep having these problems. Since the GOT fixup loop is only a few instructions, it doesn't seem to be all that problematic to just do it -- but make sure we don't end up running it twice on any code path! -hpa