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=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS 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 4002DC433B4 for ; Tue, 4 May 2021 08:26:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 95EF3613BE for ; Tue, 4 May 2021 08:26:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95EF3613BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BE69A6B0036; Tue, 4 May 2021 04:26:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B960D6B006E; Tue, 4 May 2021 04:26:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A36ED6B0070; Tue, 4 May 2021 04:26:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0191.hostedemail.com [216.40.44.191]) by kanga.kvack.org (Postfix) with ESMTP id 83BBB6B0036 for ; Tue, 4 May 2021 04:26:04 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3B40F180AD80F for ; Tue, 4 May 2021 08:26:04 +0000 (UTC) X-FDA: 78102865848.09.DB6507C Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf26.hostedemail.com (Postfix) with ESMTP id 9D8D640002DA for ; Tue, 4 May 2021 08:25:52 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 3A0E06023C; Tue, 4 May 2021 08:26:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620116762; bh=94XzKzc+hp6yHkT0RPZQKGsi3EMY3XkGe6WVNcpCIHg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yxz+v7dZfQJcDbkVKGLt50iXaCkWfjeY8CbbDidn4HFIKh7EwYDZyGwPVpIAexzGs HZE1D1kfL7m0TtdZkHoV5Wme2tNjk25peulUflIhnytPCVj76CjFypwIBOp5NFK2WU Msi095wXqGM9u0+K+0zMdmNeXEFtzRYJi2tA2mI0= Date: Tue, 4 May 2021 10:25:59 +0200 From: Greg Kroah-Hartman To: Arnd Bergmann Cc: Nick Desaulniers , kernel test robot , kbuild-all@lists.01.org, clang-built-linux , Andrew Morton , Linux Memory Management List , Sasha Levin , Alexander Shishkin , Masahiro Yamada , stable Subject: Re: [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined! Message-ID: References: <202105030311.xWwkyV9z-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=yxz+v7dZ; dmarc=pass (policy=none) header.from=linuxfoundation.org; spf=pass (imf26.hostedemail.com: domain of gregkh@linuxfoundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 9D8D640002DA X-Stat-Signature: g13suyc5cipjhzrkrwe13z497dss4a5r Received-SPF: none (linuxfoundation.org>: No applicable sender policy available) receiver=imf26; identity=mailfrom; envelope-from=""; helo=mail.kernel.org; client-ip=198.145.29.99 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620116752-353249 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, May 04, 2021 at 09:41:14AM +0200, Arnd Bergmann wrote: > On Tue, May 4, 2021 at 6:43 AM Greg Kroah-Hartman > wrote: > > On Mon, May 03, 2021 at 09:16:42PM +0200, Arnd Bergmann wrote: > > > On Mon, May 3, 2021 at 7:00 PM 'Nick Desaulniers' via Clang Built > > > Linux wrote: > > > > > > >> ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined! > > > > > > > > > > I'm fairly sure this is unrelated to my patch, but I don't see what > > > > > happened here. > > > > > > > > It's unrelated to your patch. It was fixed in 5.7 by > > > > 7273ad2b08f8ac9563579d16a3cf528857b26f49 and a few other dependencies > > > > according to https://github.com/ClangBuiltLinux/linux/issues/515. > > > > > > > > > > Ah right, the big hammer. > > > > > > Greg, not sure what we want to do here. Backporting > > > > > > 7273ad2b08f8 ("kbuild: link lib-y objects to vmlinux forcibly when > > > CONFIG_MODULES=y") > > > > > > to v5.4 and earlier would be an easy workaround, but it has the potential > > > of adding extra bloat to the kernel image since it links in all other > > > library objects as well. > > > > I've lost the thread here, but what _real_ problem is happening here > > that doing the above is required? > > Randconfig builds fail if drivers/hwtracing/stm/stm_core.ko is a loadable > modules and nothing inside vmlinux forces lib/memcat_p.o to be > linked in. A simpler workaround for v5.4 would be: > > diff --git a/lib/Makefile b/lib/Makefile > index a5c5f342ade0..745d1207e9e2 100644 > --- a/lib/Makefile > +++ b/lib/Makefile > @@ -33,7 +33,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \ > flex_proportions.o ratelimit.o show_mem.o \ > is_single_threaded.o plist.o decompress.o kobject_uevent.o \ > earlycpio.o seq_buf.o siphash.o dec_and_lock.o \ > - nmi_backtrace.o nodemask.o win_minmax.o memcat_p.o \ > + nmi_backtrace.o nodemask.o win_minmax.o \ > buildid.o > > lib-$(CONFIG_PRINTK) += dump_stack.o > @@ -48,7 +48,7 @@ obj-y += bcd.o sort.o parser.o debug_locks.o random32.o \ > bsearch.o find_bit.o llist.o memweight.o kfifo.o \ > percpu-refcount.o rhashtable.o \ > once.o refcount.o usercopy.o errseq.o bucket_locks.o \ > - generic-radix-tree.o > + generic-radix-tree.o memcat_p.o > obj-$(CONFIG_STRING_SELFTEST) += test_string.o > obj-y += string_helpers.o > obj-$(CONFIG_TEST_STRING_HELPERS) += test-string_helpers.o > > which is the same as what 7273ad2b08f8 does, but only for this one file > instead of all of lib/*.o. I think a "one off" change would be best here. Can you submit it? thanks, greg k-h