Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp4229ybm; Tue, 26 May 2020 09:20:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxi31dzxn/q2slcWtrWWU+ItBlT/hqH7hEOYZlp1eujLWNLj+/014PLeEBJztQZveq4vPqK X-Received: by 2002:a17:906:aecc:: with SMTP id me12mr1902118ejb.525.1590510030171; Tue, 26 May 2020 09:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590510030; cv=none; d=google.com; s=arc-20160816; b=hZ98BN1S3hfhdHoRLUPppv16UvQVWSvME7hr72sRavoWAo8RUfnu/wjypXEEhZoKn/ aeRFdQGIIhri0nlEvs6m1Ry9p4e/G91FAppZkNhk3P7+HFdiaSsGPxgji3K8PWwKTaWI nSQ+34m3OlrqCogK8121XSr2nbCyl02KEhqw/5RIZ7ZkRvm69HD5d2zqDvTTr4eXhS2Y 6EvSlwBuM94EBLz91KMJ0xwRtadTnMbQNDjeGsCZLKfqKwXUZCwygyqUFJiYT9KVVC4/ VKUbd6JuccdnAECsMOV0EWVxbsVmKTFS8ixzWmLUaKX3NuNMmzcaQ6ZaLuAFR4H4Bz7x xc8g== 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=W2wCu2SdkHFkQ1Ckp39G9Z9PbrnS7bq9ACqqoB/0oa0=; b=UJrVIRT9X91W6uNAoqJlulsHB7u1j3h7AGoE5reNjsiHW0z/a5qT/PEGl9UMDg8Qx+ 04u52F7OlhcD08nrpUWSa2s08gDH664jg3BZd+cdj0m9crWsZNHr5+X1aq2hSGGDCEbt i657iOpSCBMOLCmHKx+Y64tw0kiWCTbIQExS2F7Z2IsXGAawjGojJgBthadcyJCs6PyG AiN9tZ2OUxnR0dVZfy8vXvPIgNQR94bGViMgDu1jnAzo4Yj3e5bmd+r3RB6vtMxI7xLS pKJ0L4EhNttgs6kiPJeWvCmvk2lOqfjeTR8FdCF8r4zotxsw4JvKIM8QNPm9oYfFPGhv Jvtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=t5yTsL+h; 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 b19si164781edr.258.2020.05.26.09.20.06; Tue, 26 May 2020 09:20:30 -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=t5yTsL+h; 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 S1728598AbgEZQSU (ORCPT + 99 others); Tue, 26 May 2020 12:18:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728294AbgEZQST (ORCPT ); Tue, 26 May 2020 12:18:19 -0400 Received: from mail-il1-x142.google.com (mail-il1-x142.google.com [IPv6:2607:f8b0:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74B36C03E96D for ; Tue, 26 May 2020 09:18:19 -0700 (PDT) Received: by mail-il1-x142.google.com with SMTP id b71so20997400ilg.8 for ; Tue, 26 May 2020 09:18:19 -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=W2wCu2SdkHFkQ1Ckp39G9Z9PbrnS7bq9ACqqoB/0oa0=; b=t5yTsL+h2v6+Ce1k3GlaF5U0JrOWNaUPUg/e1r1fcDTUHtAK5AnNjKMAhyWAOHlLI/ xxJDCc9kLYKPIdB8NbL3qbEES2tg+Fpsmjiscv77V2oH2qwD6dLsBAByDOzObFY3Iqu1 u33Pm/cHUJUpMWEb0wEa8zA85tblduq1Aj5yENvu3jXcAKpYTIue9wxmkvZ4wVmwHyOX 7W+OPgEGiyGjkGqIpXxeAK7Oy0q5SCtyPv79OrunKD2WCopoKMsGkb/mVHAD7aElf0TE v6RRFvUsk2Vz3c1kn59aRZnd4+Il4p0okDB++weWCUGWM71V42o/K0dc+6sl7htA/fae oZ2g== 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=W2wCu2SdkHFkQ1Ckp39G9Z9PbrnS7bq9ACqqoB/0oa0=; b=Y0di3fUq2is1tSg3F/pW+ounzvub7Xqs3vMX02DmZ/EiAv37oMeG4jGLdVdfPCDVId 49ItDVdMA/XmFMIicyCfSGNh8hX9KjqieSmmopxJJjMu8+X6q601PxN9rdzdAD2ksoOA LP/91j67MZ8E26hjW2DprlhWWJiTfZmyFuciNqnxlLvTKVVpjvuOE+l3AKjUmm99pccE x8Sd7J/HGCBINWRyo0z5jYcx0bjTBYR7hO4PsAfZCZQeF2XJ3IiJj6TfWx6G2eT6DaKR L4QDDMgyE6P+8BnBt4gnitXykSiet+MNdDKJ5v7+awbgvhEKkgjjq6EZt8S6sIIpaLOA HoBA== X-Gm-Message-State: AOAM533d1wCT3SbS3LE4hFSj+GcTTCYdQ+i5sVdUmpOR4TpWzUBZyXBk tb7UBUndELu8vge5UU0XGtCQ7Ex6PaYCfhF8CLw= X-Received: by 2002:a92:5893:: with SMTP id z19mr1947013ilf.255.1590509898761; Tue, 26 May 2020 09:18:18 -0700 (PDT) MIME-Version: 1.0 References: <20200524212816.243139-1-nivedita@alum.mit.edu> <20200525225918.1624470-1-nivedita@alum.mit.edu> In-Reply-To: Reply-To: sedat.dilek@gmail.com From: Sedat Dilek Date: Tue, 26 May 2020 18:18:07 +0200 Message-ID: Subject: Re: [PATCH v2 0/4] x86/boot: Remove runtime relocations from compressed kernel To: Ard Biesheuvel Cc: Arvind Sankar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , X86 ML , Nick Desaulniers , Fangrui Song , Dmitry Golovin , Clang-Built-Linux ML , Masahiro Yamada , Daniel Kiper , Linux Kernel Mailing List 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, May 26, 2020 at 5:07 PM Sedat Dilek wrote: ... > > > patchset to previous build: > > > > > > $ git log --no-merges --oneline 5.7.0-rc7-1-amd64-clang..5.7.0-rc7-2-amd64-clang > > > 8b74901cb9e5 (for-5.7/x86-boot-remove-runtime-relocations-from-compressed-kernel-v2-nivedita76) > > > x86/boot: Check that there are no runtime relocations > > > 83fb1bc3b076 x86/boot: Remove runtime relocations from head_{32,64}.S > > > fede23dacbbd x86/boot: Remove run-time relocations from .head.text code > > > 3e5ea481b8fb x86/boot: Add .text.* to setup.ld > > > bec910ba3d67 x86/boot/compressed: Get rid of GOT fixup code > > > be834cee6f39 x86/boot/compressed: Force hidden visibility for all > > > symbol references > > > 9b7c7d8d2d7b x86/boot/compressed: Move .got.plt entries out of the .got section > > > ba6a49f806a0 (for-5.7/kbuild-compressed-debug-info) Makefile: support > > > compressed debug info > > > a1fb11944d11 (for-5.7/x86-boot-nivedita76) x86/boot: Correct > > > relocation destination on old linkers > > > c70e3890058f (for-5.7/x86-build-maskray) x86/boot: Discard > > > .discard.unreachable for arch/x86/boot/compressed/vmlinux ... > This works: > > [ arch/x86/boot/compressed/Makefile ] > > -KBUILD_CFLAGS += -include hidden.h > +KBUILD_CFLAGS += -include ./arch/x86/boot/compressed/hidden.h > > $ ll arch/x86/boot/bzImage arch/x86/boot/compressed/vmlinux > -rw-r--r-- 1 dileks dileks 6,5M Mai 26 17:05 arch/x86/boot/bzImage > -rwxr-xr-x 1 dileks dileks 6,5M Mai 26 17:05 arch/x86/boot/compressed/vmlinux > I was able to build/link and boot on bare metal. root@iniza:~# cat /proc/version Linux version 5.7.0-rc7-2-amd64-clang (sedat.dilek@gmail.com@iniza) (clang version 10.0.1rc1, LLD 10.0.1rc1) #2~bullseye+dileks1 SMP 2020-05-26 - Sedat -