Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1517336lqg; Sun, 3 Mar 2024 14:10:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX9qAxeb+FJnUbDqG+KBzDN+2qRRidfHp49CMDXh01Yyb9mmGjkF5g5px8mLMVcnbObHNAzHrtMhmwj+jtlmWeykH3rXdMV3rC+6ali5Q== X-Google-Smtp-Source: AGHT+IHgodNVPuH0N3pvpNLGqA5DTzUhRdCpm1Tf94mL+jMrk6gtSlrhBjut2mUIGdoLuENU6zbn X-Received: by 2002:a17:906:134b:b0:a45:a6d:e3a7 with SMTP id x11-20020a170906134b00b00a450a6de3a7mr2729536ejb.19.1709503837550; Sun, 03 Mar 2024 14:10:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709503837; cv=pass; d=google.com; s=arc-20160816; b=bFcYWTkTwfHWW6GKyEgD2nvpvmltjVk1IkbdcxqUu2UQg8e1yyEd04Kc6troYMysOG hb8fduWPN1NvZjfjSQ+l0Dc+BN51TAJmL0RHxPS7ybn4OF6iWQdV2GVyWCIqlN9lObY4 S7chkIGaWfBqH1N5OABUMWHW8SheR4Ar3t24JDEta64pfKX3K76y8giwPXpzRDxZnlgq oW5UAhOHxHrAcBD+/EYgBpoowGFCuiwthKJzF/4W4SqyPsHDeJb+/9OW0BgcOPHSbX1X 7MsT1xf9sP/baTTyImJRtmmRih6ExhZOcbnVGh4zY8hWNDmldyA9kF6KGTBuZQ2qpv5T ODYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=0g5zoVT+JVW02GwsTEDCm7DmiF1qRMx3Unb0+lN7s4c=; fh=IdxvAQEjBn3TtRvgnA1Oq25SVRxTyjxrqQ8Hivc/19g=; b=y/8yC/LOMXS3i8cCprbFAg0+C+qkB5SHbeh+cPFc4rj3gdYvMXr2D9j6SvRWLLBlyA LqIfaiCTM7e4jqJB/YwqYvbxcMBzm6MQ0hbOFnhno6+8ZXqTzAwc26AtkkSisGaE1t5j xnS7YWK/WEQQ5fiE0W+cEx3yuMMcYG+vFOhF532eg8LYfytl2V98dM8RySzcSHcDr73E qmUtXLgdeoNogyKGCq/j+ovNKcL6/vEXe2zLB0s90nFOV1NfX5bh2JdlP/4S2658SR+Y dJleH9hDPAqVoIM562thL9EdfNR63lJP6dg83QTpnhzBp052qy79uW2VqTFfHCJhkJjN togQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=UG1mG1Hs; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-89924-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89924-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p20-20020a1709060e9400b00a3e5d50ed0esi3281797ejf.93.2024.03.03.14.10.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 14:10:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89924-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=UG1mG1Hs; arc=pass (i=1 dkim=pass dkdomain=linux.org.uk dmarc=pass fromdomain=zeniv.linux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-89924-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89924-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 49B4E1F21200 for ; Sun, 3 Mar 2024 22:10:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E30A7A719; Sun, 3 Mar 2024 22:10:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="UG1mG1Hs" Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [62.89.141.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EDD143AB5; Sun, 3 Mar 2024 22:10:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.89.141.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709503830; cv=none; b=FhGT2xMS3g3skGgMgVj0Wkiw4mPdt78EImRZ5nsl6/LZVBKkWPHKfMUGixyXNjWgeEZZsGg/04FwaAU+albJdk7suY2uo3VLsqtXsgetOjY4Ox9mQBetAyHtyg+eqTtSiGxKLysj/qBErKQ+xFh6/opheJflZ7ACUbtjHNEN6RM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709503830; c=relaxed/simple; bh=VAh4dIkTENU2/QEjIcjwE+UuoxnSUGcJoPqGUDx5MCc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YyH6nHowzT2uhUIJLJ2V5mdSqTDV7sJ8sLNselTEGt1AI/z+De1UL0sFKJyYR3MyDzTaLMFfx0ZIXLWvJDKJzEBLGm+dWZ73vQ4Plt3r/mvSLo92fyKt084mJS+vaHdj4RBP3u0U7q9x44mi0UYhNwA/2OdANUrIy8Dj/K7tq7Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk; spf=none smtp.mailfrom=ftp.linux.org.uk; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b=UG1mG1Hs; arc=none smtp.client-ip=62.89.141.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ftp.linux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0g5zoVT+JVW02GwsTEDCm7DmiF1qRMx3Unb0+lN7s4c=; b=UG1mG1HsZor8kvPgUKPIAi3Dsx ytA6TJVPQOsJZSxzVIrKu2ZwVYh3Plp8NRL9ZDnpJInBen1kxyXw/BQWWU+d/N6BBfgriWQCRDrS+ kJ7fF7YJyIk8lZ2IZYtPg/xsgDCL0TEfbAAIV2z2avyiG2AGeyutPjVvRCEgCcP2oUjW09tIDxtXe ya0rgkq5N0PQvthdHeegJcveWc85bJZBfYmwGj+nJ3exIxKlT8laS0MlPT8wJ+gW0w3xVavZYFBNK ftPQfPvSy6OQ8Wph7eUzAprdMvcl+4ylrDWFmEkUVHI3n8TpK33bDd+OZBWxESZddtiZiDrUU1L3N YYUyqtsw==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1rgu2D-002GxX-0S; Sun, 03 Mar 2024 22:10:17 +0000 Date: Sun, 3 Mar 2024 22:10:17 +0000 From: Al Viro To: kernel test robot Cc: Jing Cai , oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Luiz Augusto von Dentz , Chris Lu , Sean Wang Subject: Re: WARNING: modpost: "strcpy" [drivers/bluetooth/btmtk.ko] has no CRC! Message-ID: <20240303221017.GB524366@ZenIV> References: <202403040552.0iyr20St-lkp@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202403040552.0iyr20St-lkp@intel.com> Sender: Al Viro On Mon, Mar 04, 2024 at 06:02:08AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 58c806d867bf265c6fd16fc3bc62e2d3c156b5c9 > commit: 0b70151328781a89c89e4cf3fae21fc0e98d869e Bluetooth: btusb: mediatek: add MediaTek devcoredump support > date: 7 months ago > config: alpha-buildonly-randconfig-r004-20220321 (https://download.01.org/0day-ci/archive/20240304/202403040552.0iyr20St-lkp@intel.com/config) > compiler: alpha-linux-gcc (GCC) 13.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240304/202403040552.0iyr20St-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot > | Closes: https://lore.kernel.org/oe-kbuild-all/202403040552.0iyr20St-lkp@intel.com/ commit 8a4a2705ed98c33c2ad5f3e504efe2d379cf72d7 Author: Al Viro Date: Mon Dec 18 22:59:26 2023 -0500 alpha: fix modversions for strcpy() et.al. On alpha str{n,}{cpy,cat}() implementations are playing fun games with shared chunks of code. The problem is, they are using direct branches and need to be next to each other. Currently it's done by building them in separate object files, then using ld -r to link those together. Unfortunately, genksyms machinery has no idea what to do with that - we have generated in arch/alpha/lib/.strcat.S.cmd, but there's nothing to propagate that into .stycpy.S.cmd, so modpost doesn't find anything for those symbols, resulting in WARNING: modpost: EXPORT symbol "strcpy" [vmlinux] version generation failed, symbol will not be versioned. Is "strcpy" prototyped in ? WARNING: modpost: EXPORT symbol "strcat" [vmlinux] version generation failed, symbol will not be versioned. Is "strcat" prototyped in ? WARNING: modpost: EXPORT symbol "strncpy" [vmlinux] version generation failed, symbol will not be versioned. Is "strncpy" prototyped in ? WARNING: modpost: EXPORT symbol "strncat" [vmlinux] version generation failed, symbol will not be versioned. Is "strncat" prototyped in ? spew on modversion-enabled builds (all 4 functions in question are in fact prototyped in asm-prototypes.h) Fixing doesn't require messing with kbuild, thankfully - just build one object (i.e. have sty{n,}cpy.S with includes of relevant *.S instead of playing with ld -r) and that's it. Signed-off-by: Al Viro diff --git a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile index 6a779b9018fd..84046e730e6d 100644 --- a/arch/alpha/lib/Makefile +++ b/arch/alpha/lib/Makefile @@ -44,17 +44,3 @@ AFLAGS___remlu.o = -DREM -DINTSIZE $(addprefix $(obj)/,__divqu.o __remqu.o __divlu.o __remlu.o): \ $(src)/$(ev6-y)divide.S FORCE $(call if_changed_rule,as_o_S) - -# There are direct branches between {str*cpy,str*cat} and stx*cpy. -# Ensure the branches are within range by merging these objects. - -LDFLAGS_stycpy.o := -r -LDFLAGS_styncpy.o := -r - -$(obj)/stycpy.o: $(obj)/strcpy.o $(obj)/$(ev67-y)strcat.o \ - $(obj)/$(ev6-y)stxcpy.o FORCE - $(call if_changed,ld) - -$(obj)/styncpy.o: $(obj)/strncpy.o $(obj)/$(ev67-y)strncat.o \ - $(obj)/$(ev6-y)stxncpy.o FORCE - $(call if_changed,ld) diff --git a/arch/alpha/lib/stycpy.S b/arch/alpha/lib/stycpy.S new file mode 100644 index 000000000000..32ecd9c5f90d --- /dev/null +++ b/arch/alpha/lib/stycpy.S @@ -0,0 +1,11 @@ +#include "strcpy.S" +#ifdef CONFIG_ALPHA_EV67 +#include "ev67-strcat.S" +#else +#include "strcat.S" +#endif +#ifdef CONFIG_ALPHA_EV6 +#include "ev6-stxcpy.S" +#else +#include "stxcpy.S" +#endif diff --git a/arch/alpha/lib/styncpy.S b/arch/alpha/lib/styncpy.S new file mode 100644 index 000000000000..72fc2754eb57 --- /dev/null +++ b/arch/alpha/lib/styncpy.S @@ -0,0 +1,11 @@ +#include "strncpy.S" +#ifdef CONFIG_ALPHA_EV67 +#include "ev67-strncat.S" +#else +#include "strncat.S" +#endif +#ifdef CONFIG_ALPHA_EV6 +#include "ev6-stxncpy.S" +#else +#include "stxncpy.S" +#endif