| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 1 #include "debug.h" | 5 #include "debug.h" |
| 2 #include "sandbox_impl.h" | 6 #include "sandbox_impl.h" |
| 3 | 7 |
| 4 namespace playground { | 8 namespace playground { |
| 5 | 9 |
| 6 int Sandbox::sandbox_mprotect(const void *addr, size_t len, int prot) { | 10 int Sandbox::sandbox_mprotect(const void *addr, size_t len, int prot) { |
| 7 Debug::syscall(__NR_mprotect, "Executing handler"); | 11 Debug::syscall(__NR_mprotect, "Executing handler"); |
| 8 struct { | 12 struct { |
| 9 int sysnum; | 13 int sysnum; |
| 10 long long cookie; | 14 long long cookie; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 62 |
| 59 // Changing permissions on memory regions that were newly mapped inside of | 63 // Changing permissions on memory regions that were newly mapped inside of |
| 60 // the sandbox is OK. | 64 // the sandbox is OK. |
| 61 SecureMem::sendSystemCall(threadFdPub, false, -1, mem, __NR_mprotect, | 65 SecureMem::sendSystemCall(threadFdPub, false, -1, mem, __NR_mprotect, |
| 62 mprotect_req.addr, mprotect_req.len, | 66 mprotect_req.addr, mprotect_req.len, |
| 63 mprotect_req.prot); | 67 mprotect_req.prot); |
| 64 return true; | 68 return true; |
| 65 } | 69 } |
| 66 | 70 |
| 67 } // namespace | 71 } // namespace |
| OLD | NEW |