Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1990055ybh; Fri, 17 Jul 2020 06:47:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwM6fFlre8s/OCrjT7BWa1hEICXBGKJ0A0srXF+oN+zVslO6a/JPGY6uyrf/lNcxvzhu7re X-Received: by 2002:a17:907:4003:: with SMTP id nj3mr8455815ejb.278.1594993665125; Fri, 17 Jul 2020 06:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594993665; cv=none; d=google.com; s=arc-20160816; b=HSulH0IXGFVGfUnwpU4/q9JRVrCakTVanVCp+DIQwJuqFSdKPed0OXOr2rJGyDqS53 BJlAmZgFbRljRnQ4dy/5JhXCCQEKcKJb1aZt4JBsFI1i9o/CuZSo9aP3Vn3q6o7B1GKc i3SQ4Iz2U+bb72Ki5B3YgRUmUXPDKAEm00aJ8ZOmDPiV787naNPkizZOjk5p9a96suL2 1xTBJx2Qi10qCFo8audrjKyKrKq35hP3UBf/v6KxGGOpF7Lm9URnmxmDcJdCY0v9guOv qTnbiviB9CM2p4EHnUx4kc+hPdp/D44ptNnSOzjY0Qt/6JgrSKKHaH51fUA2Ri/4QHjQ 8CVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=5P4OIwY9QUK4h9roSSRi0+Ffy4n0VXQDJm6kBXWOS4s=; b=nSmNfu7Nkcr4GLzxwr5fQnxv/oWxx7/CtAYnA0rM00xRQ/WAk1u9LYohCJyd3aNyR/ +1uwtVay/bBRqi424aXNFNvSZmCzmUPoRUX8zg1nUFZ73KP7xsyj/y+G3U3v/3nxK91R DdokgOlFG62e2mwEBWbDqztYLTTGvLNjI/uycEgD4xzSsTd5/k/h4n1YkTkT6GBkt3pY zwdH0OximBBuLCvOY6HKfOI/54I0VDDoUMfZqTFYP29D7tKwdOPlOl/Ff4dDY3AvNhfu X2s1hPfZApF/kIQf1SfcPs1L7Vle87EXhNrZOcCFZuDCrSfUvpdv6u/0gn2DgTDL3MVR ozQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YW3OQKQA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg12si5123205edb.81.2020.07.17.06.47.22; Fri, 17 Jul 2020 06:47:45 -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=fail header.i=@gmail.com header.s=20161025 header.b=YW3OQKQA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726232AbgGQNq6 (ORCPT + 99 others); Fri, 17 Jul 2020 09:46:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726079AbgGQNq6 (ORCPT ); Fri, 17 Jul 2020 09:46:58 -0400 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64895C061755 for ; Fri, 17 Jul 2020 06:46:58 -0700 (PDT) Received: by mail-qk1-x741.google.com with SMTP id l23so933871qkk.0 for ; Fri, 17 Jul 2020 06:46:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5P4OIwY9QUK4h9roSSRi0+Ffy4n0VXQDJm6kBXWOS4s=; b=YW3OQKQAfKVqT1Egb+B5MNUYPBtYtlKNXMwuYmzLvdi7fy6reGmedSDwvvnOfy47cM d0jaSw2R5WUXi6fRuqRDCZnOh3YRmXZSczGb3nih0o4OjKD9hoAq9Bi/3z5SwN7JtrpO 2SPm12xa2vVkKe7nCOflLjYArXFFSX1EumnABmBUypo04a+VitxcEzcNb9yeTIj5+WI+ +p/YUjHNAKU9DqXMWdMxknux94s/t7PRJ+q2JLkLcwiM7AMrFtfxXgtUVGUqQAueOdWP 6mJzjZHOqK3wS+ub16E4Ur+zPSNKw5EkRno0o864Saa0TxlYhUfaQ02l08SBp4wz6sSc sBZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=5P4OIwY9QUK4h9roSSRi0+Ffy4n0VXQDJm6kBXWOS4s=; b=gpIostEjoxyO2Yw2RbzTI8jPkpAqFzljBzzxQVFXWKmvkkHkBR4pflRrlyLAGJ5+k3 95jA8uHmn2LV2EGoGFZQtMxOfs+QiyxnlfRPMlPqqZ7ZRd1pxHHIvus7xfpyQ8NvmRBu j03yewbuz3Hd92Ei5y+fdutYbo7Xcp0KpyjU0O+4nEmxJjzf8BqzetREJsorGBSpqx+v CHAz20oRGh7KpK6/FVCllp3JBLTza4dpBv88OPmTBDSHgpBlmm1BhhxEkgpWxjSkPMdM Zagb+S+VDTXmJ/fA4dMpub5Qdh3egwomWZj/pJUPUUGA6yLMLbX8ZEP+40d/JnFFSeBu BZlg== X-Gm-Message-State: AOAM530FZptZNrMmU12TmzLce5qVrxIm8vU6m8eNTk4X5z1u7roj1NCg omi3OTa6EwDUk89LQMLRTgbKo13dGmc= X-Received: by 2002:a05:620a:a56:: with SMTP id j22mr8716602qka.193.1594993617582; Fri, 17 Jul 2020 06:46:57 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id d8sm10497586qkl.118.2020.07.17.06.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2020 06:46:56 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Fri, 17 Jul 2020 09:46:54 -0400 To: Arvind Sankar Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Nick Desaulniers , Fangrui Song , Dmitry Golovin , clang-built-linux@googlegroups.com, Ard Biesheuvel , Masahiro Yamada , Sedat Dilek , Kees Cook , Nathan Chancellor , Arnd Bergmann , "H . J . Lu" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 0/7] x86/boot: Remove run-time relocations from compressed kernel Message-ID: <20200717134654.GA3187880@rani.riverdale.lan> References: <20200714023836.2310569-1-nivedita@alum.mit.edu> <20200715004133.1430068-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200715004133.1430068-1-nivedita@alum.mit.edu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks.