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

Issue 8800025: Adaptively use temp dir instead of /dev/shm for executable shmem file on Linux (Closed)

Created:
9 years ago by Roland McGrath
Modified:
9 years ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews, Paweł Hajdan Jr., brettw-cc_chromium.org
Visibility:
Public.

Description

Adaptively use temp dir instead of /dev/shm for executable shmem file on Linux On some Linux systems, files from /dev/shm cannot have PROT_EXEC applied to their mappings. This depends on picayune setup details that vary between distributions and kernels and could vary between installations. So just use an empirical test of whether it works or not, and fall back to using generic temporary space instead of /dev/shm for the executable case if needed. BUG= http://code.google.com/p/chromium/issues/detail?id=103377 TEST= SharedMemory.AnonymousExecutable with /dev/shm mounted noexec R=mark@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113228

Patch Set 1 #

Total comments: 2

Patch Set 2 : clean up per review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -18 lines) Patch
M base/file_util.h View 2 chunks +5 lines, -2 lines 0 comments Download
M base/file_util_android.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/file_util_mac.mm View 2 chunks +2 lines, -2 lines 0 comments Download
M base/file_util_posix.cc View 1 2 chunks +45 lines, -8 lines 0 comments Download
M base/file_util_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M base/file_util_win.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M base/shared_memory_posix.cc View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Roland McGrath
9 years ago (2011-12-05 23:16:13 UTC) #1
Mark Mentovai
http://codereview.chromium.org/8800025/diff/1/base/file_util_posix.cc File base/file_util_posix.cc (right): http://codereview.chromium.org/8800025/diff/1/base/file_util_posix.cc#newcode937 base/file_util_posix.cc:937: int fd = CreateAndOpenFdForTemporaryFile(FilePath("/dev/shm"), &path); A ScopedFDClose would be ...
9 years ago (2011-12-05 23:44:46 UTC) #2
Roland McGrath
On 2011/12/05 23:44:46, Mark Mentovai wrote: > http://codereview.chromium.org/8800025/diff/1/base/file_util_posix.cc > File base/file_util_posix.cc (right): > > http://codereview.chromium.org/8800025/diff/1/base/file_util_posix.cc#newcode937 ...
9 years ago (2011-12-06 00:18:15 UTC) #3
Roland McGrath
PTAL. It would be nice if I could manage to land this before the branch. ...
9 years ago (2011-12-06 01:22:21 UTC) #4
Mark Mentovai
9 years ago (2011-12-06 17:55:13 UTC) #5
LGTM

Powered by Google App Engine
This is Rietveld 408576698