From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E3A6C10DAA for ; Thu, 3 Sep 2020 22:12:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D756620722 for ; Thu, 3 Sep 2020 22:12:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="IGPy3Ev8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728684AbgICWMA (ORCPT ); Thu, 3 Sep 2020 18:12:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727804AbgICWL5 (ORCPT ); Thu, 3 Sep 2020 18:11:57 -0400 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C20DC061245 for ; Thu, 3 Sep 2020 15:11:56 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id b124so3424728pfg.13 for ; Thu, 03 Sep 2020 15:11:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5FkC7ZydcYZ7OvnDcVYU3cxvw/A+RLXuwzidT1u3ktE=; b=IGPy3Ev8EutCuQb4lwsTx1VAvqIeOIRFD7wLuyvXGTSAxwz8hL6v0K8f8IQ9Y+H11S fKbqKBL1KVGfL9CLfKWhp972pCQiDMPENIKcZYhRYuBh/NJ5d1xhg8qEzMWhJmjTO78y hpDI1nGkw9U2lPKfWpYJ5VKAyDFTBSuj0ip0o= 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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5FkC7ZydcYZ7OvnDcVYU3cxvw/A+RLXuwzidT1u3ktE=; b=ddR0s+JxRtMaYIxptpqck3ypkKQh/Vnczx+i4z96uWgHBO5DtwcC2lJZ3eYBgFtZke Hx12qqqP9kdeMgyApk0O1f+Z8547jezohbJ263BqOLTLgfReIJITeqNx2oMTpzwq5u8D dBeGYimqkRvoiUe36wOJrUU7Mb0XGx7mO3qYP9dBxqC9e3QGXRXseySlUEWxI3UC837E +HcE56lVhgq1Mehm0MVMxrPrzH2JvwrzNzh5s71+YdFjSU7R20LLHgLFWge0bKqWukRj bl553xr2tiVINJkkXzl6+hZ6rUpd4nlUaaktLAppugzfdJG83ovNHs2KAHkDInJH+Wtq OppQ== X-Gm-Message-State: AOAM532RFk3GFDd7YOTCayN+LY+Ma/3dRhqnksiEag4XLLtjOjpiGO1N uCsl5G6kj9aeDUtzauf3iN3dcA== X-Google-Smtp-Source: ABdhPJxNUt7QAkJJr6DVIatL2r/ZHjflOqWAAtFiZXIMzyxOBsAVSA+Y4d6vSRQM4txHS5CM9PwpZQ== X-Received: by 2002:a17:902:d702:: with SMTP id w2mr6057532ply.53.1599171116270; Thu, 03 Sep 2020 15:11:56 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id a6sm3721602pgt.70.2020.09.03.15.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 15:11:55 -0700 (PDT) Date: Thu, 3 Sep 2020 15:11:54 -0700 From: Kees Cook To: Sami Tolvanen Cc: Masahiro Yamada , Will Deacon , Peter Zijlstra , Steven Rostedt , Greg Kroah-Hartman , "Paul E. McKenney" , Nick Desaulniers , clang-built-linux@googlegroups.com, kernel-hardening@lists.openwall.com, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 10/28] kbuild: lto: fix module versioning Message-ID: <202009031510.32523E45EC@keescook> References: <20200624203200.78870-1-samitolvanen@google.com> <20200903203053.3411268-1-samitolvanen@google.com> <20200903203053.3411268-11-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200903203053.3411268-11-samitolvanen@google.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 03, 2020 at 01:30:35PM -0700, Sami Tolvanen wrote: > With CONFIG_MODVERSIONS, version information is linked into each > compilation unit that exports symbols. With LTO, we cannot use this > method as all C code is compiled into LLVM bitcode instead. This > change collects symbol versions into .symversions files and merges > them in link-vmlinux.sh where they are all linked into vmlinux.o at > the same time. > > Signed-off-by: Sami Tolvanen The only thought I have here is I wonder if this change could be made universally instead of gating on LTO? (i.e. is it noticeably slower to do it this way under non-LTO?) Reviewed-by: Kees Cook -- Kees Cook