Content-Type: multipart/mixed; boundary="===============3728874241492873801==" MIME-Version: 1.0 From: Gao Xiang To: kbuild-all@lists.01.org Subject: Re: [kbuild] [xiang-linux:xfs/shrink_lastag 5/5] fs/xfs/xfs_error.c:308 xfs_errortag_add() error: buffer overflow 'xfs_errortag_random_default' 38 <= 38 Date: Tue, 02 Mar 2021 16:16:31 +0800 Message-ID: <20210302081631.GA2565556@xiangao.remote.csb> In-Reply-To: <20210302073842.GQ2222@kadam> List-Id: --===============3728874241492873801== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Dan, On Tue, Mar 02, 2021 at 10:38:43AM +0300, Dan Carpenter wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git = xfs/shrink_lastag > head: 95891836ec5d4d45e5fab66bff969fa3f4063d77 > commit: 95891836ec5d4d45e5fab66bff969fa3f4063d77 [5/5] xfs: add error inj= ection for per-AG resv failure > config: i386-randconfig-m021-20210301 (attached as .config) > compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > Reported-by: Dan Carpenter > = > smatch warnings: > fs/xfs/xfs_error.c:308 xfs_errortag_add() error: buffer overflow 'xfs_err= ortag_random_default' 38 <=3D 38 Thanks for your report. I've got the problem, and fixed it in https://git.kernel.org/pub/scm/linux/kernel/git/xiang/linux.git/commit/?h= =3Dxfs/shrink_lastag&id=3Ddd2149fbe83e838e4819b90b2233dad20a876f5c That was a pending patchset intended for reviewing. I will wait the 0day CI result of fixed version, and send out then. Thanks, Gao Xiang > = > vim +/xfs_errortag_random_default +308 fs/xfs/xfs_error.c > = > ^1da177e4c3f41 Linus Torvalds 2005-04-16 299 int > 31965ef34802f4 Darrick J. Wong 2017-06-20 300 xfs_errortag_add( > 31965ef34802f4 Darrick J. Wong 2017-06-20 301 struct xfs_mount *mp, > 31965ef34802f4 Darrick J. Wong 2017-06-20 302 unsigned int error_tag) > ^1da177e4c3f41 Linus Torvalds 2005-04-16 303 { > 31965ef34802f4 Darrick J. Wong 2017-06-20 304 if (error_tag >=3D XFS_E= RRTAG_MAX) > ^^^^^^^^^^^^^= ^^^^^^^^^^^^^^ > = > 31965ef34802f4 Darrick J. Wong 2017-06-20 305 return -EINVAL; > ^1da177e4c3f41 Linus Torvalds 2005-04-16 306 = > 31965ef34802f4 Darrick J. Wong 2017-06-20 307 return xfs_errortag_set(= mp, error_tag, > 31965ef34802f4 Darrick J. Wong 2017-06-20 @308 xfs_errortag_random_de= fault[error_tag]); > ^= ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > = > It looks like this off by one bug is fixed in commit > dd2149fbe83e ("xfs: add error injection for per-AG resv failure"). > You may want to fold that in to the original commit and declare > xfs_errortag_random_default[] as having XFS_ERRTAG_MAX elements. > = > ^1da177e4c3f41 Linus Torvalds 2005-04-16 309 } > = > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org = > _______________________________________________ > kbuild mailing list -- kbuild(a)lists.01.org > To unsubscribe send an email to kbuild-leave(a)lists.01.org --===============3728874241492873801==--