Commit Graph

5682 Commits

Author SHA1 Message Date
Kartik Gautam
7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Cosmin Sabou
2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam
775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
André Bargull
89a89bb951 Bug 1679750 - Part 4: Move BigInt with Int32 comparison to the MacroAssembler. r=jandem
Also rename `branchIfNegativeBigInt` to `branchIfBigIntIsNegative` to match
the other branch methods from part 2 and part 8.

Differential Revision: https://phabricator.services.mozilla.com/D98158
2020-12-22 13:25:32 +00:00
Noemi Erli
e3dbea67d1 Backed out 24 changesets (bug 1679750) for causing build bustages in CodeGenerator.cpp CLOSED TREE
Backed out changeset a5c82fcf8385 (bug 1679750)
Backed out changeset 464d53cb1b5d (bug 1679750)
Backed out changeset 5fe8bf1d376d (bug 1679750)
Backed out changeset 95274172bd74 (bug 1679750)
Backed out changeset b6c0885e4483 (bug 1679750)
Backed out changeset c6840af4b13e (bug 1679750)
Backed out changeset 542359a41cf9 (bug 1679750)
Backed out changeset 1e0b72830e95 (bug 1679750)
Backed out changeset ff683dfe2357 (bug 1679750)
Backed out changeset 9b9acb6917bd (bug 1679750)
Backed out changeset 723a000ec3ef (bug 1679750)
Backed out changeset 7f21f761a9d2 (bug 1679750)
Backed out changeset 234cc79df8d1 (bug 1679750)
Backed out changeset 99f82d64de93 (bug 1679750)
Backed out changeset 8396e48cb09e (bug 1679750)
Backed out changeset 80f78c980c07 (bug 1679750)
Backed out changeset 0cfd75ab21b8 (bug 1679750)
Backed out changeset e804e1f0b4a4 (bug 1679750)
Backed out changeset 822eea13c8c7 (bug 1679750)
Backed out changeset 67846b5fb533 (bug 1679750)
Backed out changeset 3c4555e5d59a (bug 1679750)
Backed out changeset 238e0776533c (bug 1679750)
Backed out changeset 870397398a5f (bug 1679750)
Backed out changeset 7903c8a72850 (bug 1679750)
2020-12-21 21:58:37 +02:00
André Bargull
15634ee875 Bug 1679750 - Part 4: Move BigInt with Int32 comparison to the MacroAssembler. r=jandem
Also rename `branchIfNegativeBigInt` to `branchIfBigIntIsNegative` to match
the other branch methods from part 2 and part 8.

Differential Revision: https://phabricator.services.mozilla.com/D98158
2020-12-21 14:31:52 +00:00
Mozilla Releng Treescript
200cd613bc Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-12-14 15:48:03 +00:00
André Bargull
35813933df Bug 1673027 - Part 2: Update tzdata in ICU data files to 2020d. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D94605
2020-12-04 17:23:41 +00:00
Emilio Cobos Álvarez
04229a0075 Bug 1680080 - Optimize proc macros / build dependencies. r=glandium,firefox-build-system-reviewers,mhentges
On a very parallel debug build, I see a long time just waiting for
bindgen / style compilation / geckoservo.

Turns out that a bunch of this is just proc macros / build scripts.

Optimizing it saves between 10 and 17 seconds of my debug build. We
might want to consider running bindgen much like cbindgen rather than
rebuilding it all the time, which should help a lot more, but my guess
is that this should still help with the pretty hot custom derives that
the style crate runs.

This needs rust 1.41, so the requirement for tools/crashreporter needs
to be bumped as a consequence. To make things simpler, it was bumped
to 1.47 while we're at it.

Differential Revision: https://phabricator.services.mozilla.com/D98366
2020-12-04 01:35:51 +00:00
Makoto Kato
1ca4d32304 Bug 1677037 - Remove STRIP_XPI rule. r=firefox-build-system-reviewers,glandium
No one seems to use STRIP_XPI rule in m-c and c-c.

Differential Revision: https://phabricator.services.mozilla.com/D96967
2020-12-01 03:43:59 +00:00
Martin Stransky
59d04019a3 Bug 1660336 Provide libva headers to build Firefox without libva-devel installed, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D97920
2020-11-26 21:26:05 +00:00
stransky
c3c0341407 Bug 1660336 Provide libva wrapper to run Firefox on systems without libva installed, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D94650
2020-11-26 21:25:59 +00:00
Alexis Beingessner
9a0f581986 Bug 1671691 - Enable Rust stdlib instrumentation. r=decoder
* Bumps the tsan toolchain to rust-nightly-2020-11-14 that has my patches to make -Zbuild-std work in vendored environments:
  * https://github.com/rust-lang/cargo/pull/8834
  * https://github.com/rust-lang/rust/pull/78790

* Passes -Zbuild-std to cargo when MOZ_TSAN is defined (mk_add_options --enable-thread-sanitizer)

* Removes generic Rust supressions and adds much more specific ones
    * One presumed upstream false positive from tsan not understanding the code
    * One actual upstream bug tsan found (yay!)
    * One new real issue uncovered
    * One issue that probably already existed intermittently but I happened to hit

Differential Revision: https://phabricator.services.mozilla.com/D97165
2020-11-16 18:36:41 +00:00
Mozilla Releng Treescript
49ebb9c28b Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-11-16 10:11:15 +00:00
Alexis Beingessner
d1d354bb8f Bug 1674773 - make tsan builds use consistent flags. r=rstewart
This makes --enable-thread-sanitizer turn on Rust tsan (-Zsanitizer=thread).
This requires changing SpiderMonkey tsan to use the tsan rust nightly.

In future changes, more Rust tsan integration will key off of MOZ_TSAN.

Differential Revision: https://phabricator.services.mozilla.com/D96453
2020-11-10 21:11:37 +00:00
Cosmin Sabou
f2556d47da Backed out 2 changesets (bug 1674773) for turning Bug 1646925 into almost permafail.
Backed out changeset acd441508a66 (bug 1674773)
Backed out changeset 89babec1b885 (bug 1674773)
2020-11-10 11:27:50 +02:00
Alexis Beingessner
2e16b14340 Bug 1674773 - make tsan builds use consistent flags. r=rstewart
This makes --enable-thread-sanitizer turn on Rust tsan (-Zsanitizer=thread).
This requires changing SpiderMonkey tsan to use the tsan rust nightly.

In future changes, more Rust tsan integration will key off of MOZ_TSAN.

Differential Revision: https://phabricator.services.mozilla.com/D96453
2020-11-09 20:12:42 +00:00
Philipp Ammann
72c6c6c137 Bug 1661450 - Move X11 headers behind CONFIG['MOZ_X11'] r=stransky
Required in preparation for a Wayland-only build.

Differential Revision: https://phabricator.services.mozilla.com/D88801

Depends on D88800
2020-08-31 11:41:06 +00:00
Cosmin Sabou
4d167c5d6b Backed out 5 changesets (bug 1661450) for causing build bustages. CLOSED TREE
Backed out changeset b01a3dceb3eb (bug 1661450)
Backed out changeset 4a0b897aa1b2 (bug 1661450)
Backed out changeset 561d7cce5353 (bug 1661450)
Backed out changeset 088f1afeff27 (bug 1661450)
Backed out changeset 04db3acdf84f (bug 1661450)
2020-11-05 12:00:59 +02:00
Philipp Ammann
8627137b2b Bug 1661450 - Move X11 headers behind CONFIG['MOZ_X11'] r=stransky
Required in preparation for a Wayland-only build.

Differential Revision: https://phabricator.services.mozilla.com/D88801

Depends on D88800
2020-08-31 11:41:06 +00:00
Mike Hommey
16979b2a82 Bug 1673769 - Use the right data file for ICU on big endians. r=firefox-build-system-reviewers,dmajor
It turns out that CONFIG.get(..., ...) doesn't actually work properly in
moz.build, so use `or` instead.

Differential Revision: https://phabricator.services.mozilla.com/D94918
2020-10-28 02:54:17 +00:00
Ricky Stewart
210585edd2 Bug 1672023 - Remove excluded files from black.yml
These files were omitted from the original patch because reformatting them required some manual intervention in order to avoid breaking unit tests. Generally the `noqa` lines were already there and just needed to be moved from one line to another (due to the reformatting by `black`), but sometimes `black` saw fit to move a bunch of stuff all onto one line, requiring me to introduce new `noqa` lines.

Besides the autoformat by `black` and some manual fixups, this patch contains no other changes.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94052

Depends on D94045
2020-10-26 18:21:44 +00:00
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Tom Schuster
e6c8debb2a Bug 1672353 - Disable clang warnings when compiling ICU. r=jwalden,andi
Differential Revision: https://phabricator.services.mozilla.com/D94291
2020-10-24 21:23:15 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
fe80718d67 Bug 1672023 - Remove excluded files from black.yml r=sylvestre,perftest-reviewers,geckoview-reviewers,agi
These files were omitted from the original patch because reformatting them required some manual intervention in order to avoid breaking unit tests. Generally the `noqa` lines were already there and just needed to be moved from one line to another (due to the reformatting by `black`), but sometimes `black` saw fit to move a bunch of stuff all onto one line, requiring me to introduce new `noqa` lines.

Besides the autoformat by `black` and some manual fixups, this patch contains no other changes.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94052
2020-10-23 20:40:44 +00:00
Ricky Stewart
c0cea3b0fa Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Jed Davis
cc6e7ab133 Bug 1440203 - Support memfd_create in IPC shared memory. r=glandium
This commit also allows `memfd_create` in the seccomp-bpf policy for all
process types.

`memfd_create` is an API added in Linux 3.17 (and adopted by FreeBSD
for the upcoming version 13) for creating anonymous shared memory
not connected to any filesystem.  Supporting it means that sandboxed
child processes on Linux can create shared memory directly instead of
messaging a broker, which is unavoidably slower, and it should avoid
the problems we'd been seeing with overly small `/dev/shm` in container
environments (which were causing serious problems for using Firefox for
automated testing of frontend projects).

`memfd_create` also introduces the related operation of file seals:
irrevocably preventing types of modifications to a file.  Unfortunately,
the most useful one, `F_SEAL_WRITE`, can't be relied on; see the large
comment in `SharedMemory:ReadOnlyCopy` for details.  So we still use
the applicable seals as defense in depth, but read-only copies are
implemented on Linux by using procfs (and see the comments on the
`ReadOnlyCopy` function in `shared_memory_posix.cc` for the subtleties
there).

There's also a FreeBSD implementation, using `cap_rights_limit` for
read-only copies, if the build host is new enough to have the
`memfd_create` function.

The support code for Android, which doesn't support shm_open and can't
use the memfd backend because of issues with its SELinux policy (see bug
1670277), has been reorganized to reflect that we'll always use its own
API, ashmem, in that case.

Differential Revision: https://phabricator.services.mozilla.com/D90605
2020-10-22 21:23:32 +00:00
Dorel Luca
1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Dorel Luca
5d3bd01bca Backed out 2 changesets (bug 1440203) for Backout conflicts with Bug 1654103. CLOSED TREE
Backed out changeset 6e44c037b2dc (bug 1440203)
Backed out changeset ab11665d8607 (bug 1440203)
2020-10-22 03:47:17 +03:00
Dorel Luca
26941cf2f5 Backed out changeset 94ec15429e21 (bug 1672023) for Backout conflicts with Bug 1654103. CLOSED TREE 2020-10-22 03:43:01 +03:00
Jed Davis
61a83c3467 Bug 1440203 - Support memfd_create in IPC shared memory. r=glandium
This commit also allows `memfd_create` in the seccomp-bpf policy for all
process types.

`memfd_create` is an API added in Linux 3.17 (and adopted by FreeBSD
for the upcoming version 13) for creating anonymous shared memory
not connected to any filesystem.  Supporting it means that sandboxed
child processes on Linux can create shared memory directly instead of
messaging a broker, which is unavoidably slower, and it should avoid
the problems we'd been seeing with overly small `/dev/shm` in container
environments (which were causing serious problems for using Firefox for
automated testing of frontend projects).

`memfd_create` also introduces the related operation of file seals:
irrevocably preventing types of modifications to a file.  Unfortunately,
the most useful one, `F_SEAL_WRITE`, can't be relied on; see the large
comment in `SharedMemory:ReadOnlyCopy` for details.  So we still use
the applicable seals as defense in depth, but read-only copies are
implemented on Linux by using procfs (and see the comments on the
`ReadOnlyCopy` function in `shared_memory_posix.cc` for the subtleties
there).

There's also a FreeBSD implementation, using `cap_rights_limit` for
read-only copies, if the build host is new enough to have the
`memfd_create` function.

The support code for Android, which doesn't support shm_open and can't
use the memfd backend because of issues with its SELinux policy (see bug
1670277), has been reorganized to reflect that we'll always use its own
API, ashmem, in that case.

Differential Revision: https://phabricator.services.mozilla.com/D90605
2020-10-21 23:34:46 +00:00
Ricky Stewart
8b352f1843 Bug 1672023 - Remove excluded files from black.yml r=sylvestre,perftest-reviewers,geckoview-reviewers,agi
These files were omitted from the original patch because reformatting them required some manual intervention in order to avoid breaking unit tests. Generally the `noqa` lines were already there and just needed to be moved from one line to another (due to the reformatting by `black`), but sometimes `black` saw fit to move a bunch of stuff all onto one line, requiring me to introduce new `noqa` lines.

Besides the autoformat by `black` and some manual fixups, this patch contains no other changes.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94052
2020-10-21 21:29:30 +00:00
Ricky Stewart
50762dacab Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Mike Hommey
0848a4e73a Bug 1644624 - Pass LLVM flags from PROFILE_GEN_CFLAGS to the rust compiler. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D93729
2020-10-20 19:29:58 +00:00
Mike Hommey
6504260166 Bug 1672306 - Don't enable rust "global" LTO when cross LTO is enabled. r=firefox-build-system-reviewers,dmajor
This avoids a sort of duplication of work between both, because the
linker will eventually LTO-compile everything, so we technically don't
really need the extra step of the rust compiler doing an intermediate
LTO on the static libraries it produces.

Differential Revision: https://phabricator.services.mozilla.com/D94224
2020-10-21 01:20:48 +00:00
Cosmin Sabou
b8fd79f461 Backed out 5 changesets (bug 1644624, bug 1671555) for windows shippable bustage.
Backed out changeset fee83fc16940 (bug 1644624)
Backed out changeset afb2a7ff532c (bug 1671555)
Backed out changeset 609ac687f7e3 (bug 1644624)
Backed out changeset d91db0801099 (bug 1644624)
Backed out changeset ce09ad625b53 (bug 1644624)
2020-10-20 06:52:09 +03:00
Mike Hommey
7e240e7af2 Bug 1644624 - Pass LLVM flags from PROFILE_GEN_CFLAGS to the rust compiler. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D93729
2020-10-16 15:45:54 +00:00
Mike Hommey
5afb69830c Bug 1670156 - Use the same prefix/suffix for rust libraries on mingw builds. r=firefox-build-system-reviewers,dmajor
Rustc >= 1.44 changed the file names of the static libraries it
produces with -windows-gnu targets, to match that of mingw clang/gcc.

Considering we still build on 1.43, the best fix would be to derive the
prefix/suffix based on the version of rust, but that actually turns into
a hard-to-solve problem because of configure tests for bindgen also
depending on the prefix/suffix value to be known.

On the other hand, we're soon due to an update to 1.47, so the simpler
solution is to just push mingw builds to require 1.44 (settling for the
smallest upgrade possible for now) and to remove the split between C and
rust library prefix/suffixes.

Differential Revision: https://phabricator.services.mozilla.com/D93726
2020-10-16 16:06:19 +00:00
Narcis Beleuzu
d493d96032 Merge autoland to mozilla-central. a=merge 2020-10-20 00:37:32 +03:00
Mozilla Releng Treescript
1319f81f81 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-10-19 16:39:05 +00:00
Paulo Matias
4dd77eeb91 Bug 1671695 - Fix system icu build; r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D93847
2020-10-19 11:54:20 +00:00
Ricky Stewart
362abcf949 Bug 1670357 - Remove make targets for cleaning: clean, realclean, clobber, distclean, clobber_all, everything r=firefox-build-system-reviewers,mhentges
The `clobber` targets are superseded by `mach clobber`, so we don't need them for any reason. The `clean` target is meant to get you to a post-`configure` state, but it doesn't really work, and if it's necessary for you to be in that state for some reason you can just clobber and re-`configure`, so it doesn't seem worth it to get it working again. Instead, delete all of them. Also delete `everything` which is not useful when `clobber` doesn't exist.

Differential Revision: https://phabricator.services.mozilla.com/D93514
2020-10-15 20:37:18 +00:00
Razvan Maries
5fa72e54df Backed out 2 changesets (bug 1440203) for causing bug 1670277. CLOSED TREE
Backed out changeset 0b10bf76fe35 (bug 1440203)
Backed out changeset 468878422866 (bug 1440203)
2020-10-10 03:39:33 +03:00
Jed Davis
3680ce4b19 Bug 1440203 - Support memfd_create in IPC shared memory. r=glandium
This commit also allows `memfd_create` in the seccomp-bpf policy for all
process types.

`memfd_create` is an API added in Linux 3.17 (and adopted by FreeBSD
for the upcoming version 13) for creating anonymous shared memory
not connected to any filesystem.  Supporting it means that sandboxed
child processes on Linux can create shared memory directly instead of
messaging a broker, which is unavoidably slower, and it should avoid
the problems we'd been seeing with overly small `/dev/shm` in container
environments (which were causing serious problems for using Firefox for
automated testing of frontend projects).

`memfd_create` also introduces the related operation of file seals:
irrevocably preventing types of modifications to a file.  Unfortunately,
the most useful one, `F_SEAL_WRITE`, can't be relied on; see the large
comment in `SharedMemory:ReadOnlyCopy` for details.  So we still use
the applicable seals as defense in depth, but read-only copies are
implemented on Linux by using procfs (and see the comments on the
`ReadOnlyCopy` function in `shared_memory_posix.cc` for the subtleties
there).

There's also a FreeBSD implementation, using `cap_rights_limit` for
read-only copies, if the build host is new enough to have the
`memfd_create` function.

Differential Revision: https://phabricator.services.mozilla.com/D90605
2020-10-08 02:25:20 +00:00
Mike Hommey
cd3a2d5a79 Bug 1669633 - Remove MOZ_BUILD_ROOT. r=firefox-build-system-reviewers,andi,rstewart
It is only really used in js/src/devtools/rootAnalysis/Makefile.in,
and even there, the way it is used seems wrong, so fix that at the
same time (binaries have been linked into $DIST/bin directly for a
while).

Differential Revision: https://phabricator.services.mozilla.com/D92721
2020-10-07 17:57:38 +00:00
Mike Hommey
228e721068 Bug 1669442 - Fix dependency between libxul and mozgtk after bug 1573566. r=andi,dmajor
Bug 1573566 moved libxul from toolkit/library to toolkit/library/build,
and that should be reflected in config/recurse.mk.

It's amazing the race condition hasn't caused problems earlier than now.

Differential Revision: https://phabricator.services.mozilla.com/D92708
2020-10-07 12:17:56 +00:00
Razvan Maries
75a5750a87 Backed out 5 changesets (bug 1662564, bug 1664922, bug 1440203) for Valgrind bustages. CLOSED TREE
Backed out changeset 9366b15ee97c (bug 1440203)
Backed out changeset bb512f5fdeda (bug 1440203)
Backed out changeset be90d6aec690 (bug 1664922)
Backed out changeset f6527a1d0f14 (bug 1662564)
Backed out changeset 3a2941fa7d4b (bug 1662564)
2020-10-07 08:38:13 +03:00
Jed Davis
c4968e6653 Bug 1440203 - Support memfd_create in IPC shared memory. r=glandium
This commit also allows `memfd_create` in the seccomp-bpf policy for all
process types.

`memfd_create` is an API added in Linux 3.17 (and adopted by FreeBSD
for the upcoming version 13) for creating anonymous shared memory
not connected to any filesystem.  Supporting it means that sandboxed
child processes on Linux can create shared memory directly instead of
messaging a broker, which is unavoidably slower, and it should avoid
the problems we'd been seeing with overly small `/dev/shm` in container
environments (which were causing serious problems for using Firefox for
automated testing of frontend projects).

`memfd_create` also introduces the related operation of file seals:
irrevocably preventing types of modifications to a file.  Unfortunately,
the most useful one, `F_SEAL_WRITE`, can't be relied on; see the large
comment in `SharedMemory:ReadOnlyCopy` for details.  So we still use
the applicable seals as defense in depth, but read-only copies are
implemented on Linux by using procfs (and see the comments on the
`ReadOnlyCopy` function in `shared_memory_posix.cc` for the subtleties
there).

There's also a FreeBSD implementation, using `cap_rights_limit` for
read-only copies, if the build host is new enough to have the
`memfd_create` function.

Differential Revision: https://phabricator.services.mozilla.com/D90605
2020-10-06 19:20:29 +00:00
Christian Holler
0215dcbfc4 Bug 1659392 - Only enable rust fuzzing code with libFuzzer. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D87228
2020-08-18 13:32:15 +00:00