On 11 May 2012 09:40, Alexander Graf wrote:
> If we execute linux-user code that does the following:
>
> * A = mmap()
> * execute code in A
> * munmap(A)
> * B = mmap(), but mmap returns the same address as A
> * execute code in B
>
> we end up executing a stale cached tb that contains transl
On 11.05.2012, at 17:46, Peter Maydell wrote:
> On 7 May 2012 12:38, Alexander Graf wrote:
>>
>> On 07.05.2012, at 13:32, Alexander Graf wrote:
>>
>>>
>>> On 07.05.2012, at 12:37, Peter Maydell wrote:
>>>
On 7 May 2012 10:30, Alexander Graf wrote:
> @@ -587,6 +587,7 @@ abi_long tar
If we execute linux-user code that does the following:
* A = mmap()
* execute code in A
* munmap(A)
* B = mmap(), but mmap returns the same address as A
* execute code in B
we end up executing a stale cached tb that contains translated code
from A, while we want new code from B.
This p
On 7 May 2012 12:38, Alexander Graf wrote:
>
> On 07.05.2012, at 13:32, Alexander Graf wrote:
>
>>
>> On 07.05.2012, at 12:37, Peter Maydell wrote:
>>
>>> On 7 May 2012 10:30, Alexander Graf wrote:
@@ -587,6 +587,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len,
int prot,
On 7 May 2012 12:38, Alexander Graf wrote:
> And the below patch on top of my revised patch fixes it.
> The question is whether we still need to flush on mmap() then?
IIRC the kernel will let you MAP_FIXED mmap a file to an
address that's already mmap'd for something else without
having to munmap
On 07.05.2012, at 13:32, Alexander Graf wrote:
>
> On 07.05.2012, at 12:37, Peter Maydell wrote:
>
>> On 7 May 2012 10:30, Alexander Graf wrote:
>>> @@ -587,6 +587,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len,
>>> int prot,
>>>page_dump(stdout);
>>>printf("\n");
>>> #endif
On 07.05.2012, at 12:37, Peter Maydell wrote:
> On 7 May 2012 10:30, Alexander Graf wrote:
>> @@ -587,6 +587,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int
>> prot,
>> page_dump(stdout);
>> printf("\n");
>> #endif
>> +tb_invalidate_phys_page_range(start, start + len,
On 07.05.2012, at 12:37, Peter Maydell wrote:
> On 7 May 2012 10:30, Alexander Graf wrote:
>> @@ -587,6 +587,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int
>> prot,
>> page_dump(stdout);
>> printf("\n");
>> #endif
>> +tb_invalidate_phys_page_range(start, start + len,
On 07.05.2012, at 12:37, Peter Maydell wrote:
> On 7 May 2012 10:30, Alexander Graf wrote:
>> @@ -587,6 +587,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int
>> prot,
>> page_dump(stdout);
>> printf("\n");
>> #endif
>> +tb_invalidate_phys_page_range(start, start + len,
On 7 May 2012 10:30, Alexander Graf wrote:
> @@ -587,6 +587,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int
> prot,
> page_dump(stdout);
> printf("\n");
> #endif
> + tb_invalidate_phys_page_range(start, start + len, 0);
> mmap_unlock();
> return start;
The comme
If we execute linux-user code that does the following:
* A = mmap()
* execute code in A
* munmap(A)
* B = mmap(), but mmap returns the same address as A
* execute code in B
we end up executing a stale cached tb that contains translated code
from A, while we want new code from B.
This p
11 matches
Mail list logo