Re: [PATCH] generic/453: Exclude filenames that are not supported by exfat

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]




On 26/04/21 6:04 am, Matthew Wilcox wrote:
On Mon, Apr 26, 2021 at 04:01:05AM +0530, Shreeya Patel wrote:
exFAT filesystem does not support the following character codes
0x0000 - 0x001F ( Control Codes ), /, ?, :, ", \, *, <, |, >
ummm ...

-# Fake slash?
-setf "urk\xc0\xafmoo" "FAKESLASH"
That doesn't use any of the explained banned characters.  It uses 0xc0,
0xaf.

Now, in utf-8, that's an nonconforming sequence.  "The Unicode and UCS
standards require that producers of UTF-8 shall use the shortest form
possible, for example, producing a two-byte sequence with first byte 0xc0
is nonconforming.  Unicode 3.1 has added the requirement that conforming
programs must not accept non-shortest forms in their input."

So is it that exfat is rejecting nonconforming sequences?  Or is it
converting the nonconforming sequence from 0xc0 0xaf to the conforming
sequence 0x2f, and then rejecting it (because it's '/')?


No, I don't think exfat is not converting nonconforming sequence from 0xc0 0xaf
to the conforming sequence 0x2f.
Because I get different outputs when tried with both ways.
When I create a file with "urk\xc0\xafmoo", I get output as "Operation not permitted" and when I create it as "urk\x2fmoo", it gives "No such file or directory error" or
you can consider this error as "Invalid argument"
( because that's what I get when I try for other characters like |, :, ?, etc )

Box filename also fails with "Invalid argument" error.





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux