Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2609368imu; Thu, 29 Nov 2018 07:35:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/WgMqFA4x28G5nUVUb2MXptO6VXYaKcb++DWxXxdlebJOGkV3WfvjU3jesWmHOX2fOgXNCP X-Received: by 2002:a63:b649:: with SMTP id v9mr1643472pgt.436.1543505745616; Thu, 29 Nov 2018 07:35:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543505745; cv=none; d=google.com; s=arc-20160816; b=iQwvHx/ZwcMsgY33xqB9idpXCFnZnijYYoo4vVTF96WjDcR8Asf0Gry3SpUhP6czUM 6bevFYXobkT+6LXQGLXDXzo2zKFxoRPMnUXcTz6yavhTCde/XvJZ8420Pdn3rQblSawQ 8SP4Ybv3K8Yg7HwXbpzQaaOasXM+Srehdym0v0tOtuq4AkZ1cXF7VQ1JMR69r35fntRI NZIqRgaOtQcoBnjnSr5lrdsT+uKYzifJl05hcnaHCWQ8gZuEH6ep3Rk2ArOI79O9e4yc zDVsGNQMfTaVGhXSaSogfzH+Jti+lawE6BYdLypo7Bqt8+NmdwsEgkRPYakHRFW136XQ sufw== 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:from:date; bh=qTO1JVI2RwLtifoiFygJPa9sDzopmCj+DFD5sdohXz4=; b=z3QRDYfd+wWbgwGLCk7HCm/l4KLKMdmHTZuP3Pk4JLCpbGeg+x7wGveGfpSn6DeYnZ H5n+VNJBD/jFB4P/GjJJi6IeN4ARPsfsPSUCUo6/NjACwjrSwrOvysftAmv9CZxcNzM9 5hvXphhD9LHk3lpUnIlLrvvzkXs0bFtPQ3m1tbO8H2xXiGKjrZmC9g5gbnvNl6/COE2U Vah90NHN20ACTTBkLgUODIpbjaOBk0yweUmQpZnE8mA8zw+B1kvtcMiWbcXOJwZXMmf4 lPT1h29nk8JhmlxrwYK7R1E9T+QK9e8ltiNoHJZmOVSu3hlkxn3wKf8pC06I23RR0rsk e14A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5si1981824pgk.249.2018.11.29.07.35.19; Thu, 29 Nov 2018 07:35:45 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728588AbeK3Cip (ORCPT + 99 others); Thu, 29 Nov 2018 21:38:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54518 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728272AbeK3Cip (ORCPT ); Thu, 29 Nov 2018 21:38:45 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0E0F33098491; Thu, 29 Nov 2018 15:33:01 +0000 (UTC) Received: from treble (ovpn-123-4.rdu2.redhat.com [10.10.123.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E3C8183F6; Thu, 29 Nov 2018 15:32:59 +0000 (UTC) Date: Thu, 29 Nov 2018 09:32:58 -0600 From: Josh Poimboeuf To: Artem Savkov Cc: x86@kernel.org, Thomas Gleixner , "Eric W . Biederman" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/tools/relocs: fix big section header tables Message-ID: <20181129153258.cutmesclgfadc5gu@treble> References: <20181129135133.31369-1-asavkov@redhat.com> <20181129142312.kz2l5gm33yeaglnn@treble> <20181129152200.GA1776@shodan.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181129152200.GA1776@shodan.usersys.redhat.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Thu, 29 Nov 2018 15:33:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 29, 2018 at 04:22:00PM +0100, Artem Savkov wrote: > On Thu, Nov 29, 2018 at 08:23:12AM -0600, Josh Poimboeuf wrote: > > On Thu, Nov 29, 2018 at 02:51:33PM +0100, Artem Savkov wrote: > > > In case when the number of entries in the section header table is larger > > > then or equal to SHN_LORESERVE the size of the table is held in the sh_size > > > member of the initial entry in section header table instead of e_shnum. > > > Same with the string table index which is located in sh_link instead of > > > e_shstrndx. > > > > > > This case is easily reproducible with KCFLAGS="-ffunction-sections", > > > bzImage build fails with "String table index out of bounds" error. > > > > > > Signed-off-by: Artem Savkov > > > --- > > > arch/x86/tools/relocs.c | 58 +++++++++++++++++++++++++++++------------ > > > 1 file changed, 41 insertions(+), 17 deletions(-) > > > > > > diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c > > > index b629f6992d9f..5275ea0a0d13 100644 > > > --- a/arch/x86/tools/relocs.c > > > +++ b/arch/x86/tools/relocs.c > > > @@ -11,7 +11,9 @@ > > > #define Elf_Shdr ElfW(Shdr) > > > #define Elf_Sym ElfW(Sym) > > > > > > -static Elf_Ehdr ehdr; > > > +static Elf_Ehdr ehdr; > > > > I think there's a tab missing here, it doesn't line up with the other > > variables. > > This seems to be a vim bug. It aligns perfectly in > cat/less/lore.kernel.org which all seem to use tabstop=8 by default, but > it does not align in vim, but it does align with tabstop=7 in vim. Are you looking at the patch? Or the file itself? "less arch/x86/tools/relocs.c" shows the same issue. -- Josh