summaryrefslogtreecommitdiffstats
path: root/libpixelflinger/codeflinger
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-10-15 06:08:04 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-10-15 06:08:04 -0700
commit287a9585dc85bff9b81e962f6be4f2b36512d345 (patch)
tree15cbc91f5d5a7213f2e7be4c75dde6917fc3d2d3 /libpixelflinger/codeflinger
parent7e65ede62065925e29b5b18f253758bb280f9383 (diff)
parent8e0e372a388434a0553810e2b958e59a26a6bd96 (diff)
downloadsystem_core-287a9585dc85bff9b81e962f6be4f2b36512d345.zip
system_core-287a9585dc85bff9b81e962f6be4f2b36512d345.tar.gz
system_core-287a9585dc85bff9b81e962f6be4f2b36512d345.tar.bz2
am 8e0e372a: Set PROT_EXEC on the whole pixelflinger code cache.
Merge commit '8e0e372a388434a0553810e2b958e59a26a6bd96' into gingerbread-plus-aosp * commit '8e0e372a388434a0553810e2b958e59a26a6bd96': Set PROT_EXEC on the whole pixelflinger code cache.
Diffstat (limited to 'libpixelflinger/codeflinger')
-rw-r--r--libpixelflinger/codeflinger/CodeCache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpixelflinger/codeflinger/CodeCache.cpp b/libpixelflinger/codeflinger/CodeCache.cpp
index 5877ff4..125c3ce 100644
--- a/libpixelflinger/codeflinger/CodeCache.cpp
+++ b/libpixelflinger/codeflinger/CodeCache.cpp
@@ -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);