From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fat: handle paths that include ../
Date: Thu, 10 Sep 2015 18:26:01 -0400 [thread overview]
Message-ID: <20150910222601.GP26226@bill-the-cat> (raw)
In-Reply-To: <55F1BC5B.1020200@wwwdotorg.org>
On Thu, Sep 10, 2015 at 10:22:35AM -0700, Stephen Warren wrote:
> On 07/28/2015 08:55 PM, Stephen Warren wrote:
> > The FAT code contains a special case to parse the root directory. This
> > is needed since the root directory location/layout on disk is special
> > cased for FAT12/16. In particular, the location and size of the FAT12/16
> > root directory is hard-coded and contiguous, whereas all FAT12/16 non-root
> > directories, and all FAT32 directories, are stored in a non-contiguous
> > fashion, with the layout represented by a linked-list of clusters in the
> > FAT.
> >
> > If a file path contains ../ (for example /extlinux/../bcm2835-rpi-cm.dtb),
> > it is possible to need to parse the root directory for the first element
> > in the path (requiring application of the special case), then a sub-
> > directory (in the general way), then re-parse the root directory (again
> > requiring the special case). However, the current code in U-Boot only
> > applies the special case for the very first path element, and never for
> > any later path element. When reparsing the root directory without
> > applying the special case, any file in a sector (or cluster?) other than
> > the first sector/cluster of the root directory will not be found.
> >
> > This change modifies the non-root-dir-parsing loop of do_fat_read_at()
> > to detect if it's walked back to the root directory, and if so, jumps
> > back to the special case code that handles parsing of the root directory.
>
> Is this change slated for v2015.10, or is the plan to leave this issue
> in place until the FAT implementation replacement is accepted for the
> release after that?
I believe I shall grab this. Did you see the email from Lukasz saying
the new FAT didn't pass the DFU test suite?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150910/6e2f7cc6/attachment.sig>
next prev parent reply other threads:[~2015-09-10 22:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 3:55 [U-Boot] [PATCH] fat: handle paths that include ../ Stephen Warren
2015-09-10 17:22 ` Stephen Warren
2015-09-10 22:26 ` Tom Rini [this message]
2015-09-11 17:01 ` Stephen Warren
2015-09-12 12:47 ` [U-Boot] " Tom Rini
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=20150910222601.GP26226@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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