[Webkit-unassigned] [Bug 174281] Lower the max_protection for the separated heap

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 7 15:54:45 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=174281

--- Comment #5 from Oliver Hunt <oliver at apple.com> ---
(In reply to Saam Barati from comment #3)
> Comment on attachment 314886 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=314886&action=review
> 
> > Source/JavaScriptCore/jit/ExecutableAllocator.cpp:224
> > +        result = vm_protect(mach_task_self(), (vm_address_t)stubBase, stubSize, true, VM_PROT_EXECUTE);
> >          RELEASE_ASSERT(!result);
> >  #endif
> >  
> >          // Prevent writing into the executable JIT mapping.
> > -        result = mprotect(jitBase, jitSize, VM_PROT_READ | VM_PROT_EXECUTE);
> > +        result = vm_protect(mach_task_self(), (vm_address_t)jitBase, jitSize, true, VM_PROT_READ | VM_PROT_EXECUTE);
> >          RELEASE_ASSERT(!result);
> >  
> >          // Prevent execution in the writable JIT mapping.
> > -        result = mprotect((void*)writableAddr, jitSize, VM_PROT_READ | VM_PROT_WRITE);
> > +        result = vm_protect(mach_task_self(), (vm_address_t)writableAddr, jitSize, true, VM_PROT_READ | VM_PROT_WRITE);
> 
> Style nit: Please use static_cast instead of C-style casts.

for void*? I think it might need to be reinterpret_cast<> because vmprotect is obnoxious and uses uint66 or some such nonsense

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170707/9930863a/attachment-0001.html>


More information about the webkit-unassigned mailing list