From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [REGRESSION] "efi: efistub: Convert into static library" and preparation patches Date: Wed, 03 Sep 2014 14:47:32 -0700 Message-ID: <54078C74.2060804@zytor.com> References: <5405E186.2080406@canonical.com> <20140902192941.GB3001@console-pimps.org> <5406D0DB.90401@canonical.com> <54073409.6030004@canonical.com> <20140903175948.GH3001@console-pimps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140903175948.GH3001-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Matt Fleming , Ard Biesheuvel Cc: Maarten Lankhorst , Ulf Winkelvos , Matt Fleming , LKML , "x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Seth Forshee , Matthew Garrett List-Id: linux-efi@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