linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sungjong Seo" <sj1557.seo@samsung.com>
To: <Yuezhang.Mo@sony.com>, "'Namjae Jeon'" <linkinjeon@kernel.org>
Cc: linux-fsdevel@vger.kernel.org,
	"'Wang Yugui'" <wangyugui@e16-tech.com>,
	"'Barócsi Dénes'" <admin@tveger.hu>,
	sj1557.seo@samsung.com, cpgs@samsung.com
Subject: RE: [PATCH v2] exfat: handle unreconized benign secondary entries
Date: Fri, 13 Jan 2023 16:06:23 +0900	[thread overview]
Message-ID: <626742236.41673593803778.JavaMail.epsvc@epcpadp3> (raw)
In-Reply-To: <PUZPR04MB63167FAB29A81DB38D43DD5A81C29@PUZPR04MB6316.apcprd04.prod.outlook.com>

> > >
> > >> +		if (exfat_get_entry_type(ep) & TYPE_BENIGN_SEC)
> > >> +			exfat_free_benign_secondary_clusters(inode, ep);
> > >> +
> > >
> > > Only vendor allocation entry(0xE1) have associated cluster
> > > allocations, vendor extension entry(0xE0) do not have associated
> > > cluster
> > allocations.
> > This is to free associated cluster allocation of the unrecognized
> > benign secondary entries, not only vendor alloc entry. Could you
> > elaborate more if there is any issue ?
> 
> From exFAT spec, there are 2 types benign secondary entries only, Vendor
> Extension entry and Vendor Allocation entry.
> 
> For different Vendor, Different Vendors are distinguished by different
> VendorGuid.
> 
> For a better understanding, please refer to https://dokumen.pub/sd-
> specifications-part-2-file-system-specification-version-300.html. This is
> the specification that the SD Card Association defines Vendor Extension
> entries and Vendor Allocation entries for SD card. "Figure 5-3 :
> Continuous Information Management" is an example of an entry set
> containing a Vendor Extension entry and a Vendor Allocation entry. In the
> example, we can see vendor extension entry(0xE0) do not have associated
> cluster allocations.

From "8.2 in the exFAT spec" as below, it is needed to handle all
unrecognized benign secondary entries that include NOT specified
in Revision 1.00.

8.2 Implications of Unrecognized Directory Entries
Future exFAT specifications of the same major revision number, 1,
and minor revision number higher than 0, may define new benign primary,
critical secondary, and benign secondary directory entries. Only exFAT
specifications of a higher major revision number may define new critical
primary directory entries. Implementations of this specification, exFAT
Revision 1.00 File System Basic Specification, should be able to mount
and access any exFAT volume of major revision number 1 and any minor
revision number. This presents scenarios in which an implementation
may encounter directory entries which it does not recognize.
The following describe implications of these scenarios:
...
  4. Implementations shall not modify unrecognized benign secondary
  directory entries or their associated cluster allocations.
  Implementations should ignore unrecognized benign secondary directory
  entries. When deleting a directory entry set, implementations shall
  free all cluster allocations, if any, associated with unrecognized
  benign secondary directory entries.



  reply	other threads:[~2023-01-13  7:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 14:05 [PATCH v2] exfat: handle unreconized benign secondary entries Namjae Jeon
2023-01-13  2:36 ` Yuezhang.Mo
2023-01-13  4:35   ` Namjae Jeon
2023-01-13  6:11     ` Yuezhang.Mo
2023-01-13  7:06       ` Sungjong Seo [this message]
2023-01-13  8:35         ` Yuezhang.Mo
2023-01-13  9:39           ` Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=626742236.41673593803778.JavaMail.epsvc@epcpadp3 \
    --to=sj1557.seo@samsung.com \
    --cc=Yuezhang.Mo@sony.com \
    --cc=admin@tveger.hu \
    --cc=cpgs@samsung.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=wangyugui@e16-tech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).