Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3940012pxu; Wed, 9 Dec 2020 04:40:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvoe99bYEv4L2Dbv7MMsHcycB+gv+MyPt88vxV7gdUzfyRHycFE7kGi7i6FuteBgujm4Ct X-Received: by 2002:aa7:d7d2:: with SMTP id e18mr1853414eds.256.1607517624607; Wed, 09 Dec 2020 04:40:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607517624; cv=none; d=google.com; s=arc-20160816; b=KiG3z3iFS/s//hhE2qbI2x8/iwNYYIJ/bzBs6XTbnA/SLoEtgZtNeQ0eqNPrXW2ZD8 GbCMG/2ZbzE8cTX1IBySloZVMo2+aIbEBkTHlL3DlEEGLDjSGScZjg4dlhlCCI4vr6o1 ID0zHPpwTf2gQoyt5HwzIjvaquu1klXmlwvk9G9TOkdtKh/4ZkEbCCuXeh+hnDWB7bWp JL/4IlA17G2eZQ/ASQcSINdkqQCfa1QL6Yj6O4KKqjFFVJ2vd8dVWtte2KmiPZ2hHroZ ouL6NKkp/+NTnG5byWLi4hzuS86rSucjOfh9QXfQJlT62BqraGrPOJDS5OzGFGfxHk7s +AwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wmV6/4wQmfhfm2nPWNLnxQy5Vj2nloCVkG78DiPhuLU=; b=EsLW4TDGqLVycjg/xDSk0QhrP+9J0hVsuP6jR8XvYzf4Gbqe9Upcj/ejpxHveqH+Qx CijXVu3zwft2Op790ocJu29+KELaon6YCJf5Q5V5Q2Tcu7/FISkM3hJyZYLftrUFn0dH ssMDJAEkhBFXc0YMwDKPg3r9Rk4qvzpOwtdjw2mHkJO1AlXvQXPqG+OqCVS3iuiDo/04 kGfKldhtCM3TV8FiqTxwzlDJLjdJiA0mLAVdssi7zcZ+97HjnWRXSsQrgcs6KjcohUAm 7eiVqJ1DBPCdrK4j455uV85MbqaLPhMQs4vjzYsSdURdXkkWLfZgRZrixMudI4Io8x0I WT1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QMe8TgyK; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si761675edu.121.2020.12.09.04.40.01; Wed, 09 Dec 2020 04:40:24 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=QMe8TgyK; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731689AbgLIMgw (ORCPT + 99 others); Wed, 9 Dec 2020 07:36:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:46838 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730658AbgLIMgw (ORCPT ); Wed, 9 Dec 2020 07:36:52 -0500 X-Gm-Message-State: AOAM531lcvJWszY8TeZExBsZo9FNXNZjC7fe3OwVODTwKPeXk2KM7BRZ jiCx7zUz/SzbObX35GEbKAI08Z9QnJzCQoIHG+Y= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607517371; bh=dVBkGQUoTPNqVA5YcFV16WWbYR7ZgobhVlfqccPyMMM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=QMe8TgyKwG5RwbJWODTsjgFzwi7is/hUW972TN+CJAC8OlmQTclwY4t4o3NpXBDen G0FZuP+wTgQyvKgL79TEeCn1xOpdP8R8eG9kiwnhftkhAUWq2DeAENsJ/WJCalSLmX 6cYxEmgX1SFU23nljhFb8v34P9oCzJdB7O0pfYlFcNm09dy3tMYMu5b+nJNemYg5Sz N7hPMfIRDgpX2Vf/yRRJs7pwXzkUocC+4s1HqFvwpZN6Pp6qIDvgykV8o5KmXOZbzW jmOKI+zRp3XRk3yA4qFqD3H9SW9YHyARfxSDwYAuQREW1ncN6x1r02319tc+Dk+0gL A9YLQ1OTuXCgg== X-Received: by 2002:a9d:be1:: with SMTP id 88mr1530396oth.210.1607517370870; Wed, 09 Dec 2020 04:36:10 -0800 (PST) MIME-Version: 1.0 References: <20201201213707.541432-1-samitolvanen@google.com> In-Reply-To: From: Arnd Bergmann Date: Wed, 9 Dec 2020 13:35:54 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 00/16] Add support for Clang LTO To: Sami Tolvanen Cc: Masahiro Yamada , Steven Rostedt , Will Deacon , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , Kees Cook , Nick Desaulniers , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , Linux Kbuild mailing list , "linux-kernel@vger.kernel.org" , linux-pci Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 8, 2020 at 1:15 PM Arnd Bergmann wrote: > > - one build seems to have dropped all symbols the string operations > from vmlinux, > so while the link goes through, modules cannot be loaded: > ERROR: modpost: "memmove" [drivers/media/rc/rc-core.ko] undefined! > ERROR: modpost: "memcpy" [net/wireless/cfg80211.ko] undefined! > ERROR: modpost: "memcpy" [net/8021q/8021q.ko] undefined! > ERROR: modpost: "memset" [net/8021q/8021q.ko] undefined! > ERROR: modpost: "memcpy" [net/unix/unix.ko] undefined! > ERROR: modpost: "memset" [net/sched/cls_u32.ko] undefined! > ERROR: modpost: "memcpy" [net/sched/cls_u32.ko] undefined! > ERROR: modpost: "memset" [net/sched/sch_skbprio.ko] undefined! > ERROR: modpost: "memcpy" [net/802/garp.ko] undefined! > I first thought this was related to a clang-12 bug I saw the other day, but > this also happens with clang-11 It seems to happen because of CONFIG_TRIM_UNUSED_KSYMS, which is a shame, since I think that is an option we'd always want to have enabled with LTO, to allow more dead code to be eliminated. Arnd