Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp921525pxk; Thu, 3 Sep 2020 16:44:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/alN6QbC+Us1EPnhd9C2OLc3qqe04OvfGIaijcX7J+RDKSNu9dmgRAF2/l/CnOQoUOdxK X-Received: by 2002:aa7:cc14:: with SMTP id q20mr5656929edt.309.1599176691174; Thu, 03 Sep 2020 16:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599176691; cv=none; d=google.com; s=arc-20160816; b=xnw/iwrdJhszTmn/13tbM9sKzfTL1r/CD2fzMDtIRD86Y9AbFFcmir0Rf0kjPelzkk g51JsNL3NzCDFR/Oa0tPVZjGpqXE+8d5jqm+xqiFBJFnjEfbQJIk9pTTobj1KXdzI4br jU1ZcTaZ4bs0S/B+fjPiFBLuQ1erbed7IgSjJUljzihioF/QC4e9r2ckmnK+fUdd5nIS 3y76BiP5IeDo3SVnE1XMJqdQOmk5EjDRf50o2ByjXplWGJ61JkHo3MtpM00PBvCpnbJ7 bXZtvXXC8MlUpVdfUfsjH7FgpShWWNcbry8kwLATye68/FfjO9TeekeaR4ShDgJLW9nI 9SEg== 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=Buf4pyI8QjmO6EzkejoF7rJNgrRLPFkG+pFmWeqNXSU=; b=vsVfgS1RtKzro1LrK2CVVL2NIdW16xcLP+JJ3AnLnRo08XXkSUiT7+k2ySfK3/JwpZ lnf6mMtkdwFZYf2e/w6RpMyUyaGpd+w5YSTUbg7raaQutxAuIZ5yTBsQvIIv712XtrkR Uiq2hfgHOVDtOCtX5JB4PGy55Z3Bdi5Dmre8fPfL9CpSEhgshiqt8wlfAAiolxTfD8uj anpxe+W1mz3PfMfyFL5z454cHa/8kt8sNdJq13N6lVNI33TJE+nu+cMVEYQrpXvOC/ka plGuc+ccFKcE3LPlpnrCzKV3MVEPlCkW+Pj8MQu1Uqcgg+VApsCvIRr+AQ+A4v+fQOrm ef0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=LPBJX9YY; 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 b10si2701521edm.281.2020.09.03.16.44.27; Thu, 03 Sep 2020 16:44:51 -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=LPBJX9YY; 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 S1728294AbgICXmV (ORCPT + 99 others); Thu, 3 Sep 2020 19:42:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725782AbgICXmU (ORCPT ); Thu, 3 Sep 2020 19:42:20 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F172C061244; Thu, 3 Sep 2020 16:42:19 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id f142so4774436qke.13; Thu, 03 Sep 2020 16:42:19 -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=Buf4pyI8QjmO6EzkejoF7rJNgrRLPFkG+pFmWeqNXSU=; b=LPBJX9YYiLdzfuvHhhApORKkjEcCokH8S7S+ixf/lb6PKyLameB2R/hO1MnJZ8lfjk RccIntdXKYJgeoTeIUtHPwlFVqlLK41Ye4qgM7C8a0Dl1XuqkWA/EbQaEDzvjYVM9Hem hXNDGnNCBxAUmwKqqrZTo5Z/pkPOaE+IU8GFh1uCzHl1RfLknP0FL1YAO1qizXvgdhoV jmGJqRqmzLQ/4JKXNZnVHBJKIv2uY/AATQNPFgyOPe5n3lAtj8q8KQIY8t8e6ZIeqzLb hUxL86tW8/dBzbuxUwIdIX/bzmz1jVTQI4jTiffCrlo0tyEZPNJWWfn9FXi7SgOBoEwA YQjA== 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=Buf4pyI8QjmO6EzkejoF7rJNgrRLPFkG+pFmWeqNXSU=; b=F85Y7ChYcN2rlSmiphqxWbOQZtxSYwyltws1712fuoTdEQZPKOBjGLUzoaSly0v78R Ob5npEGly4c3BzIK+1OEERlRvqbySdAaFXei2ThB64vFjj/Mr+moxJjYKxuxlTaT4XA0 G/Ko9/mioV/m/kYRvbXINGmi2FyEsEloaCi7DKoAxA9G2mJ7GxfNMlxMVEF9IhRRP56D o6CyEmoSKAPL5w4rIG2BZfGrONdPcwghrJ/qZ9+Y1C7tzuejhBhJiTiuYePPkQ36XNF8 oNkIUcnPhSsyJb4BbcjVvM2tv0cqTLwZjpPllygasC9izASRA/dg87orDND163yMC37a gwig== X-Gm-Message-State: AOAM531POp7t0BiPuriRJCIKKRjHvap8nC/U1Tnc8XF4BCFOaE6QIeJZ VhIAMY+GgmJUVaVpNgwt/lQ= X-Received: by 2002:a37:4c4:: with SMTP id 187mr5768921qke.40.1599176538868; Thu, 03 Sep 2020 16:42:18 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id 205sm3305039qki.118.2020.09.03.16.42.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 16:42:18 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Thu, 3 Sep 2020 19:42:15 -0400 To: Kees Cook Cc: Sami Tolvanen , Masahiro Yamada , Will Deacon , Peter Zijlstra , Steven Rostedt , Greg Kroah-Hartman , "Paul E. McKenney" , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org, Arvind Sankar Subject: Re: [PATCH v2 01/28] x86/boot/compressed: Disable relocation relaxation Message-ID: <20200903234215.GA106172@rani.riverdale.lan> References: <20200624203200.78870-1-samitolvanen@google.com> <20200903203053.3411268-1-samitolvanen@google.com> <20200903203053.3411268-2-samitolvanen@google.com> <202009031444.F2ECA89E@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202009031444.F2ECA89E@keescook> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 03, 2020 at 02:44:41PM -0700, Kees Cook wrote: > On Thu, Sep 03, 2020 at 01:30:26PM -0700, Sami Tolvanen wrote: > > From: Arvind Sankar > > > > Patch series [4] is a solution to allow the compressed kernel to be > > linked with -pie unconditionally, but even if merged is unlikely to be > > backported. As a simple solution that can be applied to stable as well, > > prevent the assembler from generating the relaxed relocation types using > > the -mrelax-relocations=no option. For ease of backporting, do this > > unconditionally. > > > > [0] https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/linker-optimization.tex#L65 > > [1] https://lore.kernel.org/lkml/20200807194100.3570838-1-ndesaulniers@google.com/ > > [2] https://github.com/ClangBuiltLinux/linux/issues/1121 > > [3] https://reviews.llvm.org/rGc41a18cf61790fc898dcda1055c3efbf442c14c0 > > [4] https://lore.kernel.org/lkml/20200731202738.2577854-1-nivedita@alum.mit.edu/ > > > > Reported-by: Nick Desaulniers > > Signed-off-by: Arvind Sankar > > Reviewed-by: Kees Cook > > -- > Kees Cook Note that since [4] is now in tip, assuming it doesn't get dropped for some reason, this patch isn't necessary unless you need to backport this LTO series to 5.9 or below. Thanks.