From: "Byron Bradley" <byron.bbradley@gmail.com>
To: minyard@acm.org
Cc: "Linux Kernel" <linux-kernel@vger.kernel.org>,
hvr@gnu.org, rmk@arm.linux.org.uk, nico@cam.org,
linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [PATCH] ARM: Ignore memory tags with invalid data
Date: Sun, 10 Feb 2008 21:11:13 +0000 [thread overview]
Message-ID: <57e2b00802101311g45c2469dy3a719ab27a9d5960@mail.gmail.com> (raw)
In-Reply-To: <20080122040556.GA24515@minyard.local>
On Jan 22, 2008 4:05 AM, Corey Minyard <minyard@acm.org> wrote:
> From: Corey Minyard <minyard@acm.org>
>
> The DNS-323 system has several bogus memory entries in the tag table,
> and it caused the system to crash at startup. Ignore tag entries that
> are obviously bogus.
>
> Signed-off-by: Corey Minyard <minyard@acm.org>
> ---
> arch/arm/kernel/setup.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index bf56eb3..dfdb469 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -630,7 +630,12 @@ __tagtable(ATAG_CORE, parse_tag_core);
>
> static int __init parse_tag_mem32(const struct tag *tag)
> {
> - if (meminfo.nr_banks >= NR_BANKS) {
> + /*
> + * Make sure that the memory size is non-zero, page aligned,
> + * and that it doesn't overflow the meminfo table.
> + */
> + if (meminfo.nr_banks >= NR_BANKS || tag->u.mem.size & ~PAGE_MASK ||
> + tag->u.mem.size == 0 || tag->u.mem.start & ~PAGE_MASK) {
> printk(KERN_WARNING
> "Ignoring memory bank 0x%08x size %dKB\n",
> tag->u.mem.start, tag->u.mem.size / 1024);
>
[Cc: linux-arm-kernel]
What's the status of this patch? It would be good to see it go in
because the problem it fixes can be seen on a large number of NAS
devices.
Cheers,
--
Byron Bradley
prev parent reply other threads:[~2008-02-10 21:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-22 4:05 Corey Minyard
2008-01-22 9:18 ` Ben Dooks
2008-01-22 14:34 ` Corey Minyard
2008-01-22 19:53 ` Russell King
2008-02-10 21:11 ` Byron Bradley [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=57e2b00802101311g45c2469dy3a719ab27a9d5960@mail.gmail.com \
--to=byron.bbradley@gmail.com \
--cc=hvr@gnu.org \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
--cc=nico@cam.org \
--cc=rmk@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®