| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
When threads are allowed before fork, an error message is always
printed, even if there are no threads.
BUG=364751
TBR=jln
Review URL: https://codereview.chromium.org/242773002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264750 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In sandbox tests, we temporarily allow fork() with threads.
BUG=364751
R=hamaji@chromium.org
TBR=mseaborn
NOTRY=true
Review URL: https://codereview.chromium.org/242383003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264747 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux sandbox tests are careful about never forking with threads.
Since multiple tests can run within the same process, threads might have
been started and then stopped.
Unfortunately, the Linux kernel can show these threads as still running.
We now poll /proc with an exponential back-off before failing the test.
BUG=359285
R=hamaji@chromium.org, mdempsky@chromium.org
Review URL: https://codereview.chromium.org/242253003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264686 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This path is now only inferred from test_suite_name.
TBR=darin
NOTRY=true
Review URL: https://codereview.chromium.org/226353002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264666 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the reland of https://codereview.chromium.org/196793023/
In the old patch, ldflags! for ASan was specified in nacl_loader target,
which is a static_library. Now we set this in nacl_helper target. The
diff from the previous change is:
https://codereview.chromium.org/240783003/
All syscalls except whitelisted ones will cause SIGSYS.
We test the sandbox with BPF_TEST and BPF_TEST_DEATH, which
appropriately fork the process so the main process of the test
will never enable the sandbox.
TEST=Our app works with this sandbox on i686 and ARM
TEST=Build chrome and nacl_helper on i686, x86-64, and ARM
TEST=./out/Release/components_unittests --gtest_filter='NaClNonSfi*'
TEST=SFI NaCl apps still work
TEST=trybots
BUG=359285
R=jln@chromium.org, mseaborn@chromium.org
TBR=jochen
Review URL: https://codereview.chromium.org/239703011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264651 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
After the r263147 the unittest build for the broker process fails with unknown type error.
Add the missing include which defines the type.
BUG=364058
Review URL: https://codereview.chromium.org/239053005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264505 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://codereview.chromium.org/196793023/)
Reason for revert:
Broke ASAN on main WF.
/b/build/slave/Linux_ASan_LSan_Builder/build/src/third_party/binutils/Linux_x64/Release/bin/ld: error: obj/base/libsanitizer_options.a(obj/base/debug/sanitizer_options.sanitizer_options.o): multiple definition of '__asan_default_options'
/b/build/slave/Linux_ASan_LSan_Builder/build/src/third_party/binutils/Linux_x64/Release/bin/ld: obj/components/nacl/loader/nacl_helper.nacl_helper_linux.o: previous definition here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Original issue's description:
> Add seccomp sandbox for non-SFI NaCl
>
> All syscalls except whitelisted ones will cause SIGSYS.
>
> We test the sandbox with BPF_TEST and BPF_TEST_DEATH, which appropriately fork the process so the main process of the test will never enable the sandbox.
>
> TEST=Our app works with this sandbox on i686 and ARM
> TEST=Build chrome and nacl_helper on i686, x86-64, and ARM
> TEST=./out/Release/components_unittests --gtest_filter='NaClNonSfi*'
> # on i686, x86-64, and ARM
> TEST=SFI NaCl apps still work
> TEST=trybots
> BUG=359285
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=264383
TBR=mseaborn@chromium.org,wad@chromium.org,jochen@chromium.org,hamaji@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=359285
Review URL: https://codereview.chromium.org/240613003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264384 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All syscalls except whitelisted ones will cause SIGSYS.
We test the sandbox with BPF_TEST and BPF_TEST_DEATH, which appropriately fork the process so the main process of the test will never enable the sandbox.
TEST=Our app works with this sandbox on i686 and ARM
TEST=Build chrome and nacl_helper on i686, x86-64, and ARM
TEST=./out/Release/components_unittests --gtest_filter='NaClNonSfi*'
# on i686, x86-64, and ARM
TEST=SFI NaCl apps still work
TEST=trybots
BUG=359285
Review URL: https://codereview.chromium.org/196793023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264383 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NaCl now uses its own instance of the setuid sandbox. In particular, NaCl
is now running in its own PID namespace (which is a sub-space of the Zygote
PID namespace).
Moreover, the NaCl helper is responsible for getting chrooted, instead of
relying on a shared FS view (via CLONE_FS) with the Zygote.
This CL also ensures consistency between the setuid sandbox status as
reported in about:sandbox and NaCl's setuid sandbox status.
Before, the process tree looks like this:
__browser
____chrome-sandbox [X, fs_state1]
______init [pid_ns1, fs_state1]
________zygote [pid_ns1, fs_state1]
________nacl_helper [pid_ns1, fs_state1]
-- "X" means same as parent.
After:
__browser
____chrome-sandbox [X , fs_state1]
______init [pid_ns1, fs_state1]
________zygote [pid_ns1, fs_state1]
________chrome-sandbox [pid_ns1, fs_state2]
__________nacl_helper [pid_ns2, fs_state2] (nacl_helper doubles as init(1) in pid_ns2).
The main change is to make nacl_fork_delegate_linux.cc launch nacl_helper via
chrome-sandbox instead trying to share the view of the file system with the Zygote
via CLONE_FS. It uses SetuidSandboxClient to help with this.
Then change nacl_helper_linux.cc to tell (via IPC) chrome-sandbox to enable
the sandbox, and add some more sanity checks.
BUG=358733
R=mseaborn@chromium.org, piman@chromium.org
Review URL: https://codereview.chromium.org/239803003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264372 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the code that finds the setuid sandbox binary to
the SetuidSandboxClient class.
BUG=358733
R=mdempsky@chromium.org, piman@chromium.org
Review URL: https://codereview.chromium.org/238153002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263792 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/236083002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263695 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Valgrind seemingly doesn't allow processes to use setrlimit() to lower
their hard file descriptor limit. So instead of lowering both our
soft and hard file descriptor limit, this CL changes the test so we
only lower our soft descriptor limit.
BUG=362376
Review URL: https://codereview.chromium.org/235573003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263419 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=355084, 236893
R=jln@chromium.org
Review URL: https://codereview.chromium.org/221873004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263213 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=360274
Review URL: https://codereview.chromium.org/229893002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263147 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=Passes on daisy-spring (ARM device).
Review URL: https://codereview.chromium.org/231843008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263121 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
In bionic, open, access and dup2 are wrappers of openat, faccessat and dup3 instead of real syscalls.
BUG=166704
Review URL: https://codereview.chromium.org/226923003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263107 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also now we always use WriteToStderr and move comments to
appropriate positions.
TEST=trybots
BUG=359285
Review URL: https://codereview.chromium.org/231423002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262829 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=358713
R=jln@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/197213015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262786 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=360274
NOTRY=true
Review URL: https://codereview.chromium.org/229383003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262586 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Specifically, Win2k code and mainly the function: IsXPSP2OrLater()
BUG=151624
Review URL: https://codereview.chromium.org/227163009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262197 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This requires an experimental kernel patch that has not yet been accepted
upstream. However this is a prerequisite for getting running seccomp-bpf under
Android.
BUG=308763, 308775
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261951
Reverted: https://src.chromium.org/viewvc/chrome?view=rev&revision=261959
Review URL: https://codereview.chromium.org/224403002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262035 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://codereview.chromium.org/224403002/)
Reason for revert:
Failed compile on http://build.chromium.org/p/chromium.linux/builders/Linux%20Clang%20%28dbg%29/builds/57969/steps/compile/logs/stdio
Original issue's description:
> sandbox: Add support for starting seccomp-bpf with threads.
>
> This requires an experimental kernel patch that has not yet been accepted
> upstream. However this is a prerequisite for getting running seccomp-bpf under
> Android.
>
> BUG=308763, 308775
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=261951
TBR=jln@chromium.org,rsesek@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=308763, 308775
Review URL: https://codereview.chromium.org/226693004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261959 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This requires an experimental kernel patch that has not yet been accepted
upstream. However this is a prerequisite for getting running seccomp-bpf under
Android.
BUG=308763, 308775
Review URL: https://codereview.chromium.org/224403002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261951 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Componentize seccomp_bpf_helpers, sandbox_services and suid_sandbox_client.
libc_urandom_override is special since it uses weak symbols hackery.
BUG=360124
R=mdempsky@chromium.org
TBR=jln
Review URL: https://codereview.chromium.org/226083005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261945 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add final to BrokerServicesBase. This silences an instance of
-Wdelete-non-virtual-dtor. BrokerServicesBase has virtual methods, but no
virtual dtor, so Clang thinks it might call the wrong dtor.
- Change local wchar_t arrays to pointers before passing them to CrossCall.
Clang does template deduction before array to pointer decay occurs, so we end
up with ~14 element wchar_t array instead of a pointer. The cross call
machinery wants the IPC parameters to be 4 bytes only, so this fails a
static_assert in the template.
- Return NULL from a function returning a pointer instead of false, which was
being implicitly converted to a null pointer.
- Remove some unnecessary token pasting from policy_opcodes_unittests.cc.
There's no need to paste '.' or '<' with member to form a single token.
- Use "42UL" instead of "unsigned long(42)", which I don't think is valid C++.
R=cpu@chromium.org,thakis@chromium.org
BUG=82385
Review URL: https://codereview.chromium.org/224793003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261907 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure that for component builds, seccomp_bpf gets built as a
.so library.
This should prevent duplicated implementations from living in
a given process, which breaks singletons.
BUG=360124
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/226253004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261892 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Explicitly check that it's ok for a subprocess to use exit(3) instead
of exit(2) without breaking the test suite.
TBR=jln
Review URL: https://codereview.chromium.org/224953002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261651 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Change kExpectedExitCode to avoid a collision with kExpectedValue.
R=mdempsky@chromium.org
TBR=jln
Review URL: https://codereview.chromium.org/224843002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261577 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Reformat codegen_unittest.cc according to the Chromium style guide.
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/218623012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260659 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code responsible for detecting similar blocks and merging
them didn't check for the next blocks if the last instruction was
not a JMP or a RET.
The patch to fix this bug (in codegen.cc) is based on a patch by
jld@panix.com, attached to the bug report.
Additional unittests are from jln@chromium.org
BUG=351103
Review URL: https://codereview.chromium.org/215173002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260157 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=344415
R=rvargas
TBR=rvargas
NOTRY=true
Review URL: https://codereview.chromium.org/215363005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260135 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This implements agl's comments on https://codereview.chromium.org/191673003/
R=agl@chromium.org
TBR=agl
Review URL: https://codereview.chromium.org/203213005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259986 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=346626
Review URL: https://codereview.chromium.org/204983015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259817 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=356588
NOTRY=true
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/213103006
Patch from Julien Tinnes <jln@chromium.org>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259724 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Linux, SIGSYS is reserved for the kernel's seccomp-bpf feature, so
don't set a handler for it before engaging the sandbox.
When we engage the sandbow we DLOG(FATAL) if there is an existing
signal handler for SIGSYS.
BUG=355453
NOTRY=true
Review URL: https://codereview.chromium.org/209323012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259471 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Seccomp-bpf used to be optional on non Chrome OS ARM bots, since
Ubuntu lacked kernel support.
Now that Ubuntu has kernel support, make seccomp-bpf mandatory on ARM.
BUG=243478
NOTRY=true
Review URL: https://codereview.chromium.org/203493007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259094 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The broker process needs to perform system calls directly.
syscall(__NR_open, ...) was used, however __NR_open doesn't exist on
the modern ARM64 architecture. We replace this call with openat(AT_FDCWD, ...).
This is a re-land of https://codereview.chromium.org/208823003/
BUG=354852
TBR=jorgelo
Review URL: https://codereview.chromium.org/208813006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258793 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> Linux sandbox: use openat() instead of open() in broker process.
>
> The broker process needs to perform system calls directly.
> syscall(__NR_open, ...) was used, however __NR_open doesn't exist on
> the modern ARM64 architecture. We replace this call with openat(AT_FDCWD, ...).
>
> BUG=354852
> R=jorgelo@chromium.org
>
> Review URL: https://codereview.chromium.org/208823003
TBR=jln@chromium.org
Review URL: https://codereview.chromium.org/199793009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258710 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The broker process needs to perform system calls directly.
syscall(__NR_open, ...) was used, however __NR_open doesn't exist on
the modern ARM64 architecture. We replace this call with openat(AT_FDCWD, ...).
BUG=354852
R=jorgelo@chromium.org
Review URL: https://codereview.chromium.org/208823003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258683 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
R=mdempsky@chromium.org
Review URL: https://codereview.chromium.org/207353002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258470 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
For compatibility with old Android versions, we can't rely on abort()
raising SIGABRT. Instead, we expect that raise(SIGKILL) will raise
SIGKILL.
BUG=352226
Review URL: https://codereview.chromium.org/201773003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257889 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Add functionality to ServiceResolverThunk to copy a thunk without patching.
2. Move chrome_elf thunk-handling code to a common location.
3. Use a thunk instead of a f'n ptr for redirects.
BUG=334379
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255151
Review URL: https://codereview.chromium.org/183833004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257749 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/196073002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257518 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later.
I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified.
I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition).
Reland of https://codereview.chromium.org/191673003/
R=agl, viettrungluu
Review URL: https://codereview.chromium.org/202113004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257473 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mandatory DEP is set in the PE headers so trying to force enable it
manually fails without an error code that's not discernable from the
no DEP case (so we get a startup crash on Vista).
NOTRY=true
R=CPU
TBR=cpu
BUG=352932
Review URL: https://codereview.chromium.org/199523003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257345 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://codereview.chromium.org/191673003/)
Reason for revert:
Doesn't correctly link
/mnt/data/b/build/slave/Chromium_Linux_Codesearch/build/src/third_party/gold/gold64: warning: hidden symbol 'base::internal::ScopedFDCloseTraits::Free(int)' in obj/base/files/nacl_helper.scoped_file.o is referenced by DSO lib/libipc.so
Original issue's description:
> Implement ScopedFD in terms of ScopedGeneric.
>
> Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later.
>
> I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified.
>
> I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition).
>
> BUG=
> R=agl@chromium.org, viettrungluu@chromium.org
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257179
TBR=viettrungluu@chromium.org,agl@chromium.org,brettw@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/201203002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257323 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later.
I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified.
I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition).
BUG=
R=agl@chromium.org, viettrungluu@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001
Review URL: https://codereview.chromium.org/191673003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257179 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
It looks like this would have made Chrome not use DEP on Vista or something?
BUG=346382
TEST=none
R=jschuh@chromium.org
Review URL: https://codereview.chromium.org/199593003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257155 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=352226
Review URL: https://codereview.chromium.org/199603002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257075 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(https://codereview.chromium.org/191673003/)
Reason for revert:
Doesn't build on android:
FAILED: /mnt/data/b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/memory/base.discardable_memory_allocator_android.o.d -DV8_DEPRECATION_WARNINGS -DBLINK_SCALE_FILTERS_AT_RECORD_TIME -D_FILE_OFFSET_BITS=64 -DNO_TCMALLOC -DDISABLE_NACL -DCHROMIUM_BUILD -DCOMPONENT_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_CONFIGURATION_POLICY -DENABLE_NEW_GAMEPAD_API=1 -DDISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DENABLE_EGLIMAGE=1 -DENABLE_AUTOFILL_DIALOG=1 -DCLD_VERSION=1 -DENABLE_PRINTING=1 -DENABLE_MANAGED_USERS=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DBASE_IMPLEMENTATION -DANDROID -D__GNU_SOURCE=1 -DUSE_STLPORT=1 -D_STLP_USE_PTR_SPECIALIZATIONS=1 '-DCHROME_BUILD_ID=""' -DHAVE_SYS_UIO_H -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -Igen/base -I../../third_party/android_tools/ndk/sources/android/cpufeatures -I../.. -fstack-protector --param=ssp-buffer-size=4 -Werror -fno-exceptions -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-reserved-user-defined-literal -Wno-deprecated-register -Xclang -load -Xclang /mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-url-directory -fcolor-diagnostics -Wexit-time-destructors -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -mthumb -no-integrated-as -B/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin -ffunction-sections -funwind-tables -g -fstack-protector -fno-short-enums -Wa,--noexecstack -D__compiler_offsetof=__builtin_offsetof -Dnan=__builtin_nan -target arm-linux-androideabi -mllvm -arm-enable-ehabi --sysroot=/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//platforms/android-14/arch-arm -I/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//sources/cxx-stl/stlport/stlport -Os -g -fomit-frame-pointer -fdata-sections -ffunction-sections -funwind-tables -g0 -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11 -Wno-implicit-exception-spec-mismatch -Wno-abi -c ../../base/memory/discardable_memory_allocator_android.cc -o obj/base/memory/base.discardable_memory_allocator_android.o
../../base/memory/discardable_memory_allocator_android.cc:84:25:error: no matching function for call to 'mmap'
void* const address = mmap(
^~~~
/mnt/data/b/build/slave/Android_Clang_Builder__dbg_/build/src/third_party/android_tools/ndk//platforms/android-14/arch-arm/usr/include/sys/mman.h:47:15: note: candidate function not viable: no known conversion from 'base::ScopedFD' (aka 'ScopedGeneric<int, internal::ScopedFDCloseTraits>') to 'int' for 5th argument
extern void* mmap(void *, size_t, int, int, int, off_t);
^
1 error generated.
Original issue's description:
> Implement ScopedFD in terms of ScopedGeneric.
>
> Move to a new file base/files/scoped_file.h. I will also add ScopedFILE to here (currently in file_util.h) later.
>
> I think there is a crash in the old code in content/browser/zygote_host/zygote_host_impl_linux.cc that this patch should fix. The old ScopedFD took the address of something in a vector that is being modified.
>
> I removed SafeScopedFD from content/common/sandbox_linux/sandbox_linux.cc since base's ScopedFD not CHECKs on close failure (this is a more recent addition).
>
> BUG=
> R=agl@chromium.org, viettrungluu@chromium.org
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=257001
TBR=viettrungluu@chromium.org,agl@chromium.org,brettw@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/197873014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257005 0039d316-1c4b-4281-b951-d872f2087c98
|