qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ben Leslie <benno@benno.id.au>
To: qemu-devel Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] Abort on attempts to load out-of-range ROMs
Date: Mon, 16 May 2011 21:33:02 +1000	[thread overview]
Message-ID: <BANLkTinCPRZBwVGRN2CZzZTPL5nnbBP81Q@mail.gmail.com> (raw)

Abort on attempts to load out-of-range ROMs

Change ROM loading behaviour so that attempts to load ROMs that fall outside
valid memory ranges causing an abort with a useful error message, rather
than silently ignoring the problem.

Signed-off-by: Ben Leslie <benno@benno.id.au>
---
 exec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/exec.c b/exec.c
index a718d74..af1b6a2 100644
--- a/exec.c
+++ b/exec.c
@@ -3838,7 +3838,7 @@ void
cpu_physical_memory_write_rom(target_phys_addr_t addr,
         if ((pd & ~TARGET_PAGE_MASK) != IO_MEM_RAM &&
             (pd & ~TARGET_PAGE_MASK) != IO_MEM_ROM &&
             !(pd & IO_MEM_ROMD)) {
-            /* do nothing */
+           cpu_abort(first_cpu, "Attempting to load malformed ROM at
address: 0x%x\n", addr);
         } else {
             unsigned long addr1;
             addr1 = (pd & TARGET_PAGE_MASK) + (addr & ~TARGET_PAGE_MASK);

                 reply	other threads:[~2011-05-16 11:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=BANLkTinCPRZBwVGRN2CZzZTPL5nnbBP81Q@mail.gmail.com \
    --to=benno@benno.id.au \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).