Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp152045ybh; Fri, 17 Jul 2020 22:47:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiOYw67iU1znK86bXSuLxSShdDFKkqDXpvyYBSzyUlXSSAF1+xkYr03WGUqTOpX8GluUhH X-Received: by 2002:a05:6402:1805:: with SMTP id g5mr12066458edy.357.1595051264024; Fri, 17 Jul 2020 22:47:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595051264; cv=none; d=google.com; s=arc-20160816; b=pGm3SUQ128bVjEHIlU3Y6o+i1HzP1VM83UY0biwjwicERxyyT9DmQLUGBvFXRI2HnY qL1ZKOjFeIc7YADgPa24F1WHJ9q38rw8CjJ2HkTyw9gfdQxn5J5tmZbeddXlOvblAUUI 3VqaKQiTjm4Q62avyfp/VkyyIvxsiHmMXAZTIlJySlYGuLQfvVLfBxPQxkRTXNTmB56i 73iqoadBTVGiARL4rALPGXJ/9uMS//1sUndOjJxRbypc2UkgTNZhPPBP1EvYykBR5BFI 8Iugp+k6MB7khNUjmMaGE0KNolKdf1KSTPxFpNS9Go54WnMTfgqsz7uHxIQOGTtxFhtg LujQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KIOpgiba9LbLSa2jZb81VjU1n89FQPPzGyVATkYvMfo=; b=eqD8z387Lo0fWub2EAQ/HMZ74MQvUIzcx90OPbW9dMvAcxpSr+XARsZqTq38wbCU6Q UKPt9UOoyz77w/UhMkoAREFoYqnm034DOBzLEWs24NN5NTRyCfUj5K6M2ulV+Xa9jdZw OVtcegPPHr4Ba938jve3wpBUpP808JgWj81vBlXe5hAOgugVxPB4AyvUvGUQ2RXu3d3P 2rd3umvuLSbgdRGDDKoiq1LitzBAgo321Ey1sw+fYtVbXm7mf86JgedDd1iuFHnuLZ3P ZOMaR5Jj3bcyqU8rti2i1ll1lAEEmLbrqC2MD9dLxxTCiN4s4Zd4/a3VAjrNVHcFShJO QR3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OSXLimAn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rn3si6662727ejb.165.2020.07.17.22.47.21; Fri, 17 Jul 2020 22:47:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OSXLimAn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbgGRFpE (ORCPT + 99 others); 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-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.