Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1471191imm; Mon, 3 Sep 2018 01:02:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYORFDNVJhaQSmudHPP28NQwSUgu3qNgfrMNYztk2QzHCbaMnIrME8aDq10l2xPUz6vyF8z X-Received: by 2002:a63:1d22:: with SMTP id d34-v6mr25629084pgd.133.1535961746436; Mon, 03 Sep 2018 01:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535961746; cv=none; d=google.com; s=arc-20160816; b=cjylhCoWrrORLVLdwgz87kxfElAqtih1PnrLuKoF18vAdMVTbHgxnwVO0Wh+savVWE AJL08Bdz+iAQKFO8dYGY8SizleN3NpfOt5sswliZLZo5zdnfwnLw6XUVQjWHwHMn6d1a vW1j6thNbbhtXP/+gkQSYOT2u+6ssY7UG7jjettYIOXIMhgBPeW9xACTM/Tx/Vxm/3yH MStYTfuie0ozskMchG+RnkkUkLuZcPVxQNF70fFam8VPQ1WHY1S2U1vt1CVonnGvXJ7c rLhSZRYzpjs2GIRanp4pHA4Nm4C3qmigiz/X/fxN8ORzgu8U90AWh4cP+KTxwCv5L4Wq 2Vig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:arc-authentication-results; bh=VN6GVB5BcXKTJ3qWSCgMmk8u6QbVHbEZ6KfUAMoFvqw=; b=oPVMzV1ZQWBYT8/fwpl5LpC0IyN/RExB8hgEOb/pgSK2NIrygMSuHz4nQ4I5OhHSV0 x+HPn3WWcAmd6i30PJ7aXj9wXqqkLojz4cRNw7n/8eJNw3U2sEUI4Gn+lX7BVpBJKLQc 3qaYw5kirK2/eLqKzr3oMTdiTeS9gCdvVOfwP7Qi9fJrwxG160tisJqWUl458XEImV5p /h3vPRx0+peNOoDly2OT7stb5GexQW8uOJlbqwv7Pw2S4tJn1BH7SiDPvpkYtJYIHltR 9X3vHXBgrcnPksl3ZK7MrwK1aS9qBO3wWIQq/VLMFSG1EmAvFBPWHTHloR2aXy4y+s/9 Wa+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8-v6si17916731plp.61.2018.09.03.01.02.11; Mon, 03 Sep 2018 01:02:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726051AbeICMUF (ORCPT + 99 others); Mon, 3 Sep 2018 08:20:05 -0400 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 Received: from ibmpc.myhome.or.jp (server.parknet.ne.jp [210.171.168.39]) by mail.parknet.co.jp (Postfix) with ESMTPSA id 813DF15AF4B; Mon, 3 Sep 2018 17:01:05 +0900 (JST) Received: from devron.myhome.or.jp (foobar@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.15.2/8.15.2/Debian-11) with ESMTPS id w83814mw019015 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 3 Sep 2018 17:01:05 +0900 Received: from devron.myhome.or.jp (foobar@localhost [127.0.0.1]) by devron.myhome.or.jp (8.15.2/8.15.2/Debian-11) with ESMTPS id w83814OP001866 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 3 Sep 2018 17:01:04 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.15.2/8.15.2/Submit) id w83813Ev001865; Mon, 3 Sep 2018 17:01:03 +0900 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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