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=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 DB5E6C433B4 for ; Tue, 4 May 2021 07:41:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B5E04613B4 for ; Tue, 4 May 2021 07:41:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229940AbhEDHmv (ORCPT ); Tue, 4 May 2021 03:42:51 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:33317 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229922AbhEDHmu (ORCPT ); Tue, 4 May 2021 03:42:50 -0400 Received: from mail-wm1-f48.google.com ([209.85.128.48]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MJW18-1lxYOx0Riq-00Jtyu for ; Tue, 04 May 2021 09:41:55 +0200 Received: by mail-wm1-f48.google.com with SMTP id 4-20020a05600c26c4b0290146e1feccd8so693638wmv.1 for ; Tue, 04 May 2021 00:41:55 -0700 (PDT) X-Gm-Message-State: AOAM5309/m6PSPiq7ZFrbD49RKAOW9pRsQPHkRbVYT/mEDiZMPSsX8+J wsTaSQ4K2fiClRhqKnPEsPkBAxuCEh7yTkVAKIk= X-Google-Smtp-Source: ABdhPJy4WbzHjDbstNcLBzQ20e0fbkv4jB7XoWaAATPr4ZzFRDOzH7OWB0X1v9qu8nvbxeCVntqFnKiDV+osg6fl+Yo= X-Received: by 2002:a1c:a949:: with SMTP id s70mr2478434wme.84.1620114114819; Tue, 04 May 2021 00:41:54 -0700 (PDT) MIME-Version: 1.0 References: <202105030311.xWwkyV9z-lkp@intel.com> In-Reply-To: From: Arnd Bergmann Date: Tue, 4 May 2021 09:41:14 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined! To: Greg Kroah-Hartman 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 Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:on8RTpaBuqYkQNZp9WGSXDe+A2Q5+EQMb/y15ZVKcbLrJ5I84BH kysUUR8ecJ2XAcWWFDC3NO3OiljTXozfUe5AmUND7evgLsIgu3wBsQIgQzRXqGy8yMmBJ/8 zRSnK1U5Qwl3anjen94nAEAM/+xvO3WKFkhA6OODlwNJJzNKNA5I+lEa6nB0VsR0rF3bAd3 inxy8XI1YZFQREl1TAN4g== X-UI-Out-Filterresults: notjunk:1;V03:K0:EIDHqlE8be8=:BrcaDXBnYfTWOHCcQyUkT8 uzX/8zx1SSfEe/M61/cOD9QnF/UAV6eI5UzsDNKTo4GoaJEnVsQZ2YKAU1htS4l/r/ovPkjox 6m59Z33KCngzogyH6vSVs2vKqA785EUxlshCyfvUjReLnZeVgQyZyl5gdN1nWV14S2joKwZ2H DJg2DXYUtR8i8DUS0b7WPFzBjg+3vWfsSwW3g9QaE4ihjYT3EROrtPcvJfmTNHDYbFM9VMBk5 wBVQQN9nlCmZ1dt7d+VSmQvJecOF6iBdu3OFdGZmqIGLxVYNpHypF1j11QrNiGgPeoc8if7Wj 9jWyzOWMrY005dFjyyQ7yB2Lt5HvkPvJPNG3Lc2EhMzdWFisN89MHhT+fhzL+r1YLEJ3YObdR DmsIedaNcB/DIKbA0zgV1iJoeH2pqFXcYAmrOg5O+OMuvZrMJ7a5cIU9XP//tas4cND/Q0XDA ouQsu0AHXd5u7KO8XFEICud3+znaeUVW1UFDgiogJnJsR+NDvExFXV+3KJJ2k/dDzI764pmk2 u3h5J3pV6zX3x8nEnfbN4gNTLOhmftuHwLkPXgz7DiyWmNLT/9ct0u8WIxavqC0nBy/XFHfag ogm7mqnBaR7yHkIQHKdlX9SyuqGyO1rpsfl0H4bZWIzzvST1knKHfT4ZHu+HTAJO8ctLRe1AY McQs= Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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. Arnd 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=-13.8 required=3.0 tests=BAYES_00, 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 DA8B5C433ED for ; Tue, 4 May 2021 07:41:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4DAEE611C0 for ; Tue, 4 May 2021 07:41:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4DAEE611C0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 427486B0036; Tue, 4 May 2021 03:41:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D7FB6B006E; Tue, 4 May 2021 03:41:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 278C86B0070; Tue, 4 May 2021 03:41:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0009.hostedemail.com [216.40.44.9]) by kanga.kvack.org (Postfix) with ESMTP id 0C5726B0036 for ; Tue, 4 May 2021 03:41:58 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A984C8249980 for ; Tue, 4 May 2021 07:41:57 +0000 (UTC) X-FDA: 78102754674.17.B1E48C5 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by imf14.hostedemail.com (Postfix) with ESMTP id 844BBC0007EA for ; Tue, 4 May 2021 07:41:37 +0000 (UTC) Received: from mail-wm1-f49.google.com ([209.85.128.49]) by mrelayeu.kundenserver.de (mreue011 [213.165.67.97]) with ESMTPSA (Nemesis) id 1Mgebs-1l3NLr27u0-00h7yX for ; Tue, 04 May 2021 09:41:55 +0200 Received: by mail-wm1-f49.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso638056wmh.4 for ; Tue, 04 May 2021 00:41:55 -0700 (PDT) X-Gm-Message-State: AOAM532PP4doI8meZUpUO46Rk3liC7TdTI8YEG5CUe5YF2IsgOfX3XnA 1nNX6LpVSjXX2NIsrdiUgKdryWrEaXUBUSI7hBc= X-Google-Smtp-Source: ABdhPJy4WbzHjDbstNcLBzQ20e0fbkv4jB7XoWaAATPr4ZzFRDOzH7OWB0X1v9qu8nvbxeCVntqFnKiDV+osg6fl+Yo= X-Received: by 2002:a1c:a949:: with SMTP id s70mr2478434wme.84.1620114114819; Tue, 04 May 2021 00:41:54 -0700 (PDT) MIME-Version: 1.0 References: <202105030311.xWwkyV9z-lkp@intel.com> In-Reply-To: From: Arnd Bergmann Date: Tue, 4 May 2021 09:41:14 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined! To: Greg Kroah-Hartman 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 Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:VmKeNZl9YnUqL7Y3KhP54BuzePu/K4IWBbi1/LOv9McrlHLJ6Op +v3A42e/IKVMj2clhOQ0777MDd9Hp31HNfu98xFoUjQ1918V+/DXGNY3mULfsfwBaPsotfx icAcA+2b8zZzTzvAL1FB3GEMxK485qf6uBJN+vrey9+AXgnQFmG3gezWcULip8xmNnHc5Wu 92EbWTfrfuDQhqCMSVb8Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:Bx07jmZSTpo=:G+jEWGyoCjYsmQWgOqotlC 04U1TBM6H3Db4z+WwXds1Dx+z/uqGlIXQgqOCK0nvvxsAC+CTUK8fcJhhK7UnXprtjMoqaUJt JkVTRUDWqetwg/JKLTBA95ZHF3vgupMj0RKNfpC13d33GBoPICplLMH2tFHSSzAlJyEkjdm3t eA3J7Eql2TthBFGcltJqBA2xDntvAtSpGa/mcIsZLuubjRRPm9pgImn+LbPYQxGMtPGAcEDSv HhxLQ5M2yMVCUoacbNG86cm3msRrMw1wUVP13EysLKb1ugBVDalboYuj0POiKpHHOWJazVZES i2ksova4NNudyDia4NT1Mm3aj4+fGxzGHj4L4/u6ta00qJJVsmdq0j1INkLh1nUXrTL/eNHUn +PFXS5bQ4vOzSwL7vo06PZIRK4cDeg+O4vqXUyE4OGh67ctj0pxlreCQhHxzdoMhlDsOlkpNB QYgyWT8yFVDCBvuo11P4iCpuW6j0+XpLiRDzOw6JIuy8zABou+Amcm6SVdc0LE2mgqGRUbufQ LtUr+qf5dwJFGjxLBlybn9nKaVCg1Qez+oXSoaDsl7OBz52NCtTnW8byF9Bn+n17PKak9Wayf if7BogiN8wOL4usfDuDX0PI9WcgLTQ2cwZ/1DsdiacWtAoUdrlGeWnk7IIOlVTqGweBV+GzN9 fy0M= Authentication-Results: imf14.hostedemail.com; dkim=none; spf=none (imf14.hostedemail.com: domain of arnd@arndb.de has no SPF policy when checking 212.227.126.135) smtp.mailfrom=arnd@arndb.de; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 844BBC0007EA X-Stat-Signature: 38xgp1w3gssda8qadtkjebqckgdt36de Received-SPF: none (arndb.de>: No applicable sender policy available) receiver=imf14; identity=mailfrom; envelope-from=""; helo=mout.kundenserver.de; client-ip=212.227.126.135 X-HE-DKIM-Result: none/none X-HE-Tag: 1620114097-761516 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 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. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0287890376544689889==" MIME-Version: 1.0 From: Arnd Bergmann To: kbuild-all@lists.01.org Subject: Re: [stable:linux-5.4.y 5541/6083] ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined! Date: Tue, 04 May 2021 09:41:14 +0200 Message-ID: In-Reply-To: List-Id: --===============0287890376544689889== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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] undefi= ned! > > > > > > > > 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=3Dy") > > > > to v5.4 and earlier would be an easy workaround, but it has the potenti= al > > 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 :=3D 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) +=3D dump_stack.o @@ -48,7 +48,7 @@ obj-y +=3D 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) +=3D test_string.o obj-y +=3D string_helpers.o obj-$(CONFIG_TEST_STRING_HELPERS) +=3D test-string_helpers.o which is the same as what 7273ad2b08f8 does, but only for this one file instead of all of lib/*.o. Arnd --===============0287890376544689889==--