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: <202110250146.2w7fdWCN-lkp@intel.com>
Date:   Mon, 25 Oct 2021 01:38:01 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kees Cook <keescook@...omium.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: fs/jffs2/xattr.c:887:1: warning: the frame size of 1040 bytes is
 larger than 1024 bytes

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   9c0c4d24ac000e52d55348961d3a3ba42065e0cf
commit: d0a3ac549f389c1511a4df0d7638536305205d20 ubsan: enable for all*config builds
date:   10 months ago
config: powerpc64-randconfig-r013-20211019 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 11.2.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=d0a3ac549f389c1511a4df0d7638536305205d20
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d0a3ac549f389c1511a4df0d7638536305205d20
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=powerpc 

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

All warnings (new ones prefixed by >>):

   fs/jffs2/xattr.c: In function 'jffs2_garbage_collect_xattr_datum':
   fs/jffs2/xattr.c:1247:79: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
    1247 |                           xd->xid, xd->version, old_ofs, ref_offset(xd->node));
         |                                                                               ^
   fs/jffs2/xattr.c:1222:34: warning: variable 'old_ofs' set but not used [-Wunused-but-set-variable]
    1222 |         uint32_t totlen, length, old_ofs;
         |                                  ^~~~~~~
   fs/jffs2/xattr.c: In function 'jffs2_garbage_collect_xattr_ref':
   fs/jffs2/xattr.c:1281:86: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
    1281 |                           ref->ic->ino, ref->xd->xid, old_ofs, ref_offset(ref->node));
         |                                                                                      ^
   fs/jffs2/xattr.c:1258:34: warning: variable 'old_ofs' set but not used [-Wunused-but-set-variable]
    1258 |         uint32_t totlen, length, old_ofs;
         |                                  ^~~~~~~
   fs/jffs2/xattr.c: In function 'jffs2_build_xattr_subsystem':
>> fs/jffs2/xattr.c:887:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
     887 | }
         | ^


vim +887 fs/jffs2/xattr.c

aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  773  
c9f700f840bd48 KaiGai Kohei    2006-06-11  774  #define XREF_TMPHASH_SIZE	(128)
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  775  void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c)
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  776  {
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  777  	struct jffs2_xattr_ref *ref, *_ref;
c9f700f840bd48 KaiGai Kohei    2006-06-11  778  	struct jffs2_xattr_ref *xref_tmphash[XREF_TMPHASH_SIZE];
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  779  	struct jffs2_xattr_datum *xd, *_xd;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  780  	struct jffs2_inode_cache *ic;
c9f700f840bd48 KaiGai Kohei    2006-06-11  781  	struct jffs2_raw_node_ref *raw;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  782  	int i, xdatum_count = 0, xdatum_unchecked_count = 0, xref_count = 0;
8a13695cbe4e83 KaiGai Kohei    2006-06-24  783  	int xdatum_orphan_count = 0, xref_orphan_count = 0, xref_dead_count = 0;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  784  
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  785  	BUG_ON(!(c->flags & JFFS2_SB_FLAG_BUILDING));
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  786  
8a13695cbe4e83 KaiGai Kohei    2006-06-24  787  	/* Phase.1 : Merge same xref */
c9f700f840bd48 KaiGai Kohei    2006-06-11  788  	for (i=0; i < XREF_TMPHASH_SIZE; i++)
c9f700f840bd48 KaiGai Kohei    2006-06-11  789  		xref_tmphash[i] = NULL;
8f2b6f49c656dd KaiGai Kohei    2006-05-13  790  	for (ref=c->xref_temp; ref; ref=_ref) {
c9f700f840bd48 KaiGai Kohei    2006-06-11  791  		struct jffs2_xattr_ref *tmp;
c9f700f840bd48 KaiGai Kohei    2006-06-11  792  
8f2b6f49c656dd KaiGai Kohei    2006-05-13  793  		_ref = ref->next;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  794  		if (ref_flags(ref->node) != REF_PRISTINE) {
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  795  			if (verify_xattr_ref(c, ref)) {
c9f700f840bd48 KaiGai Kohei    2006-06-11  796  				BUG_ON(ref->node->next_in_ino != (void *)ref);
c9f700f840bd48 KaiGai Kohei    2006-06-11  797  				ref->node->next_in_ino = NULL;
c9f700f840bd48 KaiGai Kohei    2006-06-11  798  				jffs2_mark_node_obsolete(c, ref->node);
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  799  				jffs2_free_xattr_ref(ref);
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  800  				continue;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  801  			}
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  802  		}
c9f700f840bd48 KaiGai Kohei    2006-06-11  803  
c9f700f840bd48 KaiGai Kohei    2006-06-11  804  		i = (ref->ino ^ ref->xid) % XREF_TMPHASH_SIZE;
c9f700f840bd48 KaiGai Kohei    2006-06-11  805  		for (tmp=xref_tmphash[i]; tmp; tmp=tmp->next) {
c9f700f840bd48 KaiGai Kohei    2006-06-11  806  			if (tmp->ino == ref->ino && tmp->xid == ref->xid)
c9f700f840bd48 KaiGai Kohei    2006-06-11  807  				break;
c9f700f840bd48 KaiGai Kohei    2006-06-11  808  		}
c9f700f840bd48 KaiGai Kohei    2006-06-11  809  		if (tmp) {
c9f700f840bd48 KaiGai Kohei    2006-06-11  810  			raw = ref->node;
c9f700f840bd48 KaiGai Kohei    2006-06-11  811  			if (ref->xseqno > tmp->xseqno) {
c9f700f840bd48 KaiGai Kohei    2006-06-11  812  				tmp->xseqno = ref->xseqno;
c9f700f840bd48 KaiGai Kohei    2006-06-11  813  				raw->next_in_ino = tmp->node;
c9f700f840bd48 KaiGai Kohei    2006-06-11  814  				tmp->node = raw;
c9f700f840bd48 KaiGai Kohei    2006-06-11  815  			} else {
c9f700f840bd48 KaiGai Kohei    2006-06-11  816  				raw->next_in_ino = tmp->node->next_in_ino;
c9f700f840bd48 KaiGai Kohei    2006-06-11  817  				tmp->node->next_in_ino = raw;
c9f700f840bd48 KaiGai Kohei    2006-06-11  818  			}
c9f700f840bd48 KaiGai Kohei    2006-06-11  819  			jffs2_free_xattr_ref(ref);
c9f700f840bd48 KaiGai Kohei    2006-06-11  820  			continue;
c9f700f840bd48 KaiGai Kohei    2006-06-11  821  		} else {
c9f700f840bd48 KaiGai Kohei    2006-06-11  822  			ref->next = xref_tmphash[i];
c9f700f840bd48 KaiGai Kohei    2006-06-11  823  			xref_tmphash[i] = ref;
c9f700f840bd48 KaiGai Kohei    2006-06-11  824  		}
c9f700f840bd48 KaiGai Kohei    2006-06-11  825  	}
c9f700f840bd48 KaiGai Kohei    2006-06-11  826  	c->xref_temp = NULL;
c9f700f840bd48 KaiGai Kohei    2006-06-11  827  
8a13695cbe4e83 KaiGai Kohei    2006-06-24  828  	/* Phase.2 : Bind xref with inode_cache and xattr_datum */
c9f700f840bd48 KaiGai Kohei    2006-06-11  829  	for (i=0; i < XREF_TMPHASH_SIZE; i++) {
c9f700f840bd48 KaiGai Kohei    2006-06-11  830  		for (ref=xref_tmphash[i]; ref; ref=_ref) {
8a13695cbe4e83 KaiGai Kohei    2006-06-24  831  			xref_count++;
c9f700f840bd48 KaiGai Kohei    2006-06-11  832  			_ref = ref->next;
c9f700f840bd48 KaiGai Kohei    2006-06-11  833  			if (is_xattr_ref_dead(ref)) {
c9f700f840bd48 KaiGai Kohei    2006-06-11  834  				ref->next = c->xref_dead_list;
c9f700f840bd48 KaiGai Kohei    2006-06-11  835  				c->xref_dead_list = ref;
8a13695cbe4e83 KaiGai Kohei    2006-06-24  836  				xref_dead_count++;
c9f700f840bd48 KaiGai Kohei    2006-06-11  837  				continue;
c9f700f840bd48 KaiGai Kohei    2006-06-11  838  			}
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  839  			/* At this point, ref->xid and ref->ino contain XID and inode number.
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  840  			   ref->xd and ref->ic are not valid yet. */
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  841  			xd = jffs2_find_xattr_datum(c, ref->xid);
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  842  			ic = jffs2_get_ino_cache(c, ref->ino);
27c72b040c0be8 David Woodhouse 2008-05-01  843  			if (!xd || !ic || !ic->pino_nlink) {
8a13695cbe4e83 KaiGai Kohei    2006-06-24  844  				dbg_xattr("xref(ino=%u, xid=%u, xseqno=%u) is orphan.\n",
c9f700f840bd48 KaiGai Kohei    2006-06-11  845  					  ref->ino, ref->xid, ref->xseqno);
8a13695cbe4e83 KaiGai Kohei    2006-06-24  846  				ref->xseqno |= XREF_DELETE_MARKER;
c9f700f840bd48 KaiGai Kohei    2006-06-11  847  				ref->next = c->xref_dead_list;
c9f700f840bd48 KaiGai Kohei    2006-06-11  848  				c->xref_dead_list = ref;
8a13695cbe4e83 KaiGai Kohei    2006-06-24  849  				xref_orphan_count++;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  850  				continue;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  851  			}
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  852  			ref->xd = xd;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  853  			ref->ic = ic;
2c887e2359f6e7 KaiGai Kohei    2006-06-24  854  			atomic_inc(&xd->refcnt);
8f2b6f49c656dd KaiGai Kohei    2006-05-13  855  			ref->next = ic->xref;
8f2b6f49c656dd KaiGai Kohei    2006-05-13  856  			ic->xref = ref;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  857  		}
c9f700f840bd48 KaiGai Kohei    2006-06-11  858  	}
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  859  
8a13695cbe4e83 KaiGai Kohei    2006-06-24  860  	/* Phase.3 : Link unchecked xdatum to xattr_unchecked list */
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  861  	for (i=0; i < XATTRINDEX_HASHSIZE; i++) {
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  862  		list_for_each_entry_safe(xd, _xd, &c->xattrindex[i], xindex) {
8a13695cbe4e83 KaiGai Kohei    2006-06-24  863  			xdatum_count++;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  864  			list_del_init(&xd->xindex);
2c887e2359f6e7 KaiGai Kohei    2006-06-24  865  			if (!atomic_read(&xd->refcnt)) {
8a13695cbe4e83 KaiGai Kohei    2006-06-24  866  				dbg_xattr("xdatum(xid=%u, version=%u) is orphan.\n",
c9f700f840bd48 KaiGai Kohei    2006-06-11  867  					  xd->xid, xd->version);
8a13695cbe4e83 KaiGai Kohei    2006-06-24  868  				xd->flags |= JFFS2_XFLAGS_DEAD;
c9f700f840bd48 KaiGai Kohei    2006-06-11  869  				list_add(&xd->xindex, &c->xattr_unchecked);
8a13695cbe4e83 KaiGai Kohei    2006-06-24  870  				xdatum_orphan_count++;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  871  				continue;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  872  			}
c9f700f840bd48 KaiGai Kohei    2006-06-11  873  			if (is_xattr_datum_unchecked(c, xd)) {
c9f700f840bd48 KaiGai Kohei    2006-06-11  874  				dbg_xattr("unchecked xdatum(xid=%u, version=%u)\n",
c9f700f840bd48 KaiGai Kohei    2006-06-11  875  					  xd->xid, xd->version);
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  876  				list_add(&xd->xindex, &c->xattr_unchecked);
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  877  				xdatum_unchecked_count++;
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  878  			}
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  879  		}
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  880  	}
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  881  	/* build complete */
8a13695cbe4e83 KaiGai Kohei    2006-06-24  882  	JFFS2_NOTICE("complete building xattr subsystem, %u of xdatum"
8a13695cbe4e83 KaiGai Kohei    2006-06-24  883  		     " (%u unchecked, %u orphan) and "
8a13695cbe4e83 KaiGai Kohei    2006-06-24  884  		     "%u of xref (%u dead, %u orphan) found.\n",
8a13695cbe4e83 KaiGai Kohei    2006-06-24  885  		     xdatum_count, xdatum_unchecked_count, xdatum_orphan_count,
8a13695cbe4e83 KaiGai Kohei    2006-06-24  886  		     xref_count, xref_dead_count, xref_orphan_count);
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13 @887  }
aa98d7cf59b5b0 KaiGai Kohei    2006-05-13  888  

:::::: The code at line 887 was first introduced by commit
:::::: aa98d7cf59b5b0764d3502662053489585faf2fe [JFFS2][XATTR] XATTR support on JFFS2 (version. 5)

:::::: TO: KaiGai Kohei <kaigai@...jp.nec.com>
:::::: CC: KaiGai Kohei <kaigai@...jp.nec.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ