From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3z6pMX0g9hzDqMn for ; Thu, 28 Dec 2017 23:05:39 +1100 (AEDT) Received: by mail-wm0-x243.google.com with SMTP id f206so43411010wmf.5 for ; Thu, 28 Dec 2017 04:05:39 -0800 (PST) Sender: Ingo Molnar Date: Thu, 28 Dec 2017 13:05:31 +0100 From: Ingo Molnar To: Ard Biesheuvel Cc: Linus Torvalds , Linux Kernel Mailing List , "H. Peter Anvin" , Ralf Baechle , Arnd Bergmann , Heiko Carstens , Kees Cook , Will Deacon , Michael Ellerman , Thomas Garnier , Thomas Gleixner , "Serge E. Hallyn" , Bjorn Helgaas , Benjamin Herrenschmidt , Russell King , Paul Mackerras , Catalin Marinas , "David S. Miller" , Petr Mladek , Ingo Molnar , James Morris , Andrew Morton , Nicolas Pitre , Josh Poimboeuf , Steven Rostedt , Martin Schwidefsky , Sergey Senozhatsky , Jessica Yu , linux-arm-kernel@lists.infradead.org, linux-mips , ppc-dev , linux-s390 , sparclinux@vger.kernel.org, the arch/x86 maintainers Subject: Re: [PATCH v6 2/8] module: use relative references for __ksymtab entries Message-ID: <20171228120531.xhcb4dg2qu2z5ssp@gmail.com> References: <20171227085033.22389-1-ard.biesheuvel@linaro.org> <20171227085033.22389-3-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , * Ard Biesheuvel wrote: > Annoyingly, we need this because there is a single instance of a > special section that ends up in the EFI stub code: we build lib/sort.c > again as a EFI libstub object, and given that sort() is exported, we > end up with a ksymtab section in the EFI stub. The sort() thing has > caused issues before [0], so perhaps I should just clone sort.c into > drivers/firmware/efi/libstub and get rid of that hack. > > [0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=29f9007b3182ab3f328a31da13e6b1c9072f7a95 If the root problem is early bootstrap code randomly using generic facility that isn't __init, then we should definitely improve tooling to at least detect these problems. As bootstrap code gets improved (KASLR, more complex decompression, etc. etc.) we keep using new bits of generic facilities... So this should definitely not be hidden by open coding that function (which has various other disadvantages as well), but should be turned from silent breakage either into non-breakage (and do so not only for sort() but for other generic functions as well), or should be turned into a build failure. Thanks, Ingo