From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.parknet.co.jp ([210.171.160.6]:54844 "EHLO mail.parknet.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725898AbeICMUF (ORCPT ); Mon, 3 Sep 2018 08:20:05 -0400 From: OGAWA Hirofumi To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] fat: Relax checks for sector size and media type References: <20180902131932.11558-1-pali.rohar@gmail.com> <87bm9ft5h5.fsf@mail.parknet.co.jp> <20180903074005.7e3guj24ksq2l44c@pali> Date: Mon, 03 Sep 2018 17:01:03 +0900 In-Reply-To: <20180903074005.7e3guj24ksq2l44c@pali> ("Pali =?iso-8859-1?Q?Roh=E1r=22's?= message of "Mon, 3 Sep 2018 09:40:05 +0200") Message-ID: <874lf7t3gg.fsf@mail.parknet.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Pali Roh�r writes: >> Just relaxing validation doesn't work. The block layer doesn't support >> smaller than 512, and lager than PAGE_SIZE. (And in specification, fat >> doesn't support lager than 4096.) > > Hi! I just sent this patch for discussion, with links to (now open > source) Windows implementation. I guess that Windows driver > implementation is more "authoritative" then Microsoft's own > specification. It is known that Windows implementation does not match > Microsoft specification. > > I know at least 3 FAT specifications (MS EFI FAT, MS/SD card FAT, > ECMA-107) and you are right that Microsoft's one does not allow sector > sizes larger then 4096. > > If there is limitation by block layer, then: > > 1) Why we do not check for PAGE_SIZE? That source seems to check power_of_2(size) and 128 <= size <= 4096. Rather why do you want to support larger than 4096? Or I'm missing something? > 2) Is check in fat driver really needed (if block layer checks it)? Yes, isolating block layer error and fat format error to be better error report. -- OGAWA Hirofumi