lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201808061033.gXlwOg8s%fengguang.wu@intel.com>
Date:   Mon, 6 Aug 2018 10:35:37 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Vasundhara Volam <vasundhara-v.volam@...adcom.com>
Cc:     kbuild-all@...org, netdev@...r.kernel.org,
        Michael Chan <michael.chan@...adcom.com>
Subject: [net-next:master 1709/1739]
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2989:1: warning: the frame
 size of 1156 bytes is larger than 1024 bytes

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   981467033a37d916649647fa3afe1fe99bba1817
commit: 6c5657d085ae8c13a8565b98e6a23fe68f0bede4 [1709/1739] bnxt_en: Add support for ethtool get dump.
config: microblaze-allmodconfig (attached as .config)
compiler: microblaze-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 6c5657d085ae8c13a8565b98e6a23fe68f0bede4
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=microblaze 

All warnings (new ones prefixed by >>):

   In function 'bnxt_fill_coredump_record',
       inlined from 'bnxt_get_coredump' at drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2980:3:
   drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2863:2: warning: 'strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
     strncpy(record->system_name, utsname()->nodename,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      strlen(utsname()->nodename));
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c: In function 'bnxt_get_coredump':
>> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2989:1: warning: the frame size of 1156 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^

vim +2989 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

  2896	
  2897	static int bnxt_get_coredump(struct bnxt *bp, void *buf, u32 *dump_len)
  2898	{
  2899		u32 ver_get_resp_len = sizeof(struct hwrm_ver_get_output);
  2900		struct coredump_segment_record *seg_record = NULL;
  2901		u32 offset = 0, seg_hdr_len, seg_record_len;
  2902		struct bnxt_coredump_segment_hdr seg_hdr;
  2903		struct bnxt_coredump_record coredump_rec;
  2904		struct bnxt_coredump coredump = {NULL};
  2905		time64_t start_time;
  2906		u16 start_utc;
  2907		int rc = 0, i;
  2908	
  2909		start_time = ktime_get_real_seconds();
  2910		start_utc = sys_tz.tz_minuteswest * 60;
  2911		seg_hdr_len = sizeof(seg_hdr);
  2912	
  2913		/* First segment should be hwrm_ver_get response */
  2914		*dump_len = seg_hdr_len + ver_get_resp_len;
  2915		if (buf) {
  2916			bnxt_fill_coredump_seg_hdr(bp, &seg_hdr, NULL, ver_get_resp_len,
  2917						   0, 0, 0);
  2918			memcpy(buf + offset, &seg_hdr, seg_hdr_len);
  2919			offset += seg_hdr_len;
  2920			memcpy(buf + offset, &bp->ver_resp, ver_get_resp_len);
  2921			offset += ver_get_resp_len;
  2922		}
  2923	
  2924		rc = bnxt_hwrm_dbg_coredump_list(bp, &coredump);
  2925		if (rc) {
  2926			netdev_err(bp->dev, "Failed to get coredump segment list\n");
  2927			goto err;
  2928		}
  2929	
  2930		*dump_len += seg_hdr_len * coredump.total_segs;
  2931	
  2932		seg_record = (struct coredump_segment_record *)coredump.data;
  2933		seg_record_len = sizeof(*seg_record);
  2934	
  2935		for (i = 0; i < coredump.total_segs; i++) {
  2936			u16 comp_id = le16_to_cpu(seg_record->component_id);
  2937			u16 seg_id = le16_to_cpu(seg_record->segment_id);
  2938			u32 duration = 0, seg_len = 0;
  2939			unsigned long start, end;
  2940	
  2941			start = jiffies;
  2942	
  2943			rc = bnxt_hwrm_dbg_coredump_initiate(bp, comp_id, seg_id);
  2944			if (rc) {
  2945				netdev_err(bp->dev,
  2946					   "Failed to initiate coredump for seg = %d\n",
  2947					   seg_record->segment_id);
  2948				goto next_seg;
  2949			}
  2950	
  2951			/* Write segment data into the buffer */
  2952			rc = bnxt_hwrm_dbg_coredump_retrieve(bp, comp_id, seg_id,
  2953							     &seg_len, buf,
  2954							     offset + seg_hdr_len);
  2955			if (rc)
  2956				netdev_err(bp->dev,
  2957					   "Failed to retrieve coredump for seg = %d\n",
  2958					   seg_record->segment_id);
  2959	
  2960	next_seg:
  2961			end = jiffies;
  2962			duration = jiffies_to_msecs(end - start);
  2963			bnxt_fill_coredump_seg_hdr(bp, &seg_hdr, seg_record, seg_len,
  2964						   rc, duration, 0);
  2965	
  2966			if (buf) {
  2967				/* Write segment header into the buffer */
  2968				memcpy(buf + offset, &seg_hdr, seg_hdr_len);
  2969				offset += seg_hdr_len + seg_len;
  2970			}
  2971	
  2972			*dump_len += seg_len;
  2973			seg_record =
  2974				(struct coredump_segment_record *)((u8 *)seg_record +
  2975								   seg_record_len);
  2976		}
  2977	
  2978	err:
  2979		if (buf) {
> 2980			bnxt_fill_coredump_record(bp, &coredump_rec, start_time,
  2981						  start_utc, coredump.total_segs + 1,
  2982						  rc);
  2983			memcpy(buf + offset, &coredump_rec, sizeof(coredump_rec));
  2984		}
  2985		kfree(coredump.data);
  2986		*dump_len += sizeof(coredump_rec);
  2987	
  2988		return rc;
> 2989	}
  2990	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (53714 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ