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] [day] [month] [year] [list]
Message-ID: <202005300054.hMI2cUvl%lkp@intel.com>
Date:   Sat, 30 May 2020 00:51:03 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Tetsuhiro Kohada <kohada.t2@...il.com>
Cc:     kbuild-all@...ts.01.org,
        kohada.tetsuhiro@...mitsubishielectric.co.jp,
        mori.takahiro@...mitsubishielectric.co.jp,
        motai.hirotaka@...mitsubishielectric.co.jp,
        Namjae Jeon <namjae.jeon@...sung.com>,
        Sungjong Seo <sj1557.seo@...sung.com>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] exfat: add boot region verification

Hi Tetsuhiro,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20200519]
[cannot apply to linus/master v5.7-rc7 v5.7-rc6 v5.7-rc5 v5.7-rc7]
[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/Tetsuhiro-Kohada/exfat-redefine-PBR-as-boot_sector/20200525-195329
base:    fb57b1fabcb28f358901b2df90abd2b48abc1ca8
config: c6x-randconfig-s032-20200529 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-243-gc100a7ab-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 ARCH=c6x CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> fs/exfat/super.c:485:29: sparse: sparse: cast to restricted __le32
>> fs/exfat/super.c:485:29: sparse: sparse: cast to restricted __le32
>> fs/exfat/super.c:485:29: sparse: sparse: cast to restricted __le32
>> fs/exfat/super.c:485:29: sparse: sparse: cast to restricted __le32
>> fs/exfat/super.c:485:29: sparse: sparse: cast to restricted __le32
>> fs/exfat/super.c:485:29: sparse: sparse: cast to restricted __le32
   fs/exfat/super.c:504:21: sparse: sparse: cast to restricted __le32
   fs/exfat/super.c:504:21: sparse: sparse: cast to restricted __le32
   fs/exfat/super.c:504:21: sparse: sparse: cast to restricted __le32
   fs/exfat/super.c:504:21: sparse: sparse: cast to restricted __le32
   fs/exfat/super.c:504:21: sparse: sparse: cast to restricted __le32
   fs/exfat/super.c:504:21: sparse: sparse: cast to restricted __le32

vim +485 fs/exfat/super.c

   469	
   470	static int exfat_verify_boot_region(struct super_block *sb)
   471	{
   472		struct buffer_head *bh = NULL;
   473		u32 chksum = 0, *p_sig, *p_chksum;
   474		int sn, i;
   475	
   476		/* read boot sector sub-regions */
   477		for (sn = 0; sn < 11; sn++) {
   478			bh = sb_bread(sb, sn);
   479			if (!bh)
   480				return -EIO;
   481	
   482			if (sn != 0 && sn <= 8) {
   483				/* extended boot sector sub-regions */
   484				p_sig = (u32 *)&bh->b_data[sb->s_blocksize - 4];
 > 485				if (le32_to_cpu(*p_sig) != EXBOOT_SIGNATURE) {
   486					exfat_err(sb, "no exboot-signature");
   487					brelse(bh);
   488					return -EINVAL;
   489				}
   490			}
   491	
   492			chksum = exfat_calc_chksum32(bh->b_data, sb->s_blocksize,
   493				chksum, sn ? CS_DEFAULT : CS_BOOT_SECTOR);
   494			brelse(bh);
   495		}
   496	
   497		/* boot checksum sub-regions */
   498		bh = sb_bread(sb, sn);
   499		if (!bh)
   500			return -EIO;
   501	
   502		for (i = 0; i < sb->s_blocksize; i += sizeof(u32)) {
   503			p_chksum = (u32 *)&bh->b_data[i];
   504			if (le32_to_cpu(*p_chksum) != chksum) {
   505				exfat_err(sb, "mismatch checksum");
   506				brelse(bh);
   507				return -EINVAL;
   508			}
   509		}
   510		brelse(bh);
   511		return 0;
   512	}
   513	

---
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" (28873 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ