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, 4 Jun 2024 05:25:59 +0800
From: kernel test robot <lkp@...el.com>
To: Xiu Jianfeng <xiujianfeng@...wei.com>, akpm@...ux-foundation.org,
	muchun.song@...ux.dev
Cc: oe-kbuild-all@...ts.linux.dev, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next 2/3] mm/hugetlb_cgroup: prepare cftypes based on
 template

Hi Xiu,

kernel test robot noticed the following build warnings:

[auto build test WARNING on akpm-mm/mm-everything]

url:    https://github.com/intel-lab-lkp/linux/commits/Xiu-Jianfeng/mm-hugetlb_cgroup-identify-the-legacy-using-cgroup_subsys_on_dfl/20240603-201513
base:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link:    https://lore.kernel.org/r/20240603120506.1837322-3-xiujianfeng%40huawei.com
patch subject: [PATCH -next 2/3] mm/hugetlb_cgroup: prepare cftypes based on template
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240604/202406040437.z2Iel9db-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240604/202406040437.z2Iel9db-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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406040437.z2Iel9db-lkp@intel.com/

All warnings (new ones prefixed by >>):

   mm/hugetlb_cgroup.c: In function 'hugetlb_cgroup_cfttypes_init':
>> mm/hugetlb_cgroup.c:828:21: warning: the comparison will always evaluate as 'true' for the address of 'name' will never be NULL [-Waddress]
     828 |                 if (tmpl->name)
         |                     ^~~~
   In file included from include/linux/cgroup.h:27,
                    from mm/hugetlb_cgroup.c:20:
   include/linux/cgroup-defs.h:605:14: note: 'name' declared here
     605 |         char name[MAX_CFTYPE_NAME];
         |              ^~~~


vim +828 mm/hugetlb_cgroup.c

   814	
   815	static void __init
   816	hugetlb_cgroup_cfttypes_init(struct hstate *h, struct cftype *cft,
   817				     struct cftype *tmpl, int tmpl_size)
   818	{
   819		char buf[32];
   820		int i, idx = hstate_index(h);
   821	
   822		/* format the size */
   823		mem_fmt(buf, sizeof(buf), huge_page_size(h));
   824	
   825		for (i = 0; i < tmpl_size; cft++, tmpl++, i++) {
   826			*cft = *tmpl;
   827			/* rebuild the name */
 > 828			if (tmpl->name)
   829				snprintf(cft->name, MAX_CFTYPE_NAME, "%s.%s", buf, tmpl->name);
   830			/* rebuild the private */
   831			if (tmpl->private)
   832				cft->private = MEMFILE_PRIVATE(idx, tmpl->private);
   833			/* rebuild the file_offset */
   834			if (tmpl->file_offset) {
   835				unsigned int offset = tmpl->file_offset;
   836	
   837				cft->file_offset = MEMFILE_OFFSET0(offset) +
   838						   MEMFILE_FIELD_SIZE(offset) * idx;
   839			}
   840		}
   841	}
   842	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ