Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp180638ybh; Sat, 18 Jul 2020 00:02:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrgNO31cQekveBb6mT44H5yPgfZFpDzNhIK0BkYEW4Xbsld0S5YTixhMWmmg+8FJjuJlw8 X-Received: by 2002:a17:906:8595:: with SMTP id v21mr12289646ejx.333.1595055750194; Sat, 18 Jul 2020 00:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595055750; cv=none; d=google.com; s=arc-20160816; b=I/OlsWgZuU1YGIb2eHTQa1e+Zkajxu2xe+ajdzxZjYONfNSH4whU60vQCPApiKWah6 KNn8XIczvLpbnutjLlhSTUuu7lFtEOu6OLjOA1FjZL0CF7zD8EpqL2q/BSSVE14srUTI q4FS+seVVidZ/8c1+NEFTdbHbrd+Bhu24bEOoJPooMNMQ2BE9BztTiALCX0Ec76tAehA iS1az9PO7axNf3pOHEMsnT7KbWiiH1qlzLFrr1AvGvlPQNkvRpQBf47gaLfljp6E9MTu v0ypPZU9428nSOcR6pYEk/43brlTVD+2hWThxUEHSoHVez7D94FxPv9j+4mEZml0o7+g MAFg== 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 :reply-to:in-reply-to:references:mime-version:dkim-signature; bh=G3+2PMnjGfEPvKZwINap3pBMr0humQvV1EidfwRspkE=; b=p2j6Jw+Dxh5FoxuaJL83+yACP0SkHEsiBQy6MYLIEqz1CkPujNW9cXqFkYyER/WD/z w4nvuUeWL1QSq8sW8st4H0jaZRtn0XllZ4IouBRsbLZz3YE1XQn2072YCig4OKvw6nVp ymymeEqCh6I7IM5ORHnxz0w3NB11vGofb50GqevTq8hSRm1fwa/apWqOyzStVgvRZhXZ BMvijkpmrmuLOcN/FndgWZguV8y14XCC1I8Q8hJz7kIpCdrZeXO8DWb/AZNMCkZkgCOc 7n0q6Jc6UdRNPgtSodl+vqBRbEvtcUo+CTwLrforyQbYaXSUbz4YvtDjVeW3yLdU977G c3ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MGJgRmWL; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a19si6691869edt.160.2020.07.18.00.02.06; Sat, 18 Jul 2020 00:02:30 -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=@gmail.com header.s=20161025 header.b=MGJgRmWL; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727032AbgGRHBv (ORCPT + 99 others); Sat, 18 Jul 2020 03:01:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbgGRHBu (ORCPT ); Sat, 18 Jul 2020 03:01:50 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C084C0619D2 for ; Sat, 18 Jul 2020 00:01:50 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id h16so9158479ilj.11 for ; Sat, 18 Jul 2020 00:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=G3+2PMnjGfEPvKZwINap3pBMr0humQvV1EidfwRspkE=; b=MGJgRmWLI/yCr8L+tTPNBdz7aXETmcq/KuTunrZ7MM/RtVNbtM1kVzV2Ocj4Le9g4R 5rjvV3vNi0OOKH/d4BmvhSdYpupHCj7CITrBg0hsbQDnKqb32b26cxc9nJZR2Mh8yJld aZsoqC9bNDTbtwph9s/uTlb6IgpSsCdwnRbC14zcBhc4gB1+BrpB9QS9CDhCleHkUM58 f9p9ijMCel6H73XyuWjHQEXc5j7fCmZImBbiTjNITo8HZ6L/IZbiRSge/1AEjoXvczwj SkTpJeGAAK/C0ZO07Och/SiAhNAz2S8G0l2leyyjqEWwKE9vdFwC9dckTG5ypMe8T2WJ 6nCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=G3+2PMnjGfEPvKZwINap3pBMr0humQvV1EidfwRspkE=; b=Hy97+WPOV7EGZpz4gmYc/p3EKhCnkDAMIoImSRYQbRyF34dNbrHN8fOSTRmlQaCT72 YtybdIb4U4drUmwA5dyUwcqVQieVIUfQOfysZCSh6w65XZ2HalydjyudHMc9j210vfYs tJ5tRb30vqXc7HMPfAQLIPGbpHF7x7HdXSPE0GpOPNIZEU7WYXk7zyOaHwd5MXmZnI3W MNyBz36/LAgcrNRdpmRxE7vPLDSN/tEv5mrtL6SRVvF93BXx4spiXrfJiqWtkZfIxvro d/OLPbh+yDyv29n9dkAfeq51XjKqcw2K1Zt8Eftdl5afU8g35dW4agvQesIMo6Hr2xkP LYMA== X-Gm-Message-State: AOAM533jvWBY6z/W03O/0iM/TLMf0ihwAiZAaJmhn36PewDXDV7j5m+Q 7HwB6lz19J4teXu7O4XHb459kErA4EgbueDWcXo= X-Received: by 2002:a92:8b11:: with SMTP id i17mr13130616ild.212.1595055709714; Sat, 18 Jul 2020 00:01:49 -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: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Sat, 18 Jul 2020 09:01:40 +0200 Message-ID: Subject: Re: [PATCH v5 0/7] x86/boot: Remove run-time relocations from compressed kernel To: Ard Biesheuvel Cc: Nick Desaulniers , 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 , 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 Sat, Jul 18, 2020 at 7:45 AM Ard Biesheuvel wrote: > > 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. Agreed with that approach. v5 misses also my credits - Tested-by for the whole series is sufficient. - Sedat -