From: Ulf Samuelsson <ulf@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] FIX: dataflash.c
Date: Sun, 19 Aug 2007 15:04:12 +0200 [thread overview]
Message-ID: <001e01c7e291$304c98d0$dcc4af0a@atmel.com> (raw)
In-Reply-To: 46C7BAF7.3080905@gandalf.sssup.it
> for (i = 0; i < CFG_MAX_DATAFLASH_BANKS; i++)
> if ( dataflash_info[i].id
> - && ((((int) addr) & 0xFF000000) ==
> + && ((((unsigned int) *addr) & 0xFF000000) ==
> dataflash_info[i].logical_address)) {
> addr_valid = 1;
> break;
>
> It fix an invalid use of a pointer and and invalid use of an array.
>
> regards michael
>
>
AFAIK, This patch is introducing a bug.
The intention of the code is to check if "addr" is within
0xC0000000..0xCFFFFFFF or
0xD0000000..0xDFFFFFFF.
Your patch will make the ARM core *read* from whereever 'addr' is pointing at.
'addr' is an address specified by the user!
You do not know *where* is it located, and if the ARM reads
from an arbitrary address, there is a big chance that it will trap...
Best Regards
Ulf Samuelsson
next prev parent reply other threads:[~2007-08-19 13:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070818231206.GA4040@gandalf.sssup.it>
2007-08-19 0:50 ` [U-Boot-Users] FIX: dataflash.c Wolfgang Denk
2007-08-19 3:24 ` Michael Trimarchi
2007-08-19 12:51 ` Ulf Samuelsson
2007-08-19 3:37 ` Michael Trimarchi
2007-08-19 13:04 ` Ulf Samuelsson [this message]
2007-08-19 19:27 ` Michael Trimarchi
2007-08-19 19:29 ` Michael Trimarchi
2007-08-19 21:37 ` Håvard Skinnemoen
2007-08-19 23:29 ` Wolfgang Denk
2007-08-19 23:56 ` trimarchi at gandalf.sssup.it
2007-08-20 5:26 ` Ulf Samuelsson
2007-08-29 0:00 ` Wolfgang Denk
2007-08-19 23:40 ` trimarchi at gandalf.sssup.it
2007-08-20 5:29 ` Ulf Samuelsson
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='001e01c7e291$304c98d0$dcc4af0a@atmel.com' \
--to=ulf@atmel.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