| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Cleanup temporary file creation to its own re-usable class.
Review URL: https://chromiumcodereview.appspot.com/19368008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212068 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Android sometimes run the tests as root. Make sure that our unittests
pass when running as root.
R=jorgelo@chromium.org
Review URL: https://codereview.chromium.org/19240009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211842 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes, we receive spurious SIGSYS signals. Clean up this code
a little to make it more clear which problems we're actually seeing.
BUG=178166
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/19054014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211313 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RUNNING_ON_VALGRIND was used as a compile-time option. However, Valgrind has to
be detected dynamically. Because of this bug, Valgrind was always considered
running and we would never assert properly that seccomp-bpf was available
when running our tests.
BUG=259106
R=jorgelo@chromium.org
Review URL: https://codereview.chromium.org/18539020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211001 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sandbox_bpf_policy_forward.h can forward declare ErrorCode. This should fix
a Chromium on MIPS compilation issue.
BUG=130022
NOTRY=true
R=markus@chromium.org
Review URL: https://codereview.chromium.org/18943004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210691 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=256452
TEST=sandbox_linux_unittests passes.
TEST=about:gpu shows "Sandboxed: true", browser works.
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/18337010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210651 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TSAN uses a helper thread. For all intent and purposes it should be hidden
and it looks like we can fork() happily with this thread running.
So when counting threads, we ignore it.
We still disable BPF sandbox tests under TSAN though, the BPF sandbox is not
compatible with TSAN.
BUG=256905,243968
R=glider@chromium.org
Review URL: https://codereview.chromium.org/18603002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210014 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Text relocations are a minor security risk. Add compiler flags
that prevent them from reappearing in Android binary.
All existing occurences have been removed after
http://crrev.com/17714003.
TEST=Compile.
BUG=b/8061013
Review URL: https://chromiumcodereview.appspot.com/17820002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209885 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure that sandbox_linux_unittests can run under TSAN by simply disabling
the tests that require forking.
This will need to be fixed better in the future, but this will allow us to
run part of sandbox_linux_unittests under TSAN immediately.
BUG=256905
R=ajwong@chromium.org
Review URL: https://codereview.chromium.org/18580009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209845 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This patch attempts to generalise the linux libc urandom override, so that it works for non-glibc linux platforms too.
BUG=255215
Review URL: https://chromiumcodereview.appspot.com/18093002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209281 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Broke Linux ASAN build:
[1054/1063] LINK nacl_helper
../../chrome/nacl/nacl_helper_linux.cc:229: error: undefined reference to 'sandbox::InitLibcUrandomOverrides()'
> attempt to make the libc urandom override work for non-glibc too
>
> This patch attempts to generalise the linux libc urandom override, so
> that it works for non-glibc linux platforms too.
>
> Review URL: https://chromiumcodereview.appspot.com/17066002
TBR=mostynb@opera.com
Review URL: https://codereview.chromium.org/18069003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208926 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
This patch attempts to generalise the linux libc urandom override, so
that it works for non-glibc linux platforms too.
Review URL: https://chromiumcodereview.appspot.com/17066002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208924 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=252425
R=cpu@chromium.org
TEST=Dr. Memory no longer reports the mismatch
Review URL: https://codereview.chromium.org/16983011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207829 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
We capture the IPC buffer before doing real work with it, but a crazy
compiler _could_ mess up the initial checks that we do. So, do more checks!
BUG=247898
TEST=current tests.
Review URL: https://chromiumcodereview.appspot.com/17126002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207309 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new API to start a sandbox for process types out of
content/.
BUG=229673, 168812
Review URL: https://chromiumcodereview.appspot.com/16775010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206939 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
We should not attempt to override libc functions using glibc-specific
code when not actually using glibc. This still needs to be fixed
for other libc's though.
Review URL: https://chromiumcodereview.appspot.com/16132015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206040 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=247723
TEST=none
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/16358024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205458 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
scoped_ptr<C, base::FreeDeleter>.
BUG=246802
R=jschuh@chromium.org
TEST=browser_tests under Dr. Memory
Review URL: https://chromiumcodereview.appspot.com/16404003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205053 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The expressions on both sides of the : should have the same type, in
this case void.
This fixes a Clang error.
BUG=82385
R=jschuh@chromium.org
Review URL: https://codereview.chromium.org/16101011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203153 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
These errors were caught by Clang.
BUG=82385
Review URL: https://chromiumcodereview.appspot.com/16196003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203136 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
See https://groups.google.com/a/chromium.org/d/msg/chromium-dev/YpU7t2XaGRg/V9-diQZQQDwJ
for discussion.
BUG=none
R=agl@chromium.org, jln@chromium.org
Review URL: https://codereview.chromium.org/14771026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200838 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These should hopefully be uncontroversial, so I'm sending them to Darin
because he has global OWNERS approval on src/*. Let me know if you want
to split this up and farm it out to individual components.
R=darin@chromium.org
CC=thakis@chromium.org
BUG=82385
Fix some -Wdeprecated-writable-strings warnings for wide string
literals.
net/dns/dns_config_service_win_unittest.cc
net/http/http_auth_sspi_win.cc
net/http/http_auth_sspi_win.h
ui/shell_dialogs/select_file_dialog_win_unittest.cc
Use reinterpret_cast<> to convert from void * to a function pointer.
chrome/browser/policy/policy_loader_win.cc
content/browser/gamepad/gamepad_platform_data_fetcher_win.cc
Remove "public" from a typedef. It's not clear that that really means.
chrome/browser/enumerate_modules_model_unittest_win.cc
Escape an unescaped backslash in a wide string iteral to prevent it from
being interpreted as a unicode literal ("\uXXX").
chrome/browser/storage_monitor/test_portable_device_watcher_win.cc
Use base::UTF8ToUTF16() over ATL::CA2W() and avoid an unnecessary
c_str(). Clang can't convert from CA2WEX<> to string16.
chrome/browser/ui/views/external_tab_container_win.cc
Fix a -Wenum-compare warning when asserting that two enum values are
equal.
sandbox/win/src/policy_params.h
Don't define va_copy for clang. It provides one in <stdarg.h>.
third_party/leveldatabase/port/port_chromium.h
Review URL: https://chromiumcodereview.appspot.com/15200005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@200814 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Buggy userland code can sometimes check for O_CLOEXEC when what it
really wants is to check for FD_CLOEXEC. We work around this.
BUG=237283
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/14787006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197733 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
If the kernel does not support seccomp-bpf, sandbox_linux_unittests will
fail.
BUG=236716
Review URL: https://chromiumcodereview.appspot.com/14601002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197466 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should completely get rid of seccomp-legacy (15000+ LOC).
BUG=230142
TBR=ben@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/14271018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197301 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current support of O_CLOEXEC in Open() in the broker process is racy.
We make it non racy by using MSG_CMSG_CLOEXEC in recvmsg when getting the
new file descriptor over the Unix socket.
BUG=232077, 232068
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/14407005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196554 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Stop handling O_NONBLOCK in a special way, it's not special.
- Handle O_CLOEXEC as much as possible by emulating it via fcntl.
BUG=232077, 232068
TEST=sandbox_linux_unittests
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/14166016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196291 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://chromiumcodereview.appspot.com/14305010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196070 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
We add support for access() that is consistent with our support for open().
BUG=232077,232068
TEST=sandbox_linux_unittests
NOTRY=true
Review URL: https://codereview.chromium.org/14301014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195945 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
suid_unsafe_environment_variables.h is included both in C and C++ and is
a little clunky. Clean things up a bit.
BUG=233330
Review URL: https://codereview.chromium.org/14328030
Patch from Julien Tinnes <jln@chromium.org>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195066 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DuplicateHandle with DUPLICATE_CLOSE_SOURCE always closes the handle, right now on failure
we close it which means we are closing an invalid handle or closing some other handle in
the small race window.
Reported by Ashutosh Mehra from Adobe.
BUG=233251
TEST=none
Review URL: https://chromiumcodereview.appspot.com/13912024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195029 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This is a manual cleanup pass using sed for files which are not built on
Linux.
BUG=171111
Review URL: https://chromiumcodereview.appspot.com/13888007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194027 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was generated by running the empty_string clang tool
across the Chromium Linux compilation database. Implicitly or
explicitly constructing std::string() with a "" argument is
inefficient as the caller needs to emit extra instructions to
pass an argument, and the constructor needlessly copies a byte
into internal storage. Rewriting these instances to simply call
the default constructor appears to save ~14-18 kilobytes on an
optimized release build.
BUG=none
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020
Review URL: https://codereview.chromium.org/13145003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6.
Revert "Fix build after r193020."
This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a.
Revert "Really fix build after r193020."
This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was generated by running the empty_string clang tool
across the Chromium Linux compilation database. Implicitly or
explicitly constructing std::string() with a "" argument is
inefficient as the caller needs to emit extra instructions to
pass an argument, and the constructor needlessly copies a byte
into internal storage. Rewriting these instances to simply call
the default constructor appears to save ~14-18 kilobytes on an
optimized release build.
BUG=none
Review URL: https://codereview.chromium.org/13145003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we start a new test that requires fork(), assert that we are not
currently multi-threaded.
BUG=225809
NOTRY=true
Review URL: https://codereview.chromium.org/13430016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191957 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=196305
TBR=isherman@chromium.org,rsleevi@chromium.org,keybuk@chromium.org,fischman@chromium.org,
thestig@chromium.org,alexeypa@chromium.org,rogerta@chromium.org,cpu@chromium.org,
akalin@chromium.org,ben@chromium.org,tony@chromium.org
Review URL: https://chromiumcodereview.appspot.com/13322003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191479 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for all processes. Instead have whoever creates a sandboxed process set this data. This allows us to clean a few NaCl related changes in content:
-remove NaCl sandbox rules from content
-remove the hack for ifdef'ing out the GPU policy since it didn't link for nacl64.exe
-remove the 1GB memory reservation for the NaCl loader process out of content
Other cleanup:
-renamed sandbox_policy.* to sandbox_win.* to match the other platform-specific sandbox files
-moved BrokerGetFileHandleForProcess to internal content files since it's not called from outside
-remove AddGpuDllEvictionPolicy since it was redundant (the one dll it removed was already listed in the generic list)
There's still more cleanup to be done in the sandbox code (i.e. remove chrome frame switch, nacl process type switch etc). I will do that in future changes.
BUG=191682
Review URL: https://codereview.chromium.org/12805004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189175 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Android, errno are only supported up to 255 and are not processed
otherwise. Fix a test to work around this issue.
BUG=181647,169416
NOTRY=true
TBR=markus
Review URL: https://chromiumcodereview.appspot.com/12638015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187410 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
In revision 143549 seccomp_bpf was moved to its own target, however the
line changing 'sandbox' to a static_library was left behind. This should
be removed as it is misleading and leads to odd build generator behavior
(like an empty build.ninja file).
Review URL: https://codereview.chromium.org/12340115
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185143 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"static" methods.
This change allows us to stack multiple instances of the sandbox.
Also, split up headers in a generally saner fashion.
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/12223109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184541 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
TBR=sky
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a second attempt. The original CL was tracked at https://chromiumcodereview.appspot.com/11613016
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/11648028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182698 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
Tests all pass and are getting enabled on the bots this week.
BUG=168414
Review URL: https://codereview.chromium.org/12221109
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181924 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
These flags aren't supported on 64-bit and can throw an error on Win8 process creation.
BUG=147752
Review URL: https://chromiumcodereview.appspot.com/12207106
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181840 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/12217101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181640 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
DEP is already enabled by default and Win64 throws an
error when you try to manipulate the setting at all.
Review URL: https://codereview.chromium.org/12218061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181382 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=130662
TEST=sandbox_linux_unittests
Review URL: https://chromiumcodereview.appspot.com/12207029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181121 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=169416
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12207004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180747 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, the renderer and other subprocesses never inherit
stdout and stderr when they are pipe handles. Stdout/stderr will be
pipe handles when chrome.exe/browser_tests.exe is running under
Buildbot or under Cygwin's default terminal, mintty.
We fix this by specifying PROC_THREAD_ATTRIBUTE_HANDLE_LIST in the
arguments to CreateProcess().
The fix only applies on Windows >=Vista.
Although it's probably safe for stdout/stderr to be inherited when it
is a pipe handle or file handle, we put this behind the flag
"--enable-logging". (This flag already makes stderr work when
chrome.exe/browser_tests.exe is running under a Windows console -- a
case which is not handled by the code path we're adding here because a
Windows console is not an inheritable kernel handle.)
Note that this relies on the fix committed in http://crrev.com/178656.
BUG=171836
TEST=manually add logging to renderer process and check that it appears
when running chrome.exe or browser_tests.exe
Review URL: https://chromiumcodereview.appspot.com/12033045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180303 0039d316-1c4b-4281-b951-d872f2087c98
|