Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp516381ybv; Sat, 22 Feb 2020 08:23:23 -0800 (PST) X-Google-Smtp-Source: APXvYqzcJWt7SFIOILLgyBgywGo4ccz98cGEWOUDm6/2XMmkXa05Kgzfu6IajVPcB4vxb8gM45S0 X-Received: by 2002:a9d:58cb:: with SMTP id s11mr34369787oth.55.1582388603458; Sat, 22 Feb 2020 08:23:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582388603; cv=none; d=google.com; s=arc-20160816; b=qCPNbs7v4Zz2K41zvw7HueZMe9Bn+KPJ8DdvqwWYFi3C1LJGAm8OpE/G1ZMY1sP6fM 1/HkBK3enpBI23rgZgFgO7lShTZi3C3axkpO4YQ4coAnv3jVsYHEaDQyMWPeV+b6D28Q 0BSUw06IQe0ieOU19bd1ZkBQNWqTeoofMSpEkdKmGaFg19+t5kgmlLVdvlP16QDbOaYf iq6O2rRdjxi8/yIzzolA+mn358H2ZJMee0I3Ec8iQzMs7jxXqJ4c25bOYqR1QLPe79g8 AJM5wpXgwP+XWfs66lsBb3d1uM4YTKH40lpsgUBaAMINVxKuMBxTVO/m1YMG4mEBqFDo cPTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=MdqxzzXPoIcQtN1yVVsOrdqBL5LnseCidtxS+ZQd6qM=; b=mOFbsCLWl4xYliqYKkLrkflHzHlDMedg9B6gRS13SnWjeNIY4OgPBG9JwHamSGig2J 0Jo3J6Motc4G15wNNn/tJnf8NiGOvlzc5mjhxCUoEbe52dYwYgcicLJ2vDe51rbRHyCN VxbyEH8my+9rS4h6mi+gBvGOMfewvpg0/3tXJsoCN/kk9kpiTovLMlLXIekVSX2zA7fJ 1JKgAt6hxg19HfpnXYPrRAoeK/6BRAsQR7SirDdnsdcFiMg3vP9EiJGrFB+EojeRNNSp QlPD6IaiWsC9v7eNdIFWsAjyQbt1uikWIF42ZnV+L9l7SYzK4TaEbML8KMHveq+uilhw OYzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=epPAQj4d; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q189si2589131oic.235.2020.02.22.08.23.10; Sat, 22 Feb 2020 08:23:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=epPAQj4d; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727277AbgBVQWa (ORCPT + 99 others); Sat, 22 Feb 2020 11:22:30 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:40206 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726550AbgBVQWa (ORCPT ); Sat, 22 Feb 2020 11:22:30 -0500 Received: by mail-qk1-f193.google.com with SMTP id b7so4871705qkl.7 for ; Sat, 22 Feb 2020 08:22:28 -0800 (PST) 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:user-agent; bh=MdqxzzXPoIcQtN1yVVsOrdqBL5LnseCidtxS+ZQd6qM=; b=epPAQj4dws//isTKjVJBUDjl5lSvkK614XMZSc0uMGC9R01p7/7s+f0pP5ziNpAv9L 8Wen+P5IceyxmpZOsLlk4aulUvGS0du2OJH2BMrm17X/moKuMP7hHCbfsBdr9jolZ2jL jHDdHdu6Ji3jPpu/WLvA/C32QirrIyMm2HvX4BUCe/QZAalfVzDj3AS8eb82zGe+lEZb DTqxRuhUNEpeZ9D/mpJu7bF5ZOpn6a+9VD4P2ho9efGLkrq5PHpKV5yzGFUUkWPkuRfH twf6/9wc5I8Vt9DKX2KmG6c4M/3Tg6qOzcpWfZLcOiv4ZzcMSgz24zKxxm/hqCJErUWc h2gw== 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:user-agent; bh=MdqxzzXPoIcQtN1yVVsOrdqBL5LnseCidtxS+ZQd6qM=; b=efk5NE/6Ef583mUUiyHJp9hMuUmwg00o2HKWXfMRc0aU7d7//+cZOOgOgs1I0Cs3Qp 3REXB6sTfk+3uoICkclEyJZsVBnf41MQ6k0sDXlMY7trisG6xdfDOVMvGP1HmkUfZ4JI Ihr0ILWgH5DJo5jSRkNlHwyaR26ii6gY9lI9z92kkBQXvgY3S/Qo8s7EIWJQYgXFbBw0 pOsx4C5aFvIUlrDoY2T3Hj8jg2ZH77kopmmt+OArVlLKVRuLJBaFq6/CduFycjgiOTn7 rgt+N17k6RaBxOpwojP+kKHCs0VHp5x2sncefb+Gsu++FFEi8GwDbta389FeWoxYoRMY prcQ== X-Gm-Message-State: APjAAAVI9QnvKBp8rlYXjB0OntD+Kw6RtBT67yWuURUynLfXxxKkb+Eb xaeRwCsISItEo9oXRIESr/s= X-Received: by 2002:a37:6650:: with SMTP id a77mr34249151qkc.343.1582388547911; Sat, 22 Feb 2020 08:22:27 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id g19sm3212418qkk.91.2020.02.22.08.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Feb 2020 08:22:27 -0800 (PST) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Sat, 22 Feb 2020 11:22:25 -0500 To: Borislav Petkov Cc: Fangrui Song , Nathan Chancellor , Arvind Sankar , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Michael Matz Subject: Re: [PATCH 2/2] x86/boot/compressed: Remove unnecessary sections from bzImage Message-ID: <20200222162225.GA3326744@rani.riverdale.lan> References: <20200109150218.16544-1-nivedita@alum.mit.edu> <20200109150218.16544-2-nivedita@alum.mit.edu> <20200222050845.GA19912@ubuntu-m2-xlarge-x86> <20200222065521.GA11284@zn.tnic> <20200222070218.GA27571@ubuntu-m2-xlarge-x86> <20200222072144.asqaxlv364s6ezbv@google.com> <20200222074254.GB11284@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200222074254.GB11284@zn.tnic> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 22, 2020 at 08:42:54AM +0100, Borislav Petkov wrote: > On Fri, Feb 21, 2020 at 11:21:44PM -0800, Fangrui Song wrote: > > In GNU ld, it seems that .shstrtab .symtab and .strtab are special > > cased. Neither the input section description *(.shstrtab) nor *(*) > > discards .shstrtab . I feel that this is a weird case (probably even a bug) > > that lld should not implement. > > Ok, forget what the tools do for a second: why is .shstrtab special and > why would one want to keep it? > > Because one still wants to know what the section names of an object are > or other tools need it or why? > > Thx. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette .shstrtab is required by the ELF specification. The e_shstrndx field in the ELF header is the index of .shstrtab, and each section in the section table is required to have an sh_name that points into the .shstrtab.