From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8B48C433E6 for ; Sat, 18 Jul 2020 05:45:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A445B2076A for ; Sat, 18 Jul 2020 05:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595051105; bh=67jWIKS/zl5m8xZ1j5EHfPadzqeIRyVrdwgqbz8Js/c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=QwH5QEhcZFhFbu2SjB0Q+TSICiufsMS6wjXab6HU6u4R/iXZ4UtF6rCH+9IlKk9Tz DSHtmxZwlylFrJYAUlFepVtGHnaRz+KyjT1jA9PLMzfhH4xTrtOzw6TbRsEcKJVQPg +JME+uPKBlPwE85vwYCd08Q3LlBMphr47CrAyV5w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726697AbgGRFpE (ORCPT ); Sat, 18 Jul 2020 01:45:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:49796 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbgGRFpD (ORCPT ); Sat, 18 Jul 2020 01:45:03 -0400 Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D827E21741 for ; Sat, 18 Jul 2020 05:45:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595051103; bh=67jWIKS/zl5m8xZ1j5EHfPadzqeIRyVrdwgqbz8Js/c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=OSXLimAn5r4bfWppUfyc8T0cNYnzD87hNHFyhU0Uj/RctSOLoG918kvfiRp1Bm6Sf Gk+uvVCxBmPshqTa+rThH0dAZHlDPFn1rVMmR/az/aYwUVAcXhLxpIvfnlLJH6nB2q oUMFjZBbbqrz/DZUYoYoPFIdOhLw2qRNIV8Wy5Co= Received: by mail-ot1-f41.google.com with SMTP id n24so8426100otr.13 for ; Fri, 17 Jul 2020 22:45:02 -0700 (PDT) X-Gm-Message-State: AOAM531dPUjmeXB1Uo/aDB++zouh1frvHGDUYRzAt+pzrYhk3i0u8LHr KpK+wE+1RZcmyhXJEA17g7/YQjSUU2c7FeKisJw= X-Google-Smtp-Source: ABdhPJxpf6WTfSSxsHSWfSbgugb4biJdYQ1JGVByBKGcuW/QUTC4izPNpFxX068mIC3eFJ3Xa9CM2aCxcIt9RIbg21M= X-Received: by 2002:a9d:7553:: with SMTP id b19mr12361891otl.77.1595051102201; Fri, 17 Jul 2020 22:45:02 -0700 (PDT) MIME-Version: 1.0 References: <20200714023836.2310569-1-nivedita@alum.mit.edu> <20200715004133.1430068-1-nivedita@alum.mit.edu> <20200717134654.GA3187880@rani.riverdale.lan> In-Reply-To: From: Ard Biesheuvel Date: Sat, 18 Jul 2020 08:44:50 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 0/7] x86/boot: Remove run-time relocations from compressed kernel To: Nick Desaulniers Cc: Arvind Sankar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Fangrui Song , Dmitry Golovin , clang-built-linux , Masahiro Yamada , Sedat Dilek , Kees Cook , Nathan Chancellor , Arnd Bergmann , "H . J . Lu" , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Jul 2020 at 21:17, Nick Desaulniers wrote: > > On Fri, Jul 17, 2020 at 6:46 AM Arvind Sankar wrote: > > > > On Tue, Jul 14, 2020 at 08:41:26PM -0400, Arvind Sankar wrote: > > > The compressed kernel currently contains bogus run-time relocations in > > > the startup code in head_{32,64}.S, which are generated by the linker, > > > but must not actually be processed at run-time. > > > > > > This generates warnings when linking with the BFD linker, and errors > > > with LLD, which defaults to erroring on run-time relocations in read-only > > > sections. It also requires the -z noreloc-overflow hack for the 64-bit > > > kernel, which prevents us from linking it as -pie on an older BFD linker > > > (<= 2.26) or on LLD, because the locations that are to be apparently > > > relocated are only 32-bits in size and so cannot really have > > > R_X86_64_RELATIVE relocations. > > > > > > This series aims to get rid of these relocations. I've build- and > > > boot-tested with combinations of clang/gcc-10 with lld/bfd-2.34, and > > > gcc-4.9.0 with bfd-2.24, skipping clang on 32-bit because it currently > > > has other issues [0]. > > > > > > > Hi Thomas, Ingo, Borislav, would you be able to take a look over this > > series in time for 5.9? > > Hi Arvind, thanks for the series; I'm behind on testing. When I try > to apply this series on top of linux-next, I get a collision in > drivers/firmware/efi/libstub/Makefile:27 when applying "0002 > x86/boot/compressed: Force hidden visibility for all symbol > references". Would you mind refreshing the series to avoid that > collision? That is not the right way to deal with conflicts against -next. This series targets the -tip tree, and applies fine against it. If you want to apply it on some other tree and test it, that is fine, and highly appreciated, but 'refreshing' the series against -next means it no longer applies to -tip, and may be based on unidentified conflict resolutions performed by Stephen that the maintainers will have to deal with. Boris, Ingo, Thomas, Mind taking v5 of this series? (With Nick's Tested-by) I think these patches have been simmering long enough. Do note there is a conflict against the kbuild tree, but the resolution should be straightforward.