qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] linux-user issues
@ 2010-03-13  0:21 malc
  2010-03-13  0:45 ` [Qemu-devel] " Paul Brook
  0 siblings, 1 reply; 6+ messages in thread
From: malc @ 2010-03-13  0:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paul Brook, Aurelien Jarno


a) elfload.c:859

   #define TARGET_ELF_PAGESTART(_v) ((_v) & ~(unsigned long)(TARGET_ELF_EXEC_PAGESIZE-1))

   This means that for 64bit guest on a 32bit host the _v's value is
   silently reduced to 32bit, the cast should be abi_ulong.

b) mmap.c:428

   real_start = start & qemu_host_page_mask;

   Same thing basically qemu_host_page_mask is unsigned long and so
   the upper bits are sliently cleared. Again qemu_host_page_mask
   should probably be abi_ulong.

The above two make elf binary with one of the segments above 4G load
and run on 32bit guest only to fail well into execution and without
any indication that it shouldn't have been allowed to run in the first
place.

-- 
mailto:av1474@comtv.ru

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

end of thread, other threads:[~2010-03-14 23:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-13  0:21 [Qemu-devel] linux-user issues malc
2010-03-13  0:45 ` [Qemu-devel] " Paul Brook
2010-03-13  2:06   ` malc
2010-03-14 15:11     ` Paul Brook
2010-03-14 15:36       ` malc
2010-03-14 23:37         ` 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).