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=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 C4E7DC4361B for ; Thu, 3 Dec 2020 18:48:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D1F3217BA for ; Thu, 3 Dec 2020 18:48:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729612AbgLCSsl (ORCPT ); Thu, 3 Dec 2020 13:48:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727997AbgLCSsk (ORCPT ); Thu, 3 Dec 2020 13:48:40 -0500 Received: from mail-vs1-xe44.google.com (mail-vs1-xe44.google.com [IPv6:2607:f8b0:4864:20::e44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A23D6C061A51 for ; Thu, 3 Dec 2020 10:48:00 -0800 (PST) Received: by mail-vs1-xe44.google.com with SMTP id b23so1813322vsp.9 for ; Thu, 03 Dec 2020 10:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ah+rD4wk+k3lncQwfhIaQxiXkvEJG1Frpy4Nqe+0q0U=; b=SKhZH7li060XYzleaCahQbBQsMynLjFbQa3EhTv77mq3GHRmSi61KzLCOLC1Z4ksaj pSJDPGDFnV9Yx/X3ETP86ugtkVzY02GZAgoZstjnPNK8KrdI1fjRRRcqwKuLoZ+iGFnw Mfp9TStTmlP08QQnKRNmpPAPNNvtn/NE5MsBi6vL6DIXPVYtfI8exjpC70eIc1jAi6hr IWUJKbfX69GJkb8hVQ58bQnKSKy9x1UkfpKRekYoEUXT0JpoySwIrh8/YFahuMWMIznf +OWbSKuFcovO+Pj5wPAfXa07brxfPV5prt3FbyqI8tm/0XTPi+MmqG20rvrPzlHjF8XG lj8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ah+rD4wk+k3lncQwfhIaQxiXkvEJG1Frpy4Nqe+0q0U=; b=LwjTGmQ4sXMBUVd91X5dPLF1hNUQtqT0FnpmYHj3xuiI9UlLuce0XAmiXYAf0WRbmQ au6jlTEMnkXV+8qhpQbFJGU22wNJwLI5bTDnAL1uo4jkEf9xzx0o0y4xviAc8KBNjuma mkDen6MZ7doaPi9r1B7uPUyyoz6zoNb6A75AvF+OS+s+mbGq8cDiqMQMLUMmjmrk8L20 rJ+GpAnvgAKFT/3JdxeLReuE/vtHQHYAqJxBqU38SjLlugTWAw9OE6V5Au80ChFcbyzW yTEkWjnWHsiAtTYRebcQn3Pm9WixBep55gAvLjHivXQKSoKKc7PcInQEyK16WRTZnpRz +wNw== X-Gm-Message-State: AOAM53261RtoKmE+OApGvo/vX/DBbCL2aUPVNg81XoohVDTQEn0zGQxI tODHpuq2xlmQ2O8bKUyIyA2SrvxuAlcrmlheyrrv2g== X-Google-Smtp-Source: ABdhPJwWZ3eYDNgK+tyHhs3o/e9jTvYAkoSVCUaRgclpcuqt9dH748zpq6nj5Jt+rgjXHu/FF8NKz82dnl1j7RfAePA= X-Received: by 2002:a67:f74f:: with SMTP id w15mr696164vso.54.1607021279552; Thu, 03 Dec 2020 10:47:59 -0800 (PST) MIME-Version: 1.0 References: <20201013003203.4168817-1-samitolvanen@google.com> <20201013003203.4168817-15-samitolvanen@google.com> <202010141549.412F2BF0@keescook> In-Reply-To: From: Sami Tolvanen Date: Thu, 3 Dec 2020 10:47:48 -0800 Message-ID: Subject: Re: [PATCH v6 14/25] kbuild: lto: remove duplicate dependencies from .mod files To: Masahiro Yamada Cc: Kees Cook , Steven Rostedt , Will Deacon , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , linux-arm-kernel , Linux Kbuild mailing list , Linux Kernel Mailing List , PCI , X86 ML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Thu, Dec 3, 2020 at 10:00 AM Masahiro Yamada wrote: > > On Thu, Oct 15, 2020 at 7:50 AM Kees Cook wrote: > > > > On Mon, Oct 12, 2020 at 05:31:52PM -0700, Sami Tolvanen wrote: > > > With LTO, llvm-nm prints out symbols for each archive member > > > separately, which results in a lot of duplicate dependencies in the > > > .mod file when CONFIG_TRIM_UNUSED_SYMS is enabled. When a module > > > consists of several compilation units, the output can exceed the > > > default xargs command size limit and split the dependency list to > > > multiple lines, which results in used symbols getting trimmed. > > > > > > This change removes duplicate dependencies, which will reduce the > > > probability of this happening and makes .mod files smaller and > > > easier to read. > > > > > > Signed-off-by: Sami Tolvanen > > > Reviewed-by: Kees Cook > > > > Hi Masahiro, > > > > This appears to be a general improvement as well. This looks like it can > > land without depending on the rest of the series. > > It cannot. > Adding "sort -u" is pointless without the rest of the series > since the symbol duplication happens only with Clang LTO. > > This is not a solution. > "reduce the probability of this happening" well describes it. > > I wrote a different patch. Great, thanks for looking into this. I'll drop this patch from the next version. Sami