Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 287a9585 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am 8e0e372a: Set PROT_EXEC on the whole pixelflinger code cache.

Merge commit '8e0e372a' into gingerbread-plus-aosp

* commit '8e0e372a':
  Set PROT_EXEC on the whole pixelflinger code cache.
parents 7e65ede6 8e0e372a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ void Assembly::ensureMbaseExecutable()
    long pagemask = ~(pagesize - 1);  // assumes pagesize is a power of 2

    uint32_t* pageStart = (uint32_t*) (((uintptr_t) mBase) & pagemask);
    size_t adjustedLength = mBase - pageStart + mSize;
    size_t adjustedLength = (mBase - pageStart) * sizeof(uint32_t) + mSize;

    if (mBase && mprotect(pageStart, adjustedLength, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) {
        mspace_free(getMspace(), mBase);