Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp176759ybs; Sun, 24 May 2020 01:44:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJXlTJmpbb98wIOTdyoHNDOCCQAtuLZ9UaHusedGmYOsP4DfXBQezotBo8DfDiBYzBKhCW X-Received: by 2002:aa7:d596:: with SMTP id r22mr10415692edq.379.1590309870826; Sun, 24 May 2020 01:44:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590309870; cv=none; d=google.com; s=arc-20160816; b=Rb9t35++a2aI4wnkpr8hWrQJfRMQvFkd+pdZoWzp5OKd2q+rHncU+6V7qp1zyu8/4B frG8C3WFph+FfbFGPi8yJQMDN+TZ4kHMayB69121mIR07bdRli0SuNHosNpb80OP7Iqn hAkZGSH0G0cL+E46FvNYTQDPyEJI4vn2o3gG94qA73q4+tgV1ZP5U+6wa3gktBw7tn7g R2beBkLz/WuIxj1pI1ce4pncjB9owlwqgw/OQ9fmOznTufU0XRRo5g2I8/KxjU8qPsUY jq3pcGZZQRXpQ16IpQSDl95FLCFMeBNm62BUsRIAIVY/oHNXoTU5tqk0/eGvPVp/332Z qXzA== 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 :in-reply-to:references:mime-version:dkim-signature; bh=yD/qKn2PdvyLgDcEIiDXv5Ud0KFcb+7itx+CMR+ZHB8=; b=CGf++VaiTTQbSlJr3ybpCd130c9ThHP7k4DvKWGrF/ZhwxvzOrmhuEyvJR7/nSN6bs lKmsGZ655/LISlDXtYWVRnR4cJLYHlAXT1euq46TJbMSqB0pYbR2fXrLMbhvwkL3wrjK Yh0HOWJJDzW8l6DKKu3mBZE/8kIixhBypSy/TFSf4mrlQZUX6HVVeG4vH0Z02NkjJxI6 m/O4Q5GtGhLqFlBJu1oTrfu7mJNlJCDuDPxC+jYcRN9zOtihAA56abQIcNcbZol9ieBu pzN3Gi8UlZDMcjIxXDHkJQe/x7yS/zD3FFTemlwILuab7Pc6F94sIHONLUMQMspgaiLm KffQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BxG96CXU; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si7414822edv.420.2020.05.24.01.44.07; Sun, 24 May 2020 01:44: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=@kernel.org header.s=default header.b=BxG96CXU; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728150AbgEXImb (ORCPT + 99 others); Sun, 24 May 2020 04:42:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:43182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726331AbgEXIma (ORCPT ); Sun, 24 May 2020 04:42:30 -0400 Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0557F207D8; Sun, 24 May 2020 08:42:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590309750; bh=sf8z0UjiPnonog6GK0bHV0LN7Xmm1JvGEb55h0+rYNs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=BxG96CXUPSWUmRNkHl6HjVlkGh5/eUa8JFBIpmAn6/z/e3e5rsfje3HBa/AFqIJeJ aRGGqDsqnHSWjuxf2Xulqf3hsrSXGfhESLUQ2Ruu9ZqBhI2e8FUphT80zRfAwItRtb 0wsByv02WtF2m5TjW0yWcNDpsaXa8YRMM9uBT6Ds= Received: by mail-il1-f174.google.com with SMTP id m6so14864877ilq.7; Sun, 24 May 2020 01:42:29 -0700 (PDT) X-Gm-Message-State: AOAM531LHen/5xiHqa+pgh33h8lqc9EKzmSIwnZhYf1KE0k+BBOa8sDv K6vCtNAbtqOk0jsFgRkmmcnyze8w0jAEaLjVBhU= X-Received: by 2002:a92:3556:: with SMTP id c83mr18361004ila.218.1590309749379; Sun, 24 May 2020 01:42:29 -0700 (PDT) MIME-Version: 1.0 References: <20200523120021.34996-1-ardb@kernel.org> <20200523120021.34996-4-ardb@kernel.org> <20200523151758.GB1189358@rani.riverdale.lan> In-Reply-To: <20200523151758.GB1189358@rani.riverdale.lan> From: Ard Biesheuvel Date: Sun, 24 May 2020 10:42:18 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/3] x86/boot/compressed: get rid of GOT fixup code To: Arvind Sankar Cc: linux-efi , X86 ML , Linux Kernel Mailing List , Maarten Lankhorst , Linus Torvalds 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 Sat, 23 May 2020 at 17:18, Arvind Sankar wrote: > > On Sat, May 23, 2020 at 02:00:21PM +0200, Ard Biesheuvel wrote: > > In a previous patch, we have eliminated GOT entries from the decompressor > > binary and added an assertion that the .got section is empty. This means > > that the GOT fixup routines that exist in both the 32-bit and 64-bit > > startup routines have become dead code, and can be removed. > > > > Signed-off-by: Ard Biesheuvel > > diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S > > index 60a99dfb9d72..d91fdda51aa8 100644 > > --- a/arch/x86/boot/compressed/vmlinux.lds.S > > +++ b/arch/x86/boot/compressed/vmlinux.lds.S > > @@ -43,9 +43,7 @@ SECTIONS > > _erodata = . ; > > } > > .got : { > > - _got = .; > > KEEP(*(.got)) > > - _egot = .; > > } > > .got.plt : { > > KEEP(*(.got.plt)) > > -- > > 2.20.1 > > > > I think you can get rid of both the KEEP's here as well? Yeah, they seem fairly pointless to me to begin with, given that these contents are created by the linker on the fly, rather than passed through from the input objects. I'll drop them.