public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: drivers/block/aoe/aoenet.c:42:9: warning: 'strncpy' specified bound 1024 equals destination size
Date: Mon, 22 Aug 2022 18:00:36 +0800	[thread overview]
Message-ID: <202208221724.e2TzAhaW-lkp@intel.com> (raw)

Hi Kefeng,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1c23f9e627a7b412978b4e852793c5e3c3efc555
commit: dd03762ab608e058c8f390ad9cf667e490089796 arm64: Enable KCSAN
date:   8 months ago
config: arm64-randconfig-r034-20220821 (https://download.01.org/0day-ci/archive/20220822/202208221724.e2TzAhaW-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/block/aoe/ drivers/bus/fsl-mc/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/block/aoe/aoenet.c: In function 'aoe_iflist_setup':
>> drivers/block/aoe/aoenet.c:42:9: warning: 'strncpy' specified bound 1024 equals destination size [-Wstringop-truncation]
      42 |         strncpy(aoe_iflist, str, IFLISTSZ);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
   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 +42 drivers/block/aoe/aoenet.c

eb086ec59667df Ed L. Cashin 2012-10-04  38  
03c41c434775c5 Ed L. Cashin 2005-04-29  39  #ifndef MODULE
03c41c434775c5 Ed L. Cashin 2005-04-29  40  static int __init aoe_iflist_setup(char *str)
03c41c434775c5 Ed L. Cashin 2005-04-29  41  {
03c41c434775c5 Ed L. Cashin 2005-04-29 @42  	strncpy(aoe_iflist, str, IFLISTSZ);
03c41c434775c5 Ed L. Cashin 2005-04-29  43  	aoe_iflist[IFLISTSZ - 1] = '\0';
03c41c434775c5 Ed L. Cashin 2005-04-29  44  	return 1;
03c41c434775c5 Ed L. Cashin 2005-04-29  45  }
03c41c434775c5 Ed L. Cashin 2005-04-29  46  

:::::: The code at line 42 was first introduced by commit
:::::: 03c41c434775c52092d17a5031ad8ebaaf555bc4 [PATCH] aoe: improve allowed interfaces configuration

:::::: TO: Ed L Cashin <ecashin@coraid.com>
:::::: CC: Greg KH <gregkh@suse.de>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

             reply	other threads:[~2022-08-22 10:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-22 10:00 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-11-14  9:54 drivers/block/aoe/aoenet.c:42:9: warning: 'strncpy' specified bound 1024 equals destination size kernel test robot
2022-10-09 14:39 kernel test robot
2022-01-19 13:54 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202208221724.e2TzAhaW-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox