From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731438AbgFPSDV (ORCPT ); Tue, 16 Jun 2020 14:03:21 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63FABC06174E for ; Tue, 16 Jun 2020 11:03:21 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id a127so9853500pfa.12 for ; Tue, 16 Jun 2020 11:03:21 -0700 (PDT) Date: Tue, 16 Jun 2020 11:03:18 -0700 From: Kees Cook Subject: Re: [PATCH v2] recordmcount: support >64k sections Message-ID: <202006161101.34B26E6@keescook> References: <20200422232417.72162-1-samitolvanen@google.com> <20200424193046.160744-1-samitolvanen@google.com> <20200424222214.GC9040@rlwimi.vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200424222214.GC9040@rlwimi.vmware.com> Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Matt Helsley , Sami Tolvanen , "Steven Rostedt (VMware)" , Greg Kroah-Hartman , Thomas Gleixner , "Naveen N. Rao" , Kristen Carlson Accardi , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org On Fri, Apr 24, 2020 at 03:22:14PM -0700, Matt Helsley wrote: > On Fri, Apr 24, 2020 at 12:30:46PM -0700, Sami Tolvanen wrote: > > When compiling a kernel with Clang and LTO, we need to run > > recordmcount on vmlinux.o with a large number of sections, which > > currently fails as the program doesn't understand extended > > section indexes. This change adds support for processing binaries > > with >64k sections. > > > > Signed-off-by: Sami Tolvanen > > Feel free to add > > Reviewed-by: Matt Helsley Hi! Can this patch please be applied and sent before -rc2? FGKASLR, LTO, and link time improvements[1] all depend on this fix, and I'd really like them all to be able to sanely rebase for the development window. Thanks! -Kees [1] https://lore.kernel.org/lkml/CAK7LNARbZhoaA=Nnuw0=gBrkuKbr_4Ng_Ei57uafujZf7Xazgw@mail.gmail.com/ > > > --- > > Changes in v2: > > - Switched to unsigned int for (old|new)_shnum in append_func. > > - Added set_shnum and find_symtab helper functions and moved > > the new logic there. > > > > --- > > scripts/recordmcount.h | 98 +++++++++++++++++++++++++++++++++++++++--- > > 1 file changed, 92 insertions(+), 6 deletions(-) > > -- Kees Cook