Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2642961ybt; Tue, 16 Jun 2020 11:06:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6QRERe3zzHiTfzt4scwoJcVlEJTU8kvLvYAnuizofdIfDqOxBz4+jun/hqrogdZj070+S X-Received: by 2002:a50:951d:: with SMTP id u29mr3851936eda.333.1592330814629; Tue, 16 Jun 2020 11:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592330814; cv=none; d=google.com; s=arc-20160816; b=DpCWmaS1XrB63Pu3bofXgIO9+DfZjVuRPIIAcjjeH7cPj7ufLtDxxg4C5a/PaCLcmz 513PUimekYsscGDtqu/NRktezBjUr1POoNzIssy8t+WXR0qYUvgk6PIj12UIuMXBeAoX qRQf5Szed/QkWC9WaXeGOa9P1XOmAvIZhXhCQcyJqokZkGpGObwH1Iwf/EyCQDpdSDsG kxnXFvNZvEJlumqueCb9iPWI3DETMtV7/Oh7LSF3SAYbZ6h1uAo0hqhRDVJk9PmYpJOw uc0dzIbJPpJfFofO/yX14sZ+RKSgcrOAXcto1JsEtVIHQM/wNKQDv5Fl7DHvqyV4F+G6 O0Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=qg6/6CMY8n7dnVVzd/Y5tNDAB5f5iIduvPF8I6aFaCo=; b=ESOXQVffZ2tzMMkCoGPgiXf9IrPTIzftAwOQr4J7StItTXU68ldWJ0IIJR/+NOngeF YWMSg0pr6jqlvzmfNAMWe+sOcOsuJ2R9ucmUQO9aysvjGh3eZsxdiQZiomlm3E0AZj5b bUyPFls/lBIPbZpK5HcfNH3Xl+70pJyyhstGbBUFWx16OHB/ichnHXjDxzVhpf2NDasd lS0kCfz4Ta8PD0IqEi6dqm/QnjpVll0DdJM5frVsGdJfLldkeqSplV0KW+lclhQ0Sfxo N3TM08LKT4Ff4tArgngcGrB71BoudxL6AM9uMYvQNDUybHI0sHVpRClRd8eqa77EJ1zz XJDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Y8yS3TZ8; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fi11si10863729ejb.612.2020.06.16.11.06.31; Tue, 16 Jun 2020 11:06:54 -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=@chromium.org header.s=google header.b=Y8yS3TZ8; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731450AbgFPSDW (ORCPT + 99 others); Tue, 16 Jun 2020 14:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730227AbgFPSDV (ORCPT ); Tue, 16 Jun 2020 14:03:21 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6378CC061573 for ; Tue, 16 Jun 2020 11:03:21 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id 23so9849639pfw.10 for ; Tue, 16 Jun 2020 11:03:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qg6/6CMY8n7dnVVzd/Y5tNDAB5f5iIduvPF8I6aFaCo=; b=Y8yS3TZ8PrhQXOs6mBuw4v2QGvvGfxHsE1fQ7xfnQHUyeW3t+dbyTbFSDDa+98l4UG 9S7farLd0mOaXNW8mKYeschG/WM6J5RJd5VrsolvvCS7ZvOxgmeoJW346Ax+Yeq+UaEZ PSBERBsdM86nsYlrf4DzJ0E0+racCrQPjy/zY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qg6/6CMY8n7dnVVzd/Y5tNDAB5f5iIduvPF8I6aFaCo=; b=IlHoZrPG+4EgygiTUJu2R65d1xHbC9nf44uqWO4Dn3D2rj8r3pIofkYS26vLtELsF+ jp2MIV6mFaJ+m6i/xHlO9DONAVYDNw6OX46igIO7i20R0K25BSotIbdtMzZvQlRxwhoz MwVCOLLPrPHSt4CeY73Vwm5sQAgdT5tc9azPObaeWa+qhAAv2d91q2Hae2Jx/e9DqK5r 4NFotlVgjOohjcOYgpq0qc6x/elXtThzoLgp7L+5fRxnfSSFNu4bcsqjNX+tOdRRx1Rl UB1aYoCQ/ZaeGk1u1eTvSwEQn6bWjBwhot/ofo693V7l/b2EuP2nLcgcWLJZGHJpzNgt zn0g== X-Gm-Message-State: AOAM530Z7FiAl9D5yw5XkFuTKId0ZVp5YNAn58hlKiAGvIdjoH+adS/g 2pjKEzZpGHLcDMbrhLXlhgkfPw== X-Received: by 2002:a63:b74f:: with SMTP id w15mr3104550pgt.314.1592330600769; Tue, 16 Jun 2020 11:03:20 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i10sm15257177pgq.36.2020.06.16.11.03.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 11:03:19 -0700 (PDT) Date: Tue, 16 Jun 2020 11:03:18 -0700 From: Kees Cook 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 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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