Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1955634ybh; Tue, 14 Jul 2020 11:34:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU4WppNsYJGgRzGu7Yv4ld7FcBx3oMeHokVzzIr+6ueS6s/6Zvh/Wn5NXp5zUoiHqdXN4B X-Received: by 2002:a05:6402:174e:: with SMTP id v14mr5897945edx.153.1594751671880; Tue, 14 Jul 2020 11:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594751671; cv=none; d=google.com; s=arc-20160816; b=u913fFrWu/KwbHyDLF90jbgJzK4tw3h36/6dX37X65P7+UND99GhdqbOl5Efr8G+T9 25kNSnA57Mz0UUn0RfLHzBbdFWhdzR24GiTbrQtXehEwxlsRAzZFPn25n0wpGTxPcLqe 8GHONaPIfecy7Ldsu8yU+IaS9QF5r7UzLqH6jba9IAmFVxOBJJimBsBEXpoDcHOrhQqS rK0YPQm8cxEi3SGcKfQwvtOINA2136SRRBo83PNdnLDSmuoloLWmy9M1gC0NMFOq/tjg 6AZCcWgbtPOfT8Bo4ypUoxpXo0InaKKAn93UrO5so0deV0aqnzfhNPDh7553Gr6Awb87 T+Yg== 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=+GrWComU6TBiIyymRd8f6GtXs9/MoZhC4FrxlGlnlig=; b=uI1VcbsV5GZfKY7i7c+q7fbXEbmNKsx/HdNOySWxP5MdArHM1PYnI5OjFBlkxrD4P8 E4CH5GHPRZ7FqjG4mhKMmqfRByPpJfNo4KRv/ogNrLmQ/+zzP9p0CJRlbZwYgtS/HB1R T7NL9BwkH0SMltpP3QyZ1tUHLejlZyqe/mNGCr1lU3oisurDFgq0zddkkd2pRKDDyXio 8WWNkYJVG5HhvdsmY6YUSDwKq4iMvIU350Fdeqcy1/cdkv2tQOr/RqakFZks3QUH9tzE leAdzLUaDQl5OAVlt0AQvttuMGDO2Yzntq3QzZC1Fpoy95Q5gIpP7zzefE8DL9shhL2g 75FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Xa0xe+8Q; 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 z14si14233416edl.500.2020.07.14.11.34.07; Tue, 14 Jul 2020 11:34:31 -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=Xa0xe+8Q; 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 S1729102AbgGNSdd (ORCPT + 99 others); Tue, 14 Jul 2020 14:33:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726817AbgGNSdc (ORCPT ); Tue, 14 Jul 2020 14:33:32 -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 E3AC1C061755 for ; Tue, 14 Jul 2020 11:33:31 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id t27so15034575ill.9 for ; Tue, 14 Jul 2020 11:33:31 -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=+GrWComU6TBiIyymRd8f6GtXs9/MoZhC4FrxlGlnlig=; b=Xa0xe+8Qcmx/ymrkj23nB3jIFtCMBlAwRV26M9ftEsSHshXYtA54soUcQmeVWa5vJ4 JgCoxeEuvPQH2ZnS3UQX9OrRgPsyoq/SNaxK3v5nHYWjQv7Tg/j4aIwqxbMxojQ4ZLZx VdWgM7h4YhHVcgkX23DfjwwjK3nhGndJ7+cJ3EW4uiH+WTSbgN6SYk49IZPeCAR0M/fD PCm/ib867eRLK2GUKmekIeg7duOIUjjADCJl08ORUWOztWcmpwub8uLEwrUrUUrf1Tak SQJSlQjUlV5a67mLzj5FRORhO/DDS7FCmBBchVzp05k2OEJofKa5xJuJWI8pGIUuyW/n jNCA== 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=+GrWComU6TBiIyymRd8f6GtXs9/MoZhC4FrxlGlnlig=; b=Sntb6X4UKoBLv9k5EdqoPS5Myaj+Rix3d2tqJbtzAF8jImK3p8jq8kicYrZH6k1lNA qD5p0svC3nicagmm3hl5BYryXvtAyt5V/mBFbK0OwszRkS7cQqyvP1ATerQ76lzZXpZy BsWhByS9sPLjEj1lNhixAL3lb+XuY6/3T6+7+Bb2JXLFMy1xwL+ezlWffsHznZQMBZGe K9i5klxD4PFGAxDKru7yVVE5af2ljmVPT2wOTYVzVsPIquLVsxSp8Ns0CQWhDm9D5q6x 6Tx4v1obEXTdbmFPruwMEIxPIeSSvEL73zbpMk4n+OrcqX9Ladbdh4ocGw374ZQSzHOP TXWQ== X-Gm-Message-State: AOAM532FBgBEYewRVG3OybuY05M0h5HJ1lkEuyEAPyn3csEPTaJQJiTi JMqnsz5qWswvjTTGlitcP88Ioz7zWUwcD8GH5Iw= X-Received: by 2002:a92:8b11:: with SMTP id i17mr5986875ild.212.1594751611244; Tue, 14 Jul 2020 11:33:31 -0700 (PDT) MIME-Version: 1.0 References: <20200629140928.858507-1-nivedita@alum.mit.edu> <20200714023836.2310569-1-nivedita@alum.mit.edu> <20200714141550.GA329060@rani.riverdale.lan> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Tue, 14 Jul 2020 20:33:19 +0200 Message-ID: Subject: Re: [PATCH v4 0/7] x86/boot: Remove runtime relocations from compressed kernel 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 ML , Ard Biesheuvel , Masahiro Yamada , Daniel Kiper , Kees Cook , Nathan Chancellor , Arnd Bergmann , "H . J . Lu" , linux-kernel@vger.kernel.org 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 Tue, Jul 14, 2020 at 8:30 PM Sedat Dilek wrote: > > > I did a full new build... > > > > ...and it fails with ld.lld-11 as linker: > > > > ld.lld-11 -m elf_x86_64 -pie --no-dynamic-linker -r -o > > arch/x86/boot/compressed/.tmp_misc.o arch/x86/boot/compressed/misc.o > > -T arch/x86/boot/compressed/.tmp_misc.ver; mv -f > > arch/x86/boot/compressed/.tmp_misc.o arch/x86/boot/compressed/misc.o; > > rm -f arch/x86/boot/compressed/.tmp_misc.ver; fi > > *** ld.lld-11: error: -r and -pie may not be used together *** > > make[5]: *** [scripts/Makefile.build:281: > > arch/x86/boot/compressed/misc.o] Error 1 > > > > It's annoying to fail on the last minutes of a build. > > Sorry for being very honest. > > > > I applied this diff... > > $ git diff arch/x86/boot/compressed/Makefile > diff --git a/arch/x86/boot/compressed/Makefile > b/arch/x86/boot/compressed/Makefile > index 789d5d14d8b0..9ba52a656838 100644 > --- a/arch/x86/boot/compressed/Makefile > +++ b/arch/x86/boot/compressed/Makefile > @@ -51,7 +51,10 @@ UBSAN_SANITIZE :=n > KBUILD_LDFLAGS := -m elf_$(UTS_MACHINE) > # Compressed kernel should be built as PIE since it may be loaded at any > # address by the bootloader. > +# LLD linker does not allow -r and -pie options to be used together. > +ifndef CONFIG_LD_IS_LLD > KBUILD_LDFLAGS += -pie $(call ld-option, --no-dynamic-linker) > +endif > LDFLAGS_vmlinux := -T > > hostprogs := mkpiggy > > ...and was able to build, assemble, link arch/x86/boot/compressed/*. > I checked my last succesfull build without your patchset: $ grep no-dynamic-linker build-log_5.8.0-rc5-1-amd64-llvm11-ias.txt [ EMPTY ] - Sedat -