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.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 67EEAC433E2 for ; Thu, 3 Sep 2020 22:21:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C13620716 for ; Thu, 3 Sep 2020 22:21:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VwQBLOMp"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="R+gBqR6j" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C13620716 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xcbTJW7HLR6wNsuKlj3r4X7PvnA7BI9dda+RSUO/F9Q=; b=VwQBLOMp+9pLqnqAIcoPzGgZA Ir+toZmSmHmXdpxTjAdZGwwMoO3Wyby67hT5Ht7goRlRBol8XH+ty9zCRjGAblN5xeknsHIpLTPRL u9eMHzGp8ZWE70yMDcd45jePyILs68bLYoBIPGqXRjz1TqEiGHqLagswV30Fc5ZbRLNPO3Egf1LHb ekiVSaqbF8h3qoqAOTii5LmTvicogG+0keMX4E2DeTngxttEvB6vztPQPu/+NDpWa635aYds1/yQv JlMuCbVHL+qzZTDG0xZCXOkitdHW3CKxYMWx9WcDpxTAybgYYlgwzF9MeA63Th7JBQSkzVN0NV+cI nkoztJIOQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDxaf-0008Az-FP; Thu, 03 Sep 2020 22:20:21 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kDxac-00089D-KW for linux-arm-kernel@lists.infradead.org; Thu, 03 Sep 2020 22:20:19 +0000 Received: by mail-pg1-x543.google.com with SMTP id u13so3246342pgh.1 for ; Thu, 03 Sep 2020 15:20:18 -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=dmzINT6p66dX/e1LULkP+IK8q8rhLoHpFzoaZ62doLA=; b=R+gBqR6jMnk+6oKx2tqu8pEQMa6B4rvdU39xncVxP9cYGjTvu9Y7E6/eDwL4d91aZg 2AWd6bD1I8hpzfCMHWXyOEAUYG/ByrfmTjLvqStAtIQAudEBj+5PL2eVmUhWK1C7kkkn PbOlpfhNaxLGq78/VBxGKRETiCVBKzIIjWBQY= 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=dmzINT6p66dX/e1LULkP+IK8q8rhLoHpFzoaZ62doLA=; b=h33F4khnwXXi7Oilol4FiADX/5hnrmEqDH8XUBlQdM0y5S6hVfqVDYK/5DwNmIOJQL JO8aAeie+BvmE7E+1zc+CkIk+uijqEIOrlwPtyExnVMRiSqit4T4Z6BAlpMzmnE2CKNe /VMGCt+50xoGrE392X25567C3QyDMrn/OJB9hzxROGoCNuKdmSLHSwZnCwcEFQa3FucM gNUBl4g0rfF6HVmA8SnOkvX1fDiPXqpqO+03MDusJmU3yCuSR5M6iSax1+x6CIWZFv/R qOCAIm0Jo2Rh6Uic+HSMyVN2RX+iW5dBF/iIW/o7rtaNpCig5up6Ko/lHg200b5viJft 6Rsw== X-Gm-Message-State: AOAM533lwr37X9mKV1Rv9Op3oX04/pbvZf3aDrhd+X5qwH9Kv6fNYYZI rKExqjr29BOWLh++3JjVrNVgCg== X-Google-Smtp-Source: ABdhPJzvTlWSfXCMJbRcWCpKisPl6QUA4PdiAul/EgxhmyHEf/e8MtwNFLvtPo2Deh4MEaqWvcd6DQ== X-Received: by 2002:a17:902:aa91:: with SMTP id d17mr5955717plr.27.1599171616614; Thu, 03 Sep 2020 15:20:16 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id o6sm3294870pju.25.2020.09.03.15.20.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 15:20:15 -0700 (PDT) Date: Thu, 3 Sep 2020 15:20:14 -0700 From: Kees Cook To: Sami Tolvanen Subject: Re: [PATCH v2 12/28] kbuild: lto: limit inlining Message-ID: <202009031520.DCF0B90B65@keescook> References: <20200624203200.78870-1-samitolvanen@google.com> <20200903203053.3411268-1-samitolvanen@google.com> <20200903203053.3411268-13-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200903203053.3411268-13-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200903_182018_688369_59D91F20 X-CRM114-Status: GOOD ( 14.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, x86@kernel.org, "Paul E. McKenney" , kernel-hardening@lists.openwall.com, Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, Steven Rostedt , clang-built-linux@googlegroups.com, linux-pci@vger.kernel.org, Will Deacon , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 03, 2020 at 01:30:37PM -0700, Sami Tolvanen wrote: > This change limits function inlining across translation unit boundaries > in order to reduce the binary size with LTO. The -import-instr-limit > flag defines a size limit, as the number of LLVM IR instructions, for > importing functions from other TUs, defaulting to 100. > > Based on testing with arm64 defconfig, we found that a limit of 5 is a > reasonable compromise between performance and binary size, reducing the > size of a stripped vmlinux by 11%. > > Suggested-by: George Burgess IV > Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook -- Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel