From: Brian Norris <computersforpeace@gmail.com>
To: PaX Team <pageexec@freemail.hu>
Cc: linux-mtd@lists.infradead.org,
David Woodhouse <dwmw2@infradead.org>,
re.emese@gmail.com, spender@grsecurity.net
Subject: Re: question about potential integer truncation in default_erasesize
Date: Mon, 28 Sep 2015 19:02:20 -0700 [thread overview]
Message-ID: <20150929020220.GB31505@google.com> (raw)
In-Reply-To: <56069B10.450.51AFEC35@pageexec.freemail.hu>
On Sat, Sep 26, 2015 at 03:18:08PM +0200, PaX Team wrote:
> hi all,
>
> drivers/mtd/chips/map_rom.c:default_erasesize can truncate map_info.size
> from unsigned long to unsigned int on 64 bit archs and i'm wondering if
> this is intentional or should/could map_info.size be turned into an unsigned
> int field? FTR, this issue was detected with the upcoming version of the
> size overflow plugin we have in PaX/grsecurity and there're a handful of
> similar cases in the tree where potentially unwanted or unnecessary integer
> truncations occur, this being one of these. any opinion/help is welcome!
This is being assigned to the erasesize, which is 32-bit already, and
all of MTD expects a 32-bit erasesize, so it'd be a pretty big job to
"fix" the truncation. But really, we can't handle (and shouldn't;
there's really no need) >32-bit eraseblocks. That would be an
un-manageable flash geometry.
Regards,
Brian
next prev parent reply other threads:[~2015-09-29 2:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-26 13:18 question about potential integer truncation in default_erasesize PaX Team
2015-09-29 2:02 ` Brian Norris [this message]
2015-09-29 20:56 ` PaX Team
2015-09-29 21:02 ` Brian Norris
2015-09-29 21:37 ` PaX Team
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=20150929020220.GB31505@google.com \
--to=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=pageexec@freemail.hu \
--cc=re.emese@gmail.com \
--cc=spender@grsecurity.net \
/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.