Linux emulation on FreeBSD AMD64

Valery V.Chikalov valera at chikalov.dp.ua
Sun Oct 28 10:49:13 PDT 2007


Valery V.Chikalov wrote:
> Roman Divacky wrote:
>>>
>>> and got something like:
>>>
>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0
>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0
>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0
>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0
>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0
>>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13
>>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13
>>>
>>> where 13 is EACCES.
>>
>> can you show what are the "prot" and "len" arguments?
>>  
> 
> Sure:
> 
> Oct 28 19:47:57 tiger kernel: mprotect addr:2a78b000, len:38376, prot:0, 
> return 0
> Oct 28 19:47:57 tiger kernel: mprotect addr:2a27d000, len:3682304, 
> prot:3, return 0
> Oct 28 19:47:57 tiger kernel: mprotect addr:2a27d000, len:3682304, 
> prot:5, return 0
> Oct 28 19:47:58 tiger kernel: pid 1878 (sqlplus), uid 1002: exited on 
> signal 11 (core dumped)
> Oct 28 19:47:58 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, 
> return 13
> Oct 28 19:47:58 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, 
> return 13
>

and again:

Oct 28 20:35:03 tiger kernel: mprotect addr:2a657000, len:29304, prot:0, 
bsdprot: 0, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a78b000, len:38376, prot:0, 
bsdprot: 0, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a27d000, len:3682304, 
prot:3, bsdprot: 7, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a27d000, len:3682304, 
prot:5, bsdprot: 5, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, 
bsdprot: 5, return 13
Oct 28 20:35:03 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, 
bsdprot: 5, return 13
Oct 28 20:35:03 tiger kernel: mprotect addr:2a7c1000, len:4720, prot:0, 
bsdprot: 0, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, 
bsdprot: 5, return 13
Oct 28 20:35:03 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, 
bsdprot: 5, return 13
Oct 28 20:35:03 tiger kernel: mprotect addr:2a279000, len:3400, prot:0, 
bsdprot: 0, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a27c000, len:980, prot:0, 
bsdprot: 0, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a600000, len:131672, 
prot:0, bsdprot: 0, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a623000, len:4340, prot:0, 
bsdprot: 0, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a647000, len:3892, prot:0, 
bsdprot: 0, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a657000, len:29304, prot:0, 
bsdprot: 0, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a78b000, len:38376, prot:0, 
bsdprot: 0, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a27d000, len:3682304, 
prot:3, bsdprot: 7, return 0
Oct 28 20:35:03 tiger kernel: mprotect addr:2a27d000, len:3682304, 
prot:5, bsdprot: 5, return 0
Oct 28 20:35:03 tiger kernel: pid 2102 (sqlplus), uid 1002: exited on 
signal 11 (core dumped)
Oct 28 20:35:04 tiger kernel: pid 2121 (oracle), uid 1002: exited on 
signal 11 (core dumped)

now I did:

+//  if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
+//      bsd_args.prot |= PROT_READ | PROT_EXEC;

and get:

Oct 28 20:41:14 tiger kernel: mprotect addr:2a27c000, len:980, prot:0, 
bsdprot: 0, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:2a600000, len:131672, 
prot:0, bsdprot: 0, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:2a623000, len:4340, prot:0, 
bsdprot: 0, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:2a647000, len:3892, prot:0, 
bsdprot: 0, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:2a657000, len:29304, prot:0, 
bsdprot: 0, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:2a78b000, len:38376, prot:0, 
bsdprot: 0, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:2a27d000, len:3682304, 
prot:3, bsdprot: 3, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:2a27d000, len:3682304, 
prot:5, bsdprot: 5, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, 
bsdprot: 1, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, 
bsdprot: 1, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:2a7c1000, len:4720, prot:0, 
bsdprot: 0, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, 
bsdprot: 1, return 0
Oct 28 20:41:14 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, 
bsdprot: 1, return 0
Oct 28 20:41:14 tiger kernel: pid 2192 (sqlplus), uid 1002: exited on 
signal 11 (core dumped)
Oct 28 20:41:14 tiger kernel: pid 2176 (sqlplus), uid 1002: exited on 
signal 11 (core dumped)
Oct 28 20:41:14 tiger kernel: pid 2158 (bash), uid 1002: exited on 
signal 11 (core dumped)

So, if prot argument leaves unchanged mprotect don't failing.
But the result don't became better.

Thank you.
Valery.



More information about the freebsd-emulation mailing list