qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] Fix tests for start+len address valid for guest
@ 2010-04-05 17:30 Richard Henderson
  2010-03-29 17:54 ` [Qemu-devel] [PATCH 6/7] Fix zero-length write(2) Richard Henderson
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Richard Henderson @ 2010-04-05 17:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: blauwirbel

The first patch in the series fixes a major think-o in the sparc port.
The 64 and 32-bit constants were reversed.  Fixing these are required
to avoid a build error in later patches.

For the actual problem, introduce a guest_start_len_valid macro similar
to the existing h2g_valid macro, where we compare the address range
against TARGET_VIRT_ADDR_SPACE_BITS (or ULONG_MAX, depending on the host).

Use this in 3 places in the linux-user memory handling functions, and
also in the generic page_check_range.  In the later case, also remove
a mis-conception that I had that page_check_range was already bounds
checked -- these values come directly from a guest syscall and so can
contain any random errant values.


r~


Richard Henderson (7):
  target-sparc: Fix TARGET_{PHYS,VIRT}_ADDR_SPACE_BITS.
  Add guest_start_len_valid function.
  linux-user: Use guest_start_len_valid in msync.
  linux-user: Use guest_start_len_valid in mremap.
  linux-user: Use guest_start_len_valid in mmap.
  Fix zero-length write(2).
  Use guest_start_len_valid in page_check_range.

 cpu-all.h          |   10 ++++++++
 exec.c             |   12 +++------
 linux-user/mmap.c  |   65 +++++++++++++++++++++++++++------------------------
 target-sparc/cpu.h |   12 ++++----
 4 files changed, 54 insertions(+), 45 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-05-06  4:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-05 17:30 [Qemu-devel] [PATCH 0/7] Fix tests for start+len address valid for guest Richard Henderson
2010-03-29 17:54 ` [Qemu-devel] [PATCH 6/7] Fix zero-length write(2) Richard Henderson
2010-05-06  4:45   ` Aurelien Jarno
2010-03-30 18:11 ` [Qemu-devel] [PATCH 1/7] target-sparc: Fix TARGET_{PHYS, VIRT}_ADDR_SPACE_BITS Richard Henderson
2010-03-30 18:49 ` [Qemu-devel] [PATCH 3/7] linux-user: Use guest_start_len_valid in msync Richard Henderson
2010-03-30 18:52 ` [Qemu-devel] [PATCH 4/7] linux-user: Use guest_start_len_valid in mremap Richard Henderson
2010-03-30 18:53 ` [Qemu-devel] [PATCH 5/7] linux-user: Use guest_start_len_valid in mmap Richard Henderson
2010-03-30 19:32 ` [Qemu-devel] [PATCH 7/7] Use guest_start_len_valid in page_check_range Richard Henderson
2010-04-05 17:24 ` [Qemu-devel] [PATCH 2/7] Add guest_start_len_valid function Richard Henderson
2010-04-05 18:15   ` malc
2010-04-05 18:31     ` Richard Henderson
2010-04-05 18:41       ` malc

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).