Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Oct 2007 20:49:00 +0200
From:      "Valery V.Chikalov" <valera@chikalov.dp.ua>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Linux emulation on FreeBSD AMD64
Message-ID:  <4724D99C.3080105@chikalov.dp.ua>
In-Reply-To: <4724CBCA.30500@chikalov.dp.ua>
References:  <4721AB07.20708@novakom.com.ua> <fg05l9$n32$2@ger.gmane.org>	<4723A8D6.6020002@chikalov.dp.ua>	<20071028112910.GA84830@freebsd.org> <4724CBCA.30500@chikalov.dp.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4724D99C.3080105>