From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 75EFB1C3306; Sat, 1 Mar 2025 19:33:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740857631; cv=none; b=AN4hE3dI0Tluh62n7gL2Ut6vM2xg+roZyt01kAcMY4qcisS17OAH4RwKikl85SRHg2JVSCY4Fj6c6U+dwMxwdlaUXe1AthqDTHi6UAK/GaSqTSZlHEvbPz2DAgdlWyK36lYWfnNkGOUcyOukujrJeBPlCComJM5G7FxnrnOYrLE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740857631; c=relaxed/simple; bh=7+mfL4nxARIzg/D/ViQ6SzXLcJloibEqmI0+Ez6F/mQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MH2U715LecTtwwYmad4DDHLscp4g6CHFJYXVcrl/VcaQwRYXOgWRjLHb1f+QuBs1ULUPfIUxOK/j2391fCnCsXPxyLMvHOUcKl1FQ2zz/6FTcmBOZRWsv+Ej0N6Kh0Ep9FgSSqVZo1X6FLpjjl3a7fdVzY471IbS0OQ14yjNwg0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bmwCUBt6; arc=none smtp.client-ip=198.175.65.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bmwCUBt6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1740857629; x=1772393629; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7+mfL4nxARIzg/D/ViQ6SzXLcJloibEqmI0+Ez6F/mQ=; b=bmwCUBt65tMlU36PEXbJlJz3807gCuRdEG2R7GLPAmQVGun/+zNhKlEx whfBcHoqL1SKY99UQ6bqeAfl0ue+Mx+ZWBB8a3eaQXCqihH5TDxju//pd E4ogFjP9GKzZhRaeUZipvOfisP7p+Z+DaKf3SRSmdvWbouHo59NzsiHc0 Av1ZITag/vfK88fNTHoqAOsFKKSWZiGvUsn6b6ysjMPEeuK0pjM3my72S Bt4GFsFBBSOUh5L3HVmYheTyMLRP8yV4rkxZVMC6Qxmo/81IuJI1UlvXv ZCMJEmCCg/PtkOAZ5XCTdEl4mr12LRC6CW5gURrCgdQOrtciIHFjFI9I4 Q==; X-CSE-ConnectionGUID: o/v35bCVRluRcEI7ZclvYw== X-CSE-MsgGUID: GIa1H1TGQTeh1H12NMC8Mw== X-IronPort-AV: E=McAfee;i="6700,10204,11360"; a="41795453" X-IronPort-AV: E=Sophos;i="6.13,326,1732608000"; d="scan'208";a="41795453" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2025 11:33:49 -0800 X-CSE-ConnectionGUID: qXHbsIC+TFKyonvg+JVwgQ== X-CSE-MsgGUID: FktDV3sVTmOk2XPuR4o6BQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,326,1732608000"; d="scan'208";a="117414106" Received: from lkp-server02.sh.intel.com (HELO 76cde6cc1f07) ([10.239.97.151]) by fmviesa006.fm.intel.com with ESMTP; 01 Mar 2025 11:33:45 -0800 Received: from kbuild by 76cde6cc1f07 with local (Exim 4.96) (envelope-from ) id 1toSac-000Gbm-2W; Sat, 01 Mar 2025 19:33:36 +0000 Date: Sun, 2 Mar 2025 03:33:09 +0800 From: kernel test robot To: Aditya Garg , "castet.matthieu@free.fr" , "stf_xl@wp.pl" , "gregkh@linuxfoundation.org" , "b-liu@ti.com" , "johan@kernel.org" , "heikki.krogerus@linux.intel.com" , "valentina.manea.m@gmail.com" , "shuah@kernel.org" , "i@zenithal.me" Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" Subject: Re: [PATCH] usb: replace strcpy() with strscpy() Message-ID: <202503020319.Lj7EYfWc-lkp@intel.com> References: Precedence: bulk X-Mailing-List: linux-usb@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: Hi Aditya, kernel test robot noticed the following build errors: [auto build test ERROR on usb/usb-testing] [also build test ERROR on usb/usb-next usb/usb-linus johan-usb-serial/usb-next johan-usb-serial/usb-linus linus/master v6.14-rc4 next-20250228] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Aditya-Garg/usb-replace-strcpy-with-strscpy/20250228-230839 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing patch link: https://lore.kernel.org/r/DEF7EF73-12C4-4F30-BC14-DD829F0C6884%40live.com patch subject: [PATCH] usb: replace strcpy() with strscpy() config: arm-qcom_defconfig (https://download.01.org/0day-ci/archive/20250302/202503020319.Lj7EYfWc-lkp@intel.com/config) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250302/202503020319.Lj7EYfWc-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/202503020319.Lj7EYfWc-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/usb/gadget/configfs.c:132:2: error: static assertion failed due to requirement '!(!(!__builtin_types_compatible_p(char *, char *)))': must be array 132 | strscpy(str, s); | ^~~~~~~~~~~~~~~ include/linux/string.h:114:2: note: expanded from macro 'strscpy' 114 | CONCATENATE(__strscpy, COUNT_ARGS(__VA_ARGS__))(dst, src, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/args.h:26:27: note: expanded from macro 'CONCATENATE' 26 | #define CONCATENATE(a, b) __CONCAT(a, b) | ^ include/linux/args.h:25:24: note: expanded from macro '__CONCAT' 25 | #define __CONCAT(a, b) a ## b | ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/string.h:80:40: note: expanded from macro '__strscpy0' 80 | sized_strscpy(dst, src, sizeof(dst) + __must_be_array(dst) + \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/compiler.h:202:28: note: expanded from macro '__must_be_array' 202 | #define __must_be_array(a) __BUILD_BUG_ON_ZERO_MSG(!__is_array(a), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 203 | "must be array") | ~~~~~~~~~~~~~~~~ include/linux/compiler.h:197:77: note: expanded from macro '__BUILD_BUG_ON_ZERO_MSG' 197 | #define __BUILD_BUG_ON_ZERO_MSG(e, msg) ((int)sizeof(struct {_Static_assert(!(e), msg);})) | ^~~~ 1 error generated. vim +132 drivers/usb/gadget/configfs.c 112 113 static int usb_string_copy(const char *s, char **s_copy) 114 { 115 int ret; 116 char *str; 117 char *copy = *s_copy; 118 119 ret = strlen(s); 120 if (ret > USB_MAX_STRING_LEN) 121 return -EOVERFLOW; 122 if (ret < 1) 123 return -EINVAL; 124 125 if (copy) { 126 str = copy; 127 } else { 128 str = kmalloc(USB_MAX_STRING_WITH_NULL_LEN, GFP_KERNEL); 129 if (!str) 130 return -ENOMEM; 131 } > 132 strscpy(str, s); 133 if (str[ret - 1] == '\n') 134 str[ret - 1] = '\0'; 135 *s_copy = str; 136 return 0; 137 } 138 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki