Commit Graph

201 Commits

Author SHA1 Message Date
Doug Thayer
36c724c6ba Bug 1538279 - Only readahead DLLs in parent process r=glandium
There shouldn't be any need to do this for content processes as
the DLL should already be in the system file cache.

Differential Revision: https://phabricator.services.mozilla.com/D26017
2019-04-13 18:46:13 +00:00
Cosmin Sabou
1029c5018d Backed out 3 changesets (bug 1538279) for mass test failures. CLOSED TREE
Backed out changeset af07f58d18cc (bug 1538279)
Backed out changeset 508ee4cf9ea2 (bug 1538279)
Backed out changeset 6f2e7c819c11 (bug 1538279)
2019-04-12 07:47:53 +03:00
Doug Thayer
6eda1cf67c Bug 1538279 - Only readahead DLLs in parent process r=glandium
There shouldn't be any need to do this for content processes as
the DLL should already be in the system file cache.

Differential Revision: https://phabricator.services.mozilla.com/D26017
2019-04-12 02:17:48 +00:00
Alex Gaynor
a1982759e2 Bug 1375863 - fold MOZ_CONTENT_SANDBOX and MOZ_GMP_SANDBOX into MOZ_SANDBOX; r=jld,firefox-build-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D22975
2019-03-18 22:31:59 +00:00
Ehsan Akhgari
498e2df734 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset
2019-01-18 10:16:18 +01:00
Sylvestre Ledru
e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Haik Aftandilian
c0b58e8b13 Bug 1505445 - [Mac] With sandbox early startup, start the sandbox after the port exchange r=Alex_Gaynor
Don't start the sandbox until after the port exchange so the parent process does not have to wait longer in ContentParent::LaunchSubprocess() for the (expensive) sandbox_init_with_parameters call to complete in the child. Remove the policy rule allowing access to the parent port now that it is already open when the sandbox is initialized and therefore not needed.

Differential Revision: https://phabricator.services.mozilla.com/D11186
2018-11-08 21:04:19 +00:00
Marco Castelluccio
2117bf6a50 Bug 1504188 - Don't include Sandbox.h and don't use EarlyStartMacSandboxIfEnabled if the sandbox is disabled. r=haik 2018-11-02 15:47:03 +01:00
Haik Aftandilian
fa11a72896 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command line allowing for early sandbox startup.

Pref'd off behind "security.sandbox.content.mac.earlyinit" until it's ready to be enabled by default.

Once early startup is enabled by default and considered stable, the original sandbox startup code can be removed.

Depends on D6719

Differential Revision: https://phabricator.services.mozilla.com/D6720
2018-10-19 18:23:16 +00:00
Narcis Beleuzu
db64c7189d Backed out 7 changesets (bug 1431441) as per haik`s request.
Backed out changeset 1dfdc7ba998d (bug 1431441)
Backed out changeset fb1a4ddbf9bf (bug 1431441)
Backed out changeset b59b1651fc15 (bug 1431441)
Backed out changeset 1e2bb579b824 (bug 1431441)
Backed out changeset 2a635530dfa3 (bug 1431441)
Backed out changeset 262da0be2fed (bug 1431441)
Backed out changeset b9cfda58fed3 (bug 1431441)
2018-10-14 18:20:01 +03:00
Haik Aftandilian
b3217c2237 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command
line allowing for early sandbox startup. Limited to Nightly
until confirmed to be stable and ready to ride the trains.

Enable early sandbox startup by default on Nightly and use
pref "security.sandbox.content.mac.earlyinit" to disable
early startup for debugging purposes.

Once early startup is stable, the original sandbox startup
code can be removed.

Depends on D6719

Differential Revision: https://phabricator.services.mozilla.com/D6720
2018-10-11 22:44:25 +00:00
Tiberius Oros
cf1ddce189 Backed out 5 changesets (bug 1431441) for failing devtools at client/debugger/new/test/mochitest/browser_dbg_rr_breakpoints-01.js on OSX opt a=backout
Backed out changeset 94a1d1d67191 (bug 1431441)
Backed out changeset be7ec7438701 (bug 1431441)
Backed out changeset db6b7ee04187 (bug 1431441)
Backed out changeset f61ec0f140c2 (bug 1431441)
Backed out changeset ac51f86f5cac (bug 1431441)
2018-10-03 09:39:01 +03:00
Haik Aftandilian
61a9a0a875 Bug 1431441 - Part 3 - Start the Mac content sandbox earlier r=Alex_Gaynor
Pass sandbox parameters to content processes on the command
line allowing for early sandbox startup. Limited to Nightly
until confirmed to be stable and ready to ride the trains.

Enable early sandbox startup by default on Nightly and use
pref "security.sandbox.content.mac.earlyinit" to disable
early startup for debugging purposes.

Once early startup is stable, the original sandbox startup
code can be removed.

Depends on D6719

Differential Revision: https://phabricator.services.mozilla.com/D6720
2018-10-02 20:29:46 +00:00
Carl Corcoran
601eae9fc9 Bug 1467736: Add support for DllBlocklist_Shutdown;r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D4544
2018-08-29 18:49:49 +00:00
Aaron Klotz
f3fb5123d8 Bug 1445025: Part 3 - Change blocklist init flags for browser process so that they can be modified by launcher process; r=mhowell 2018-06-05 15:21:51 -06:00
Cosmin Sabou
3910fc311b Backed out 6 changesets (bug 1445025) for browser chrome failures on browser_checkdllblockliststate.js. CLOSED TREE
Backed out changeset a1203eb4cee9 (bug 1445025)
Backed out changeset 64b003dceafb (bug 1445025)
Backed out changeset a6cff2b478da (bug 1445025)
Backed out changeset 4dbc7fbb3361 (bug 1445025)
Backed out changeset 1ad82650ca1c (bug 1445025)
Backed out changeset 5c63001e1ce6 (bug 1445025)
2018-06-07 12:09:22 +03:00
Aaron Klotz
dd0d2f834c Bug 1445025: Part 3 - Change blocklist init flags for browser process so that they can be modified by launcher process; r=mhowell 2018-06-05 15:21:51 -06:00
Aaron Klotz
d0a8a78aa8 Bug 1454745: Skeletal bootstrap process; r=mhowell 2018-04-17 13:48:21 -06:00
Dorel Luca
df47fcf2d7 Backed out 3 changesets (bug 1430857) for breaking tests on Windows Code Coverage builds a=backout
Backed out changeset a992887a6060 (bug 1430857)
Backed out changeset cc9b0ac5f66b (bug 1430857)
Backed out changeset 4bdd6d82f993 (bug 1430857)
2018-02-07 15:02:58 +02:00
Aaron Klotz
35aa23590d Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5
2018-01-30 14:23:10 -07:00
Mike Hommey
bb6f5072f3 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj 2017-09-28 10:37:27 +09:00
Sebastian Hengst
d6b7000bfa Backed out changeset 582d112281f9 (bug 1403366) 2017-10-04 01:27:07 +02:00
Mike Hommey
2fc99e4352 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj 2017-09-28 10:37:27 +09:00
Sebastian Hengst
ff926683ca Backed out changeset 3eb67e350f38 (bug 1403366) 2017-09-29 17:19:46 +02:00
Mike Hommey
92c0a215b7 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj 2017-09-28 10:37:27 +09:00
Marco Castelluccio
f778fb41f7 Bug 1403218 - Remove no longer used XRE_DONT_SUPPORT_XPSP2 definition. r=glandium 2017-09-26 17:48:26 +02:00
Bob Owen
ceb3f53bfc Bug 1377555 Part 1: Back out changesets 04edb03fb817 and d17ac655cc51. r=jimm
This backouts the previous change to detect and change the sandbox policy
when running from a network drive.
2017-07-11 09:44:20 +01:00
Bob Owen
aea6feb379 Bug 1323188: Don't use restricting SIDs in the sandbox access tokens when running from a network drive. r=jimm 2017-06-07 20:20:02 +01:00
Aaron Klotz
510c4aa704 Bug 1363844: Add CHILD_PROCESSES_ONLY flag to Windows DLL blocklist; r=dmajor
MozReview-Commit-ID: f9ej2Hp0DF
2017-05-11 15:50:10 -06:00
Tom Tromey
4a7ac1bd53 Bug 1334301 - use MOZ_FORMAT_PRINTF in nsBrowserApp.cpp; r=froydnj
MozReview-Commit-ID: 7cukiF58ejS
2017-05-02 08:52:49 -06:00
Benjamin Smedberg
acbeca42d6 Bug 1332639 - Fix nsBrowserApp.cpp and related headers to compile without the external string API, r=glandium
MozReview-Commit-ID: CQjtpA2lxAM
2017-02-27 13:39:34 -05:00
David Parks
b0304bb1c8 Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.
2017-02-14 15:08:40 -08:00
Sebastian Hengst
736fb3a64b Backed out changeset 71b9ac06a60a (bug 1284897) 2017-02-21 23:13:29 +01:00
David Parks
a8f0f4ecaf Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.
2017-02-14 15:08:40 -08:00
Phil Ringnalda
f72d4e4b61 Backed out 5 changesets (bug 1284897) for mozilla::SandboxPermissions::RemovePermissionsForProcess crashes
Backed out changeset 19b2fcee13a9 (bug 1284897)
Backed out changeset a5171791437f (bug 1284897)
Backed out changeset 3ea8b8a18515 (bug 1284897)
Backed out changeset 21497a4e3bde (bug 1284897)
Backed out changeset 12e17d5f0fa9 (bug 1284897)
2017-02-16 22:14:15 -08:00
David Parks
2ad604aab3 Bug 1284897 - Add mechanism to libsandbox_s to track names of files that have been given special sandbox access permissions (PermissionsService). r=bobowen, r=glandium
Hook this into the browser via the XREAppData. This patch does not include the changes to Chromium source code.
2017-02-14 15:08:40 -08:00
Mike Hommey
672182dcc9 Bug 1332523 - Add BinaryPath::Get variant that returns a UniquePtr instead of filling a stack buffer. r=bsmedberg 2017-01-13 09:40:54 +09:00
Mike Hommey
46f514d8b8 Bug 1332523 - Make GetBootstrap take the path to an arbitrary file next to libxul. r=bsmedberg
The FileExists check can be removed because the code loading the library
will handle that case already.
2017-01-13 09:27:39 +09:00
Mike Hommey
e8fdec5f55 Bug 1332523 - Remove nsXPCOMGlue.h. r=bsmedberg 2017-01-13 07:56:05 +09:00
Mike Hommey
853c307fdf Bug 1332523 - Move message indicating when the blocklist is initialized after user32.dll was loaded to the blocklist itself. r=dmajor 2017-01-12 11:13:40 +09:00
Mike Hommey
e521d08008 Bug 1330533 - Use FuzzerDriver directly instead of wrapping it in a libfuzzer_main function. r=decoder
Going further from the previous changes, all libfuzzer_main really does
is call the init function, and then proceed to call the fuzzer driver
with the testing function.

So instead of calling that function for it to do all that, the
LibFuzzerRunner can just call the init function itself, and then
call the fuzzer driver with the testing function.
2017-01-12 14:44:18 +09:00
Mike Hommey
688aecac16 Bug 1330533 - Pass LibFuzzerInitFunc and LibFuzzerTestingFunc to libfuzzer_main. r=decoder
The LibFuzzerRunner code lives in libxul. It's unnecessary complications
to have it call back a function in the firefox executable just so that
it calls another function that is in libxul. Passing the init and
testing functions to the libfuzzer_main function allows to just bypass
that roundtrip, simplifying the setup.
2017-01-12 14:50:14 +09:00
Mike Hommey
e55bae1e11 Bug 1330533 - Remove argc/argv arguments to XRE_LibFuzzerSetMain. r=decoder
The function given to XRE_LibFuzzerSetMain is called from somewhere that
does have access to argc/argv already, so we can avoid passing them
to XRE_LibFuzzerSetMain.

This actually might fix subtle issues with argc/argv not really matching
reality when calling the LibFuzzerMain function in the current code:
some arguments are handled before the call, and both argc and argv are
modified from within XRE_main, but the values stored for the
LibFuzzerMain call still are the original ones.

Argv being a pointer, and it not being reallocated, the value stored for
the LibFuzzerMain call points to the changed one, but argc, being an
integer, is not modified accordingly.

In fact, it's actually worse, because while the Gecko code doesn't
reallocate argv, gtk_main might. So if some GTK flag is passed on the
command line, there's also a possibility that the LibFuzzerMain function
will do a use-after-free.

So all in all, it's just better to use the set of modified argc/argv
from XRE_main instead of storing them from main().
2017-01-12 11:59:37 +09:00
Mike Hommey
3349e52d3c Bug 1306327 - Move reading application.ini to XRE_main. r=bsmedberg
Reading application.ini involves using nsCOMPtr<nsIFile>, and that can
only happen through the XPCOM glue, which we eventually want to get rid
of.

So, while keeping the command line argument/environment variable
handling in nsBrowserApp, we move the actually parsing of the file to
XRE_main, where things can be handled without the XPCOM glue.
2017-01-10 16:43:23 +09:00
Mike Hommey
b365aff82e Bug 1306327 - Use the new XRE Bootstrap API in Desktop Firefox. r=bsmedberg
This just wraps all the XRE method calls to go through the Bootstrap API
instead of relying on the XPCOM glue methods.
2016-12-16 11:10:02 +09:00
Mike Hommey
2756f99622 Bug 1306327 - Remove NS_XRE_DLL_BLOCKLIST_ENABLED. r=bsmedberg
Instead of having nsBrowserApp.cpp set a flag in XREAppData to indicate
whether the DLL blocklist properly initialized, just have XRE code ask
the blocklist itself.
2017-01-10 09:10:36 +09:00
Mike Hommey
f89620bd8c Bug 1306327 - Remove the flags argument to XRE_main. r=bsmedberg
This hasn't been used since the removal of the Metro code in bug
1039866, close to two years ago.
2017-01-10 14:15:50 +09:00
Mike Hommey
31e59dce13 Bug 1306327 - Don't set XREAppData.xreDirectory from nsBrowserApp.cpp. r=bsmedberg
It turns out nsAppRunner.cpp sets it to the exact same thing when it's
not already set, so we might as well use that.
2017-01-10 08:02:43 +09:00
Mike Hommey
772b6a862b Bug 1306327 - Remove XPCOMGlueEnablePreload. r=froydnj
Back in bug 632404, when the function was added, preloading was
conditional. But after some A/B testing, the conclusion in bug 771745
was that we would just do preloading unconditionally.

Which means in practice, we don't need to have a function to enable it
manually anymore, since we're always enabling it.
2016-12-15 17:37:53 +09:00
Jed Davis
c8328263a0 Bug 1277968 - Use firefox -contentproc on sandbox-enabled Linux. r=ted
MozReview-Commit-ID: 7izy7UvJpwS
2016-11-08 15:06:36 -07:00