From: Stefan Bruens <stefan.bruens@rwth-aachen.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 5/5] ext4: optimize direntlen loops
Date: Sun, 28 Aug 2016 22:55:44 +0200 [thread overview]
Message-ID: <1545282.mnnLJHC7px@pebbles.site> (raw)
In-Reply-To: <1471940862-6663-6-git-send-email-michael@walle.cc>
On Dienstag, 23. August 2016 10:27:42 CEST Michael Walle wrote:
> direntlen is always >= 8. Therefore, the loop condition is always true.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> Suggested-by: Stefan Br?ns <stefan.bruens@rwth-aachen.de>
Thinking again about it, direntlen is read from disk, and as any outside data
should be untrusted. In case the direntlen is 0, we get an infinite loop here.
Also see commit 54d68e9333ff65d135faac68fa01be4276f1371f :
fs: ext4: Prevent infinite loop in ext4fs_iterate_dir
So better drop this patch.
Kind regards,
Stefan
--
Stefan Br?ns / Bergstra?e 21 / 52062 Aachen
home: +49 241 53809034 mobile: +49 151 50412019
work: +49 2405 49936-424
prev parent reply other threads:[~2016-08-28 20:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 8:27 [U-Boot] [PATCH v2 0/5] ext4: endianess fixes Michael Walle
2016-08-23 8:27 ` [U-Boot] [PATCH v2 1/5] ext4: change structure fields to __le/__be types Michael Walle
2016-08-23 8:27 ` [U-Boot] [PATCH v2 2/5] ext4: use kernel names for byte swaps Michael Walle
2016-08-23 8:27 ` [U-Boot] [PATCH v2 3/5] ext4: fix endianess problems in ext4 write support Michael Walle
2016-08-23 8:27 ` [U-Boot] [PATCH v2 4/5] ext4: fix wrong usage of le32_to_cpu() Michael Walle
2016-08-23 8:27 ` [U-Boot] [PATCH v2 5/5] ext4: optimize direntlen loops Michael Walle
2016-08-28 20:55 ` Stefan Bruens [this message]
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=1545282.mnnLJHC7px@pebbles.site \
--to=stefan.bruens@rwth-aachen.de \
--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