Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp255462imn; Wed, 27 Jul 2022 05:30:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tg3U+iUGVCPRz/+ZNeDvztaxnhx4/l2TJ9lDHKQix9bIAp/8ddqtNAp29BaWljOCg+JKWy X-Received: by 2002:a17:907:7292:b0:72f:d76:b243 with SMTP id dt18-20020a170907729200b0072f0d76b243mr17982637ejc.230.1658925022964; Wed, 27 Jul 2022 05:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658925022; cv=none; d=google.com; s=arc-20160816; b=XghTt0de22kqsbt+YOXH+3fNYVTqAhQLuQdBtMsulFkB8EROO64i7bvodnK+Psc7lA zppwyXum0jZg65BkFMVMOUJQ55LCpnkoWXz6kw1tGc1O6VFWSHFdX+4ZfkKgGVTL6uWF fKpBjz7JwtIwG/TQJOX1s+BXN0qh72pf3qHj7bO0rawqeMCNv7mCioY2U+d+OJcgC4eC SD+GU8gRUGcASu0l4F5JRxcoACRQEfr1OORgJYeJ1pFd+NMlMGkblyE4LGDn/l0AUuq3 vPnyqtT9PMU9s7HmPhwtfYbgcRUNyoj4L02255n9jXo6H+tQhxVPgyGAH36qrsXfjwyp ElDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=M38Vuy1wymWyu4m30JZlqQYsuGh48yIMAZXYwpjrS40=; b=cbgxoR9eAhfqw0ldpEeEt6E6HTj5zwQbAamDtu18vi1Ib8LHXGpCuxJI3s5UpzTryU UWRt2lpHQaUDypmQPQ0txGxiBLVmHBonm62htlgbvnnlRLrF2FGiMIal+/uSJ1vwUUZR wjaJyU5076R1LyUXdvXRshBT/4ECun75+DzRAvclAYTklfeuH2jatNXMaO7epeNAZqaC VNnx4mTSHaL4DqOK4q6CRXWNE2HxFHxMgEbiRFmty3sLcdMoyvALNUjLeSDSqM1HEG/l nb9bXMuENRAdaU94mUplleQQMqfQEJs0Uj4g6eikFdXAYrLLM9H96Ao/0yC5JuyklqHx 3tEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QNXCWtG4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s24-20020a1709066c9800b0072aeaa77021si16703338ejr.179.2022.07.27.05.29.56; Wed, 27 Jul 2022 05:30:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QNXCWtG4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232912AbiG0MY1 (ORCPT + 99 others); Wed, 27 Jul 2022 08:24:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232339AbiG0MYX (ORCPT ); Wed, 27 Jul 2022 08:24:23 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D267947B8B for ; Wed, 27 Jul 2022 05:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658924662; x=1690460662; h=date:from:to:cc:subject:message-id:mime-version; bh=Rlo/qIEPajtsv9gWsEA5HRfnbEADrU4TJgZs359OUwM=; b=QNXCWtG49bI9Lt7mzsv0UujJmaEN9Xz55ywb8cDbsBUDDns+1n9dtEZq RyDoJYqPyKHAqxl6IGVqG9n527rUry1rGEqjPCjqmo6EMCuGIRZRGU64r WjNdiCJjLSJ4LlPXa76C5i1tK7Hjm4bcsV1MThFqK9g6vHGlE3Y/+2rkK N26HxtLEvIAiTT3k0JhkZ2RGAH/gYOVcUee71aTpH6YXzT4BXj4Xcuzzk Je4IlI+EGT8+OfhseGHvTPwpX0IC2Lyc6JxP5MOfS98gWg0DDFenFogly RvJAmwApBLLCHyeiphXE+v2dyKXExwAUhRw3APVsmbS3f4rmg0pr1UbTQ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10420"; a="267985744" X-IronPort-AV: E=Sophos;i="5.93,195,1654585200"; d="scan'208";a="267985744" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2022 05:24:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,195,1654585200"; d="scan'208";a="628356502" Received: from lkp-server01.sh.intel.com (HELO e0eace57cfef) ([10.239.97.150]) by orsmga008.jf.intel.com with ESMTP; 27 Jul 2022 05:24:20 -0700 Received: from kbuild by e0eace57cfef with local (Exim 4.96) (envelope-from ) id 1oGg5M-0008hg-0W; Wed, 27 Jul 2022 12:24:20 +0000 Date: Wed, 27 Jul 2022 20:23:29 +0800 From: kernel test robot To: Kefeng Wang Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Catalin Marinas Subject: drivers/bus/fsl-mc/dprc.c:494:9: warning: 'strncpy' specified bound 16 equals destination size Message-ID: <202207272044.M4FM7xVg-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEXHASH_WORD, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kefeng, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 39c3c396f8131f3db454c80e0fcfcdc54ed9ec01 commit: dd03762ab608e058c8f390ad9cf667e490089796 arm64: Enable KCSAN date: 8 months ago config: arm64-randconfig-c023-20220727 (https://download.01.org/0day-ci/archive/20220727/202207272044.M4FM7xVg-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dd03762ab608e058c8f390ad9cf667e490089796 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout dd03762ab608e058c8f390ad9cf667e490089796 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/bus/fsl-mc/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/bus/fsl-mc/dprc.c: In function 'dprc_get_obj': drivers/bus/fsl-mc/dprc.c:453:9: warning: 'strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation] 453 | strncpy(obj_desc->type, rsp_params->type, 16); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/bus/fsl-mc/dprc.c:455:9: warning: 'strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation] 455 | strncpy(obj_desc->label, rsp_params->label, 16); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/bus/fsl-mc/dprc.c: In function 'dprc_set_obj_irq': >> drivers/bus/fsl-mc/dprc.c:494:9: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation] 494 | strncpy(cmd_params->obj_type, obj_type, 16); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/bus/fsl-mc/dprc.c: In function 'dprc_get_obj_region': drivers/bus/fsl-mc/dprc.c:567:9: warning: 'strncpy' specified bound 16 equals destination size [-Wstringop-truncation] 567 | strncpy(cmd_params->obj_type, obj_type, 16); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/strncpy +494 drivers/bus/fsl-mc/dprc.c 31c889653c10ddaf drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-03-05 460 e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 461 /** e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 462 * dprc_set_obj_irq() - Set IRQ information for object to trigger an interrupt. e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 463 * @mc_io: Pointer to MC portal's I/O object e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 464 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 465 * @token: Token of DPRC object e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 466 * @obj_type: Type of the object to set its IRQ e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 467 * @obj_id: ID of the object to set its IRQ e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 468 * @irq_index: The interrupt index to configure e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 469 * @irq_cfg: IRQ configuration e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 470 * e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 471 * Return: '0' on Success; Error code otherwise. e9bf3f206bd5e61e drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-24 472 */ 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 473 int dprc_set_obj_irq(struct fsl_mc_io *mc_io, ba72f25b2588e1ac drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-25 474 u32 cmd_flags, ba72f25b2588e1ac drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-25 475 u16 token, 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 476 char *obj_type, 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 477 int obj_id, ba72f25b2588e1ac drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-25 478 u8 irq_index, 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 479 struct dprc_irq_cfg *irq_cfg) 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 480 { 5b04cedeca188874 drivers/bus/fsl-mc/dprc.c Ioana Ciornei 2018-03-15 481 struct fsl_mc_command cmd = { 0 }; 9989b59961a8ad55 drivers/staging/fsl-mc/bus/dprc.c Ioana Radulescu 2016-06-22 482 struct dprc_cmd_set_obj_irq *cmd_params; 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 483 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 484 /* prepare command */ 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 485 cmd.header = mc_encode_cmd_header(DPRC_CMDID_SET_OBJ_IRQ, 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 486 cmd_flags, 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 487 token); 9989b59961a8ad55 drivers/staging/fsl-mc/bus/dprc.c Ioana Radulescu 2016-06-22 488 cmd_params = (struct dprc_cmd_set_obj_irq *)cmd.params; 9989b59961a8ad55 drivers/staging/fsl-mc/bus/dprc.c Ioana Radulescu 2016-06-22 489 cmd_params->irq_val = cpu_to_le32(irq_cfg->val); 9989b59961a8ad55 drivers/staging/fsl-mc/bus/dprc.c Ioana Radulescu 2016-06-22 490 cmd_params->irq_index = irq_index; 9989b59961a8ad55 drivers/staging/fsl-mc/bus/dprc.c Ioana Radulescu 2016-06-22 491 cmd_params->irq_addr = cpu_to_le64(irq_cfg->paddr); 9989b59961a8ad55 drivers/staging/fsl-mc/bus/dprc.c Ioana Radulescu 2016-06-22 492 cmd_params->irq_num = cpu_to_le32(irq_cfg->irq_num); 9989b59961a8ad55 drivers/staging/fsl-mc/bus/dprc.c Ioana Radulescu 2016-06-22 493 cmd_params->obj_id = cpu_to_le32(obj_id); 9989b59961a8ad55 drivers/staging/fsl-mc/bus/dprc.c Ioana Radulescu 2016-06-22 @494 strncpy(cmd_params->obj_type, obj_type, 16); 9989b59961a8ad55 drivers/staging/fsl-mc/bus/dprc.c Ioana Radulescu 2016-06-22 495 cmd_params->obj_type[15] = '\0'; 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 496 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 497 /* send command to mc*/ 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 498 return mc_send_command(mc_io, &cmd); 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 499 } c9d57ea0b6fb0bc0 drivers/staging/fsl-mc/bus/dprc.c Laurentiu Tudor 2017-11-17 500 EXPORT_SYMBOL_GPL(dprc_set_obj_irq); 1ee695fab32e25ff drivers/staging/fsl-mc/bus/dprc.c J. German Rivera 2015-09-23 501 :::::: The code at line 494 was first introduced by commit :::::: 9989b59961a8ad55d92df4588b556f0c6c838ec7 staging: fsl-mc: convert mc command build/parse to use C structs :::::: TO: Ioana Radulescu :::::: CC: Greg Kroah-Hartman -- 0-DAY CI Kernel Test Service https://01.org/lkp