Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2023977ybh; Tue, 14 Jul 2020 13:32:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU6u0lVaGYaprthDStoGKda77RywhcYtUzNZNy9TCsOVxEwcW+aPIN0U2bJFEiUCGDo/sV X-Received: by 2002:a50:8c06:: with SMTP id p6mr6188501edp.146.1594758732234; Tue, 14 Jul 2020 13:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594758732; cv=none; d=google.com; s=arc-20160816; b=xJVpjzVqCaoaV4CKJBgIUN7BSCap9nZT9GtBMQEI1hLaNs7ObNDVuu6VPuh+aicSQ+ Ysjfbjci4Z4Gx87rufWAgouI3BFpswPQlE0x9zK7TbRuzmlc8HsxRFt28ZcE01FlYiB2 QzkywSFvnEkcMO4XvYb28zxziJEhWrO1ztsZ+0uVzNfj9k9SYsnGlG/yXgDSMlVYfMxN OEU4gREEpJ40dFswtQq8PragpcPlYlFZ6jcwZFQzKjPdFrqHumfcstsEOs7qvB1S86xP LnWYrJvjwufKSMp2P/oE56e2uzJTiOkqrnYhYlt+M8DN702f2wsylewLGGQsOsz+dxl9 6/Kw== 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=dNqqoUWNmRxmdTmC2H241F4+woK6j4Lxw/jD+n5ASO0=; b=KAmMaZWA1Qbq7kbo/EQc8gbNmsz9IqI0Cr3Id0RAQYnprcjV0gBiaGYZ+JF12wY2KV MDLx+FaKmtYqmRdD+vEfmVGY00Kl5pLr/wEOAME7u/c8+iMB9iTp/d0RgZrbHNzEG+St YavaFi6H0HjeUKxj+WY6Ov0PyQwME2d5lUwLBdAneUGLCrtm1h0JIv5wDrW/5MGg9d42 Qq9s3CTcf7XbVXtJO7kvZRtbpgTRPQ7ESm4f4wnN4rzZiwASbAD0ppdXY+P+qpnTjx8C ho5R3iwg2EUQsDQ/1aIYixLI39zyl8N6A1TEAg6QdVdUwf/MnJJydnNWCdrvCs+ySN4Z s3sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=aA8lDs80; 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 c9si11412315ejb.631.2020.07.14.13.31.48; Tue, 14 Jul 2020 13:32:12 -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=aA8lDs80; 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 S1726845AbgGNU2q (ORCPT + 99 others); Tue, 14 Jul 2020 16:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726694AbgGNU2q (ORCPT ); Tue, 14 Jul 2020 16:28:46 -0400 Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2553FC061755 for ; Tue, 14 Jul 2020 13:21:04 -0700 (PDT) Received: by mail-qv1-xf42.google.com with SMTP id t7so8112170qvl.8 for ; Tue, 14 Jul 2020 13:21:04 -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=dNqqoUWNmRxmdTmC2H241F4+woK6j4Lxw/jD+n5ASO0=; b=aA8lDs80uNY9ngYTDCOapy6ub7nOBQNxCJlX/AZU4bi9eLCOy8jKPiKZDVty7/dTRR WjyYlA8jVYTa9AcVZD3bML6mMCYjntZevep8CYf5gX2mQPY2yY9CFpR8rSC2gxoklEzv k8XBFiLxyHNR6arup/PPCrlyR4ZQ5DFYRti7eyo/MsCWauHe5Tuo/Fxu5k/lu/9SG1G2 GwQxcAVezJc6tIxQR26MmoTQgdTFXLi69wOMKdkrc9OjeOHWOz3RtotWJac+F9nrM6Qq 7JD0eKiZO1RfZ9/3toFRf3qbLCQsn/5jGNgV+RpbdTFoP77hwZj3AJK5iRuNS0EH979K i+6A== 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=dNqqoUWNmRxmdTmC2H241F4+woK6j4Lxw/jD+n5ASO0=; b=JsIzrkfjEyegaNaVGJQfJDjr5RKkewjo8VBhlLiJK59LUxrT5KxCrOsBkiGfnuaKgb JQ5yTJo/lGvirpukFzPmgDohZA+ArZ3xe2kWznYAKwPIMxYXm+DWnDdvIY16dUXCQ/Yc 70ltftP/xnXbCF3lYxhBoZbZkgKop1c0A/100VdO/hDzU/gzBXHsbtU/7+mWSnj1V5cF mU7FeEdlUtFZWPKPx0TFT/RYl5XTAe7IRGm63HP6cFAHjjhhWHBtVw6PteFh7bsEQ1hG EagjYiSjIIrhe/wscUxNscrnYFbEbgVnuRmJJ6wL7p1D0y1ankaRU5CbnuyMsaB9wlad fKKQ== X-Gm-Message-State: AOAM533KEQkOGfTBz1xOJpwkvush83LniVCMd10vIDHQgDu3gEAMxf8q 5zHqVKBJVS4uizY8W1VyhUA= X-Received: by 2002:a0c:f842:: with SMTP id g2mr6506941qvo.181.1594758063273; Tue, 14 Jul 2020 13:21:03 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id x36sm45154qtb.78.2020.07.14.13.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 13:21:02 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Tue, 14 Jul 2020 16:21:00 -0400 To: Sedat Dilek Cc: Arvind Sankar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Nick Desaulniers , Fangrui Song , Dmitry Golovin , Clang-Built-Linux ML , Ard Biesheuvel , Masahiro Yamada , Daniel Kiper , Kees Cook , Nathan Chancellor , Arnd Bergmann , "H . J . Lu" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/7] x86/boot: Remove runtime relocations from compressed kernel Message-ID: <20200714202100.GB902932@rani.riverdale.lan> References: <20200629140928.858507-1-nivedita@alum.mit.edu> <20200714023836.2310569-1-nivedita@alum.mit.edu> <20200714141550.GA329060@rani.riverdale.lan> <20200714192956.GA689174@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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 10:08:04PM +0200, Sedat Dilek wrote: > > > > > > In any case, I think the right fix here would be to add -pie and > > > --no-dynamic-linker to LDFLAGS_vmlinux instead of KBUILD_LDFLAGS. > > > > Hmm, you might be right with moving to LDFLAGS_vmlinux. > > > > We will need the "ifndef CONFIG_LD_IS_LLD" as -r and -pie cannot be > used together. > Is that the or not the fact when moving to LDFLAGS_vmlinux? LDFLAGS_vmlinux will only be used to link boot/compressed/vmlinux, whereas KBUILD_LDFLAGS is used for all linker invocations, and in particular the little link to do the modversions stuff ends up using it. So once we move -pie --no-dynamic-linker to the more correct LDFLAGS_vmlinux and/or stop modversions running, we'll be fine. Being able to use -pie with lld is one of the goals of this series. > > I cannot test as I modified my local Git and re-invoking my > build-script is doing a whole new build-dance. > > - Sedat -