Subject: Re: kern/18789: amap_lookups panic after uvm_map changes
To: enami tsugutomo <enami@but-b.or.jp>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-bugs
Date: 10/24/2002 12:07:21
>>Suppose following case:
>>
>>prev_entry wi/ amap | gap will be filled by new entry | next_entry w/o amap
>>
>> A B C
>>
>>The resulting entry covers A+B+C but amap only covers A+B, doesn't it?
>
>an excellent idea! let me try it out...
wonderful. this program:
#define BASE ((void*)0x80000000)
#define PAGE 4096
int
main(int argc, char *argv[])
{
int *a, *b, *c;
/* allocate the "first" page */
a = mmap(BASE + 0 * PAGE, PAGE, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
/* cause it to be backed by an amap */
a[0] = 1;
/* allocate the "last" page */
c = mmap(BASE + 2 * PAGE, PAGE, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
/* allocate the "middle" page, which gets bimerged */
b = mmap(BASE + 1 * PAGE, PAGE, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
/* die, you gravy sucking pig dog */
c[0] = 1;
}
will cause the same problem. patch forthcoming. thanks. :)
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
werdna@squooshy.com * "information is power -- share the wealth."