Re: vm_protect vs mprotect
Re: vm_protect vs mprotect
- Subject: Re: vm_protect vs mprotect
- From: Chris Ridd <email@hidden>
- Date: Thu, 26 Mar 2009 13:55:40 +0000
On 26 Mar 2009, at 11:33, Rohitash Panda wrote:
Hi,
I am seeing an issue because of vm_protect being called from
signal handlers,
where another system call was already in progress.It works fine
using mprotect.
The mach call vm_protect() calls vm_map_protect() directly , whearas
bsd syscall
mprotect calls mach_vm_protect() which eventually calls
vm_map_protect().
I guess vm_protect is avoiding some extra checks as compared to
mprotect().
Which the preferred interface ? Has anyone heard of any issues with
vm_protect ?
The sigaction(2) man page has lists of functions that are considered
safe for use in a signal handler. I don't see either vm_protect() or
mprotect() in those lists :-(
Cheers,
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden