Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2185372ybh; Fri, 17 Jul 2020 11:19:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoXFgW1PrChbBBctFTBSdZ4MTHtu5cHp8mf4bTtqEc0rrb+PkMwuozY2XJbi/mbWynte2/ X-Received: by 2002:aa7:d58c:: with SMTP id r12mr10984718edq.160.1595009986388; Fri, 17 Jul 2020 11:19:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595009986; cv=none; d=google.com; s=arc-20160816; b=B8bSElJtOARFhXF/3TPonm3FqPy1YwFZZX9Fyj8MasRdin2b9nbFrK5UqDkfY+rM2o 5HStH4tYWMZ50XwKctUfMpPkBVeMPt8c67NXrRbEXWebD3YqV5Y9Kt2BcXbegHbASiMT RT7raLDzqKVgZqc7gHoR+++g+hRkHVlAJjQwWkuYYk0EdqAXzUjZsywFElHOrUoNkG6S KlLmkQYhNKQL+XvTuvivH4V9ih/HNsljp1agcPbIfajM5yZRAn/oP/xbw/4G5k4T4SLw 569v3lamW5DjWvwS3piDU+IeCtkhCorW+b39YzHiu1qfJhkYyhSZ8l1vqChqVIvv1QVe g2yQ== 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=EBlDJFELNKgax0cjAHRAVjejfx/TTQsomiVQoBjL7ks=; b=twoVVdmftysgvg8uOyXfYbD1wiEeOA5sbEbTJBEGDJx4w4JyHzs+/G17/4qnb7HRrI IxLzoMwxYInrVTQVms6sY2XWaC6B7gM0tcYUVVvX/P1tds4rZKCJ1GDRpqJeAz7k4+LY /GVYglV8DR9O+GlYIQvf/5Ekv8qj4DmfsSPfZpFLbng3xqeSiuU8lUghcM4+kEnOKjlR bv+7ztka3tnFFMg5aN8OnBLxkQWC2acFO4u1c9YYGTG+zKoDdSSggD+uJvP9KPoRkzoc EG/4i+USWN4MkmFG+eL2xl2cHY0A8et0wNs5Bk7WIzksY8c2TFUqm9XXFuzqyIMvBRkH oimQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=bxLHHdlA; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g24si5236346eje.347.2020.07.17.11.19.23; Fri, 17 Jul 2020 11:19:46 -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=@google.com header.s=20161025 header.b=bxLHHdlA; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726675AbgGQSRJ (ORCPT + 99 others); Fri, 17 Jul 2020 14:17:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbgGQSRJ (ORCPT ); Fri, 17 Jul 2020 14:17:09 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BCE6C0619D2 for ; Fri, 17 Jul 2020 11:17:08 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id p3so7080296pgh.3 for ; Fri, 17 Jul 2020 11:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EBlDJFELNKgax0cjAHRAVjejfx/TTQsomiVQoBjL7ks=; b=bxLHHdlAY9eene1CvhhSCw9YTxQwX3eKCVv9iTe1Xjm+fSJKVJlBdfmF9vsb4MmJOs NEuJzywR0eANfT0z9SZtH7CZ+/6XKVOVivsGtsx2Rh2v6EG3cp8zXyPrUza4YZADBWTz vGYEJLcZLwE9AG6JcEoJBkaGvqoNgNTb/k8L3YTjqtbLXYDuKT8ZI6snpjCZY+CMjTTh sl4vuKdQjyFAcVuTZm2VPKZqMFUNJ8Hft5jMcn8td4zNzu0xpFssqM4f9HhxRPtUOPov NRQLWkLfBeWPaoqJl+F798mBQ9Dnd/LQ5w6F2GkVZ3fFshaScseaVuI7+xLwb46ARPaZ KbEw== 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:from:date :message-id:subject:to:cc; bh=EBlDJFELNKgax0cjAHRAVjejfx/TTQsomiVQoBjL7ks=; b=qkwAv079ZyCzdHsTvCGdYW57A5KJLb3TjQQHaySpGhhD1AiE8T33ziG40WDS0xnTAF PmAdBojCaWzjzc011sHp3UyWx5Mn3LwRx6b3d5VwBUwyV1gSQZbgI8R0J8/Fr2RqDD6W lT/F9AYoZBM+pGnvCnxm1C9QVG4a+sCjK5C3ZRqoAA+zZNfG78p1yQEZlO81fTYhQb8r YUem0jFFEwq9KUdGsY+sRKbhwh0XGCIgsBrdEBj9/RVuXH21d/t19gzi/g/RFiMe2ona qbqzCbXAANfdgBqcd6U2VirnPuldNNeD1/7vlAezS6+eDZIYDmPScfFP0sMEXphePMpR OWNg== X-Gm-Message-State: AOAM533rvd7+aNLp4pPVXd3dU40PCahyhxuKq7s+tEehwbz9wwsQAwsH B1ofWWhdG5Q6yuu+eSp4cUJfkHNoQWL/+j+8cw2O5w== X-Received: by 2002:a05:6a00:15ca:: with SMTP id o10mr9210298pfu.169.1595009827674; Fri, 17 Jul 2020 11:17:07 -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: <20200717134654.GA3187880@rani.riverdale.lan> From: Nick Desaulniers Date: Fri, 17 Jul 2020 11:16:56 -0700 Message-ID: Subject: Re: [PATCH v5 0/7] x86/boot: Remove run-time relocations from compressed kernel To: Arvind Sankar Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Fangrui Song , Dmitry Golovin , clang-built-linux , Ard Biesheuvel , 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, 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? -- Thanks, ~Nick Desaulniers