All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] flatload: fix bss clearing
@ 2012-07-09 13:04 Mike Frysinger
  2012-07-09 13:11 ` Peter Maydell
  2012-07-09 13:21 ` Andreas Färber
  0 siblings, 2 replies; 4+ messages in thread
From: Mike Frysinger @ 2012-07-09 13:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio

The current bss clear logic assumes the target mmap address and host
address are the same.  Use g2h to translate from the target address
space to the host so we can call memset on it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 linux-user/flatload.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/linux-user/flatload.c b/linux-user/flatload.c
index be79496..58f679e 100644
--- a/linux-user/flatload.c
+++ b/linux-user/flatload.c
@@ -660,7 +660,7 @@ static int load_flat_file(struct linux_binprm * bprm,
     }
 
     /* zero the BSS.  */
-    memset((void *)((unsigned long)datapos + data_len), 0, bss_len);
+    memset(g2h(datapos + data_len), 0, bss_len);
 
     return 0;
 }
-- 
1.7.7.3

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

* Re: [Qemu-devel] [PATCH] flatload: fix bss clearing
  2012-07-09 13:04 [Qemu-devel] [PATCH] flatload: fix bss clearing Mike Frysinger
@ 2012-07-09 13:11 ` Peter Maydell
  2012-07-09 13:21 ` Andreas Färber
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2012-07-09 13:11 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: Riku Voipio, qemu-devel

On 9 July 2012 14:04, Mike Frysinger <vapier@gentoo.org> wrote:
> The current bss clear logic assumes the target mmap address and host
> address are the same.  Use g2h to translate from the target address
> space to the host so we can call memset on it.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

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

* Re: [Qemu-devel] [PATCH] flatload: fix bss clearing
  2012-07-09 13:04 [Qemu-devel] [PATCH] flatload: fix bss clearing Mike Frysinger
  2012-07-09 13:11 ` Peter Maydell
@ 2012-07-09 13:21 ` Andreas Färber
  2012-07-10  5:59   ` Mike Frysinger
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Färber @ 2012-07-09 13:21 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: Riku Voipio, qemu-devel

Hi Mike,

Am 09.07.2012 15:04, schrieb Mike Frysinger:
> The current bss clear logic assumes the target mmap address and host
> address are the same.  Use g2h to translate from the target address
> space to the host so we can call memset on it.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  linux-user/flatload.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Patch looks sensible. Are you working on rebasing your Blackfin target
to QOM and AREG0?

Cheers,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

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

* Re: [Qemu-devel] [PATCH] flatload: fix bss clearing
  2012-07-09 13:21 ` Andreas Färber
@ 2012-07-10  5:59   ` Mike Frysinger
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2012-07-10  5:59 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Riku Voipio, qemu-devel

[-- Attachment #1: Type: Text/Plain, Size: 586 bytes --]

On Monday 09 July 2012 09:21:52 Andreas Färber wrote:
> Am 09.07.2012 15:04, schrieb Mike Frysinger:
> > The current bss clear logic assumes the target mmap address and host
> > address are the same.  Use g2h to translate from the target address
> > space to the host so we can call memset on it.
> 
> Patch looks sensible. Are you working on rebasing your Blackfin target
> to QOM and AREG0?

i've rebased them to the latest release (1.1.0).  FDPIC seems to work fine, as 
does basic ELF, but FLAT gets into an infinite loop and i haven't figured out 
why just yet.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-07-10  6:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-09 13:04 [Qemu-devel] [PATCH] flatload: fix bss clearing Mike Frysinger
2012-07-09 13:11 ` Peter Maydell
2012-07-09 13:21 ` Andreas Färber
2012-07-10  5:59   ` Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.