From: Al Viro <viro@zeniv.linux.org.uk>
To: "Caleb D.S. Brzezinski" <calebdsb@protonmail.com>
Cc: hirofumi@mail.parknet.co.jp, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/3] fat: add the msdos_format_name() filename cache
Date: Sun, 29 Aug 2021 21:23:29 +0000 [thread overview]
Message-ID: <YSv60c2/PM4zfl0u@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <87o89gw4yy.fsf@protonmail.com>
On Sun, Aug 29, 2021 at 05:11:56PM +0000, Caleb D.S. Brzezinski wrote:
> My understanding was that the maximum length of the name considered when
> passed to msdos_format_name() was eight characters; see:
>
> while (walk - res < 8)
>
> and
>
> for (walk = res; len && walk - res < 8; walk++) {
Err... You have noticed that the function does not end on that loop,
haven't you? Exercise: figure out what that function does. I.e.
what inputs are allowed and what outputs are produced. You might
find some description of FAT directory layout to be useful...
> > * your find_fname_in_cache() assumes that hash collisions
> > are impossible, which is... unlikely, considering the nature of
> > that hash function
>
> If the names are 8 character limited, then logically any name with the
> exact same set of characters would "collide" into the same formatted
> name.
Huh? Collision is when two *different* values of argument yield the
same result. What makes you assume that yours won't have any such
pairs shorter than 8 bytes?
next prev parent reply other threads:[~2021-08-29 21:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-29 14:25 [PATCH 0/3] fat: add a cache for msdos_format_name() Caleb D.S. Brzezinski
2021-08-29 14:25 ` [PATCH 1/3] fat: define functions and data structures for a formatted name cache Caleb D.S. Brzezinski
2021-08-29 21:05 ` kernel test robot
2021-08-29 21:05 ` kernel test robot
2021-08-29 21:05 ` [RFC PATCH] fat: msdos_ncache can be static kernel test robot
2021-08-29 21:05 ` kernel test robot
2021-08-29 14:25 ` [PATCH 2/3] fat: add the msdos_format_name() filename cache Caleb D.S. Brzezinski
2021-08-29 15:11 ` Al Viro
2021-08-29 15:26 ` Al Viro
2021-08-29 17:19 ` Caleb D.S. Brzezinski
2021-08-29 17:11 ` Caleb D.S. Brzezinski
2021-08-29 21:23 ` Al Viro [this message]
2021-08-29 14:25 ` [PATCH 3/3] fat: add hash machinery to relevant filesystem operations Caleb D.S. Brzezinski
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=YSv60c2/PM4zfl0u@zeniv-ca.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=calebdsb@protonmail.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.