Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Issue 239763005: Add workaround for mmap() with PROT_EXEC on Chrome OS. (Closed)

Created:
6 years, 8 months ago by mazda
Modified:
6 years, 8 months ago
CC:
chromium-reviews, hamaji
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add workaround for mmap() with PROT_EXEC on Chrome OS. mmap()'ing a file from Chrome's cache with PROT_EXEC fails on Chrome OS because Chrome OS mounts the filesystem with noexec. This CL adds to Non-SFI NaCl IRT a workaround where calling mmap without PROT_EXEC and changing the permission later with mprotect. This is the same trick done for SFI NaCl in the following CL. https://src.chromium.org/viewvc/native_client?revision=11199&view=revision TEST=App on ChromeOS works without mmap failure. BUG=359094 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=264662

Patch Set 1 #

Total comments: 8

Patch Set 2 : address comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -2 lines) Patch
M components/nacl/loader/nonsfi/irt_memory.cc View 1 2 chunks +13 lines, -2 lines 2 comments Download

Messages

Total messages: 15 (0 generated)
mazda
Mark, Julien, Hidehiko, Could you review this CL? Thanks,
6 years, 8 months ago (2014-04-15 23:13:38 UTC) #1
Mark Seaborn
LGTM https://codereview.chromium.org/239763005/diff/1/components/nacl/loader/nonsfi/irt_memory.cc File components/nacl/loader/nonsfi/irt_memory.cc (right): https://codereview.chromium.org/239763005/diff/1/components/nacl/loader/nonsfi/irt_memory.cc#newcode51 components/nacl/loader/nonsfi/irt_memory.cc:51: // On Chrome OS, mmap will fail if ...
6 years, 8 months ago (2014-04-15 23:28:03 UTC) #2
mazda
Thank you for the prompt review. https://codereview.chromium.org/239763005/diff/1/components/nacl/loader/nonsfi/irt_memory.cc File components/nacl/loader/nonsfi/irt_memory.cc (right): https://codereview.chromium.org/239763005/diff/1/components/nacl/loader/nonsfi/irt_memory.cc#newcode51 components/nacl/loader/nonsfi/irt_memory.cc:51: // On Chrome ...
6 years, 8 months ago (2014-04-16 00:33:36 UTC) #3
hidehiko
LGTM, but please wait for jln@'s review, too.
6 years, 8 months ago (2014-04-16 01:28:14 UTC) #4
mazda
Julien, Could you review this CL in terms of security? Thanks,
6 years, 8 months ago (2014-04-16 22:55:10 UTC) #5
jln (very slow on Chromium)
Could we make sure that PROT_EXEC and PROT_WRITE are mutually exclusive? I don't remember precisely ...
6 years, 8 months ago (2014-04-16 23:28:00 UTC) #6
jln (very slow on Chromium)
https://chromiumcodereview.appspot.com/239763005/diff/20001/components/nacl/loader/nonsfi/irt_memory.cc File components/nacl/loader/nonsfi/irt_memory.cc (right): https://chromiumcodereview.appspot.com/239763005/diff/20001/components/nacl/loader/nonsfi/irt_memory.cc#newcode29 components/nacl/loader/nonsfi/irt_memory.cc:29: return prot; Could we make sure here that PROT_WRITE ...
6 years, 8 months ago (2014-04-16 23:28:08 UTC) #7
mazda
https://codereview.chromium.org/239763005/diff/20001/components/nacl/loader/nonsfi/irt_memory.cc File components/nacl/loader/nonsfi/irt_memory.cc (right): https://codereview.chromium.org/239763005/diff/20001/components/nacl/loader/nonsfi/irt_memory.cc#newcode29 components/nacl/loader/nonsfi/irt_memory.cc:29: return prot; On 2014/04/16 23:28:08, jln wrote: > Could ...
6 years, 8 months ago (2014-04-17 04:23:07 UTC) #8
jln (very slow on Chromium)
On 2014/04/17 04:23:07, mazda wrote: > https://codereview.chromium.org/239763005/diff/20001/components/nacl/loader/nonsfi/irt_memory.cc > File components/nacl/loader/nonsfi/irt_memory.cc (right): > > https://codereview.chromium.org/239763005/diff/20001/components/nacl/loader/nonsfi/irt_memory.cc#newcode29 > ...
6 years, 8 months ago (2014-04-17 04:36:47 UTC) #9
Mark Seaborn
On 16 April 2014 16:28, <jln@chromium.org> wrote: > > https://chromiumcodereview.appspot.com/239763005/diff/ > 20001/components/nacl/loader/nonsfi/irt_memory.cc > File components/nacl/loader/nonsfi/irt_memory.cc ...
6 years, 8 months ago (2014-04-17 16:10:16 UTC) #10
jln (very slow on Chromium)
> Could we leave that to a separate change, please? Fixing PROT_EXEC to work > ...
6 years, 8 months ago (2014-04-17 17:07:43 UTC) #11
mazda
On 2014/04/17 17:07:43, jln wrote: > > Could we leave that to a separate change, ...
6 years, 8 months ago (2014-04-17 17:17:45 UTC) #12
mazda
The CQ bit was checked by mazda@chromium.org
6 years, 8 months ago (2014-04-17 17:18:02 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mazda@chromium.org/239763005/20001
6 years, 8 months ago (2014-04-17 17:22:04 UTC) #14
commit-bot: I haz the power
6 years, 8 months ago (2014-04-17 22:51:12 UTC) #15
Message was sent while issue was closed.
Change committed as 264662

Powered by Google App Engine
This is Rietveld 408576698