> On 10. Jun 2020, at 20:30, Damjan Jovanovic wrote:
>
> MAP_FIXED is generally bad news, as it overwrites any prior mappings within
> the range of addresses being mapped to.
>
> They should use MAP_FIXED | MAP_EXCL instead, which will fail if any mappings
> already exist in the range, and the
> On 10. Jun 2020, at 18:59, Mark Johnston wrote:
>
> On Wed, Jun 10, 2020 at 06:41:50PM +0200, Michael Tuexen wrote:
>> Dear all,
>>
>> consider the following program test.c:
>>
>> #include
>> #include
>>
>> int
>> main(void)
>> {
>> void *p;
>>
>> p = mmap((void *)0x200
MAP_FIXED is generally bad news, as it overwrites any prior mappings within
the range of addresses being mapped to.
They should use MAP_FIXED | MAP_EXCL instead, which will fail if any
mappings already exist in the range, and then maybe retry with another
range if it fails. Linux and NetBSD have M
> On 10. Jun 2020, at 18:59, Mark Johnston wrote:
>
> On Wed, Jun 10, 2020 at 06:41:50PM +0200, Michael Tuexen wrote:
>> Dear all,
>>
>> consider the following program test.c:
>>
>> #include
>> #include
>>
>> int
>> main(void)
>> {
>> void *p;
>>
>> p = mmap((void *)0x20
On Wed, Jun 10, 2020 at 06:41:50PM +0200, Michael Tuexen wrote:
> Dear all,
>
> consider the following program test.c:
>
> #include
> #include
>
> int
> main(void)
> {
> void *p;
>
> p = mmap((void *)0x2000, 0x100, PROT_READ | PROT_WRITE |
> PROT_EXEC, MAP_ANON | M
Dear all,
consider the following program test.c:
#include
#include
int
main(void)
{
void *p;
p = mmap((void *)0x2000, 0x100, PROT_READ | PROT_WRITE |
PROT_EXEC, MAP_ANON | MAP_PRIVATE | MAP_FIXED, -1, 0);
printf("p= %p\n", p);
return (0);
}
O