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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 12 Nov 2019 20:43:41 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Po Liu <po.liu@....com>
Cc:     kbuild-all@...ts.01.org, Claudiu Manoil <claudiu.manoil@....com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "vinicius.gomes@...el.com" <vinicius.gomes@...el.com>,
        Po Liu <po.liu@....com>,
        Vladimir Oltean <vladimir.oltean@....com>,
        Alexandru Marginean <alexandru.marginean@....com>,
        Xiaoliang Yang <xiaoliang.yang_1@....com>,
        Roy Zang <roy.zang@....com>, Mingkai Hu <mingkai.hu@....com>,
        Jerry Huang <jerry.huang@....com>, Leo Li <leoyang.li@....com>
Subject: Re: [net-next, 1/2] enetc: Configure the Time-Aware Scheduler via
 tc-taprio offload

Hi Po,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on v5.4-rc7 next-20191112]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Po-Liu/enetc-Configure-the-Time-Aware-Scheduler-via-tc-taprio-offload/20191112-193235
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git ca22d6977b9b4ab0fd2e7909b57e32ba5b95046f
config: arm64-allmodconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/freescale/enetc/enetc_qos.c: In function 'enetc_setup_tc_taprio':
>> drivers/net/ethernet/freescale/enetc/enetc_qos.c:25:6: warning: 'temp' may be used uninitialized in this function [-Wmaybe-uninitialized]
     u32 temp;
         ^~~~

vim +/temp +25 drivers/net/ethernet/freescale/enetc/enetc_qos.c

    13	
    14	static int enetc_setup_taprio(struct net_device *ndev,
    15				      struct tc_taprio_qopt_offload *admin_conf)
    16	{
    17		struct enetc_ndev_priv *priv = netdev_priv(ndev);
    18		struct enetc_cbd cbd = {.cmd = 0};
    19		struct tgs_gcl_conf *gcl_config;
    20		struct tgs_gcl_data *gcl_data;
    21		struct gce *gce;
    22		dma_addr_t dma;
    23		u16 data_size;
    24		u16 gcl_len;
  > 25		u32 temp;
    26		int i;
    27	
    28		gcl_len = admin_conf->num_entries;
    29		if (gcl_len > enetc_get_max_gcl_len(&priv->si->hw))
    30			return -EINVAL;
    31	
    32		if (admin_conf->enable) {
    33			enetc_wr(&priv->si->hw,
    34				 ENETC_QBV_PTGCR_OFFSET,
    35				 temp & (~ENETC_QBV_TGE));
    36			usleep_range(10, 20);
    37			enetc_wr(&priv->si->hw,
    38				 ENETC_QBV_PTGCR_OFFSET,
    39				 temp | ENETC_QBV_TGE);
    40		} else {
    41			enetc_wr(&priv->si->hw,
    42				 ENETC_QBV_PTGCR_OFFSET,
    43				 temp & (~ENETC_QBV_TGE));
    44			return 0;
    45		}
    46	
    47		/* Configure the (administrative) gate control list using the
    48		 * control BD descriptor.
    49		 */
    50		gcl_config = &cbd.gcl_conf;
    51	
    52		data_size = sizeof(struct tgs_gcl_data) + gcl_len * sizeof(struct gce);
    53	
    54		gcl_data = kzalloc(data_size, __GFP_DMA | GFP_KERNEL);
    55		if (!gcl_data)
    56			return -ENOMEM;
    57	
    58		gce = (struct gce *)(gcl_data + 1);
    59	
    60		/* Since no initial state config in taprio, set gates open as default.
    61		 */
    62		gcl_config->atc = 0xff;
    63		gcl_config->acl_len = cpu_to_le16(gcl_len);
    64	
    65		if (!admin_conf->base_time) {
    66			gcl_data->btl =
    67				cpu_to_le32(enetc_rd(&priv->si->hw, ENETC_SICTR0));
    68			gcl_data->bth =
    69				cpu_to_le32(enetc_rd(&priv->si->hw, ENETC_SICTR1));
    70		} else {
    71			gcl_data->btl =
    72				cpu_to_le32(lower_32_bits(admin_conf->base_time));
    73			gcl_data->bth =
    74				cpu_to_le32(upper_32_bits(admin_conf->base_time));
    75		}
    76	
    77		gcl_data->ct = cpu_to_le32(admin_conf->cycle_time);
    78		gcl_data->cte = cpu_to_le32(admin_conf->cycle_time_extension);
    79	
    80		for (i = 0; i < gcl_len; i++) {
    81			struct tc_taprio_sched_entry *temp_entry;
    82			struct gce *temp_gce = gce + i;
    83	
    84			temp_entry = &admin_conf->entries[i];
    85	
    86			temp_gce->gate = cpu_to_le32(temp_entry->gate_mask);
    87			temp_gce->period = cpu_to_le32(temp_entry->interval);
    88		}
    89	
    90		cbd.length = cpu_to_le16(data_size);
    91		cbd.status_flags = 0;
    92	
    93		dma = dma_map_single(&priv->si->pdev->dev, gcl_data,
    94				     data_size, DMA_TO_DEVICE);
    95		if (dma_mapping_error(&priv->si->pdev->dev, dma)) {
    96			netdev_err(priv->si->ndev, "DMA mapping failed!\n");
    97			kfree(gcl_data);
    98			return -ENOMEM;
    99		}
   100	
   101		cbd.addr[0] = lower_32_bits(dma);
   102		cbd.addr[1] = upper_32_bits(dma);
   103		cbd.cls = BDCR_CMD_PORT_GCL;
   104	
   105		/* Updated by ENETC on completion of the configuration
   106		 * command. A zero value indicates success.
   107		 */
   108		cbd.status_flags = 0;
   109	
   110		enetc_send_cmd(priv->si, &cbd);
   111	
   112		dma_unmap_single(&priv->si->pdev->dev, dma, data_size, DMA_TO_DEVICE);
   113		kfree(gcl_data);
   114	
   115		return 0;
   116	}
   117	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ