[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Fix page protection flag handling solving ARM emula
From: |
Richard Purdie |
Subject: |
[Qemu-devel] [PATCH] Fix page protection flag handling solving ARM emulation issues |
Date: |
Wed, 23 Apr 2008 14:48:36 +0100 |
Hi,
I've been seeing some strange errors when trying to mix binaries from
two different ARM toolchains. They work on real hardware but they don't
work under qemu failing with an error about being unable to change the
stack area protection bits. I tracked this down to an mprotect call
failing inside the dynamic linker.
The reason is that ARM has some strange page protection bits (from
mman.h):
#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
growsdown vma (mprotect only). */
#define PROT_GROWSUP 0x02000000 /* Extend change to start of
growsup vma (mprotect only). */
and if qemu sees these as page protection flags it gets rather upset.
A fix is to:
a) not error if these bits are present
b) not pass them to the host system since that doesn't like them
I've attached a simple patch which fixes the ARM on x86 case. This
shouldn't break anything existing although some tweaking of the bits may
be needed for some mixtures of other architectures.
Regards,
Richard
fix_protection_bits.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] Fix page protection flag handling solving ARM emulation issues,
Richard Purdie <=