From patchwork Tue May 4 10:44:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 430867 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp3668942jao; Tue, 4 May 2021 03:45:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrtCndAJorDoEf2xEikqomjSqBebjMyKK73pEV7QL9IjEG4olK+/vuKTeecHW1aMWDvaIf X-Received: by 2002:a17:907:174a:: with SMTP id lf10mr22166738ejc.433.1620125117795; Tue, 04 May 2021 03:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620125117; cv=none; d=google.com; s=arc-20160816; b=VHWEUCcTui9TjVS8U2LABZPYplT/RH3raZhUJL9n19QLxC2cdLcpCaxlgGn+wbf66D 12cP9mGgvciArCZB4E0c1jcoP4e/b6azgRKQ2WI2Ovqu3NzFY9RHxM5onI8rqFCDuuo5 uzGMjTpsWyZ3eLZplW6CcAuvZr+8rlI6q34tIboiOz2q1a3/2pqsV0Ax7pmEBzFuus7e RPUnohJh6g7RVyBwQEcZJKRgSYLrV5oyJXoKyR4Z+OV2mEAgv/i9T3SCmXZnFspudxgW wIJo73YKSAWYQzN2rW1Dgf+pxwruCJsBNmasqO35908MLXN69U9Q2Gfe4DbqR3lMX0K6 7YGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gQfLOvBSvMCEkLrVDOnkD6ER89C2WK3eKlGbJlDYAkg=; b=rtZ7wudb+HBc/DSML9Ag4t0hj5lUMbk9tFOORoXo99fwzxEGVgfbqi6C3BBvrrqHiS KkcyBF/4NxShUm9nzDzpSBmuEi3e0C4ZxbLVf4q44perOEzyuYTUiJcAGGmqqCPxdkBB nCybj0Mc8amJHULFQGx8SAXl9vkXzOB/i5a6q1BWkhi0LGN38nJsMmCCZG/ybV4Pq74q 3VGAo735vwFXZMBG3YyK8cNgCb0dsHX5WsnhldOvv/hH3gUHSJMhY/ntMCO/xSon3W0O auUoZ7qWm8MYPGusULf7NHE8ssebUpOF8YKwW6q7ef/ZklaGN4SBV2LwS+hWc/NBp7BY v1+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="OCUS/xwU"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 b14si5097311edf.241.2021.05.04.03.45.17; Tue, 04 May 2021 03:45:17 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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="OCUS/xwU"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S230169AbhEDKqK (ORCPT + 12 others); Tue, 4 May 2021 06:46:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:45936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbhEDKqJ (ORCPT ); Tue, 4 May 2021 06:46:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 198BC611AB; Tue, 4 May 2021 10:45:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620125114; bh=MQBVXYI4JNJL3H8Ev1c0zij2OqljXom3tPD8zsNDclQ=; h=From:To:Cc:Subject:Date:From; b=OCUS/xwUUPxUBs02l4upzMUXrg3f73KSpVjWAeJiTI9k09G8M4pQ0U1gcF7yFzOJL /ZgMRZ1diVtiLPRZi4vyrshSKxgjR4goDBvSqSCPPR2HHS6ctYQ403wnkybFi59zxk fSH74eS24ZmWZZEQXXYFvjKr9VMFz/yZYK1G2KIAg654P2lbUj3P47BdexCj6zfGrv QPn6J9X5IBytFRP14rUKWAo536E0Ntf19J5yVEk2IEXDh0R53LoROxlths9AISKd6A R9fsVjCGlOHU5aAB8mELrqG6MJADdjk1fLthc23PRkZavxgmGor/LmX8JH/21dX2af 6jDzA3zGA2MHQ== From: Arnd Bergmann To: stable@vger.kernel.org Cc: Arnd Bergmann , kernel test robot , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: [PATCH] [stable v5.4] avoid __memcat_p link failure Date: Tue, 4 May 2021 12:44:33 +0200 Message-Id: <20210504104441.1317138-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann The kernel test robot reports a link error when the stm driver is a loadable module on any v5.4 kernel: > ERROR: "__memcat_p" [drivers/hwtracing/stm/stm_core.ko] undefined! This was fixed in mainline with commit 7273ad2b08f8 ("kbuild: link lib-y objects to vmlinux forcibly when CONFIG_MODULES=y"), which is fairly intrusive. Fix the v5.4 specific issue with a minimal subset of that patch, linking only the failing object into the kernel. Kernels before v4.20 are not affected. Reported-by: kernel test robot Link: https://groups.google.com/g/clang-built-linux/c/H-PrABqYShg Signed-off-by: Arnd Bergmann --- lib/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.29.2 diff --git a/lib/Makefile b/lib/Makefile index c5892807e06f..3b8977aed1b4 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -31,7 +31,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 lib-$(CONFIG_PRINTK) += dump_stack.o lib-$(CONFIG_MMU) += ioremap.o @@ -46,7 +46,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