Re: [PATCH] fs: fat: add check for dir size in fat_calc_dir_size

2020-07-06 Thread OGAWA Hirofumi
Anupam Aggarwal writes: >>Anyway, fsck would be main way. And on other hand, if we want to add >>mitigation for corruption, we would have to see much more details of >>this corruption. Can you put somewhere to access the corrupted image >>(need the only metadata) to reproduce? > > Sorry, uploadi

RE: [PATCH] fs: fat: add check for dir size in fat_calc_dir_size

2020-07-06 Thread Anupam Aggarwal
Hi Ogawa, >Anyway, fsck would be main way. And on other hand, if we want to add >mitigation for corruption, we would have to see much more details of >this corruption. Can you put somewhere to access the corrupted image >(need the only metadata) to reproduce? Sorry, uploading of any file not all

Re: [PATCH] fs: fat: add check for dir size in fat_calc_dir_size

2020-07-03 Thread OGAWA Hirofumi
Anupam Aggarwal writes: >>So what was the root cause of slowness on big directory? > > Problem happened on FAT32 formatted 32GB USB 3.0 pendrive, which has > 20GB of data, cluster size is 16KB It has one corrupted directory > whose size calculated by fat_calc_dir_size() is 1146896384 bytes > i.e.

RE: [PATCH] fs: fat: add check for dir size in fat_calc_dir_size

2020-07-03 Thread Anupam Aggarwal
Hi Ogawa, >So what was the root cause of slowness on big directory? Problem happened on FAT32 formatted 32GB USB 3.0 pendrive, which has 20GB of data, cluster size is 16KB It has one corrupted directory whose size calculated by fat_calc_dir_size() is 1146896384 bytes i.e. 1.06 GB. When directo

Re: [PATCH] fs: fat: add check for dir size in fat_calc_dir_size

2020-06-30 Thread OGAWA Hirofumi
Anupam Aggarwal writes: > Max directory size of FAT filesystem is FAT_MAX_DIR_SIZE(2097152 bytes) > It is possible that, due to corruption, directory size calculated in > fat_calc_dir_size() can be greater than FAT_MAX_DIR_SIZE, i.e. > can be in GBs, hence directory traversal can take long time.