Граф коммитов

1621 Коммитов

Автор SHA1 Сообщение Дата
Noemi Erli 67edd199af Backed out changeset 0ca845833464 (bug 1688062) for causinf Android Webrender bustages CLOSED TREE 2021-02-27 14:15:09 +02:00
Agi Sferro b69e57d56f Bug 1688062 - Update target SDK to API 30. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D106556
2021-02-26 21:45:15 +00:00
Dorel Luca 0875c78fec Backed out changeset 0e3e3b8a55b4 (bug 1688062) for Linting failure in java/org/mozilla/gecko/GeckoAppShell.java. CLOSED TREE 2021-02-26 19:02:12 +02:00
Agi Sferro c0dc6e84b0 Bug 1688062 - Update target SDK to API 30. r=esawin
Differential Revision: https://phabricator.services.mozilla.com/D106556
2021-02-26 16:34:02 +00:00
Mike Hommey 1afcdbc6aa Bug 1693725 - Make --enable-bootstrap install missing toolchains. r=firefox-build-system-reviewers,andi,sheehan,mhentges
This means --enable-bootstrap now is the same as what
--enable-bootstrap=install currently does. --enable-bootstrap=install is at the
same time desupported.
We also remove --enable-bootstrap=update, which is not worth supporting.

Differential Revision: https://phabricator.services.mozilla.com/D105719
2021-02-24 02:13:10 +00:00
Mike Hommey 34ada26a0e Bug 1693723 - Avoid bootstrapping when an explicit path is given for tools. r=firefox-build-system-reviewers,mhentges
This changes things such that setting e.g. NASM=/usr/bin/nasm will avoid
bootstrapping nasm even when bootstrapping is enabled.

This is not applied to CC/CXX/HOST_CC/HOST_CXX because things are more
complicated.

This also simplifies how check_prog is called for a bootstrapped tool,
and avoids the repetition of when.

CBINDGEN handling needs the pattern being applied manually because it
currently doesn't use check_prog. Once --enable-bootstrap=install
becomes the default on developer builds, it will be possible to simplify
this.

Differential Revision: https://phabricator.services.mozilla.com/D105718
2021-02-24 02:01:33 +00:00
Mike Hommey dfb8c396a6 Bug 1693723 - Pass bootstrap path in one piece to bootstrap_{,search_}path. r=firefox-build-system-reviewers,andi,mhentges
It will make upcoming changes simpler.

Differential Revision: https://phabricator.services.mozilla.com/D105717
2021-02-24 02:01:32 +00:00
Mike Hommey 6f57e893ff Bug 1694344 - Fix --with-ccache after bug 1693689. r=firefox-build-system-reviewers,sheehan,mhentges
Because --with-ccache without a value fulfills a @depends_if, we need to
check for the length. And because we check the length, we can just use a
@depends.

Differential Revision: https://phabricator.services.mozilla.com/D106084
2021-02-23 20:52:00 +00:00
Mike Hommey 23f4404e5f Bug 1693689 - Avoid bootstrapping toolchains unless needed. r=firefox-build-system-reviewers,andi,sheehan,mhentges
- Only bootstrap sccache when building with --with-ccache=sccache or
  CCACHE=sccache
- Don't bootstrap dump_syms or nasm on builds that don't compile

Differential Revision: https://phabricator.services.mozilla.com/D105704
2021-02-23 03:34:04 +00:00
Mike Hommey fbbe02d958 Bug 1692940 - Remove build system support for yasm. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D105432
2021-02-23 01:26:46 +00:00
Mike Hommey 5479923a50 Bug 1692940 - Change the logic to check for nasm. r=firefox-build-system-reviewers,dmajor
Instead of preemptively check for it, and then check if it's good enough to
build AV1, only check for (and bootstrap) nasm when building AV1 requires
it.

At the same time, we future-proof the code to be able to handle multiple
things requiring nasm, which we're going to add shortly.

Differential Revision: https://phabricator.services.mozilla.com/D105425
2021-02-23 01:26:43 +00:00
Mike Hommey d7cb5b686b Bug 1692940 - Revert bug 1508419. r=firefox-build-system-reviewers,andi,dmajor
Back when bug 1508419 landed, we weren't using a bootstrapped nasm. It
is less useful now that we are.

Differential Revision: https://phabricator.services.mozilla.com/D105424
2021-02-23 01:26:43 +00:00
Mike Hommey e7f8314703 Bug 1693717 - Remove paths_have_priority argument to check_prog. r=firefox-build-system-reviewers,andi,sheehan,mhentges
It hasn't been used since bug 1482435.

Differential Revision: https://phabricator.services.mozilla.com/D105715
2021-02-22 22:20:42 +00:00
Aaron Klotz a16fdc090e Bug 1581971: Part 7 - Fix path quirk with x86 lldb-server detection; r=bustage CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D105836
2021-02-19 22:32:10 +00:00
Aaron Klotz 9ed94dd8f0 Bug 1581971: Part 2 - Add configure support for lldb-server on Android; r=firefox-build-system-reviewers,mhentges
We want to find the full path to the correct `lldb-server` in the NDK.
We reference this variable in a later patch when preparing the device for
debugging.

Differential Revision: https://phabricator.services.mozilla.com/D94380
2021-02-19 21:07:18 +00:00
Mike Hommey fa35a4b8c7 Bug 1692939 - Turn namespace() into a builtin in python configure. r=firefox-build-system-reviewers,mhentges
This removes the need for some --help dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D105263
2021-02-18 22:44:40 +00:00
Mike Hommey 5e19605601 Bug 1692939 - Add sorted() as an allowed builtin in python configure. r=firefox-build-system-reviewers,mhentges
It has no side effects and is safe to use in the configure sandbox.

Differential Revision: https://phabricator.services.mozilla.com/D105262
2021-02-18 22:44:39 +00:00
Mike Hommey 7190ea756d Bug 1563571 - Still try lld when the compiler can't find a linker on its own. r=firefox-build-system-reviewers,andi,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D104964
2021-02-16 21:24:53 +00:00
Mike Hommey 008596f701 Bug 1692945 - Remove unused [YN]ASM variables. r=firefox-build-system-reviewers,andi,dmajor
None of HAVE_NASM, HAVE_YASM, NASM_MAJOR_VERSION and NASM_MINOR_VERSION are
used. Also, the YASM variable is not necessary for old-configure anymore.

Differential Revision: https://phabricator.services.mozilla.com/D105269
2021-02-16 21:17:06 +00:00
Mitchell Hentges a3eb85e571 Bug 1687980: Make macOS quickstart docs more concise r=sylvestre,mhoye
* Puts the docs in order, so that contributors aren't jumping to the
  middle of the page to install system tools, then back to the top to
  clone Firefox.
* Removes docs on MacPorts since it's being removed in bug 1688263.
* Removes step to manually install brew packages since that happens
   automatically in bootstrap now.
* Simplifies mercurial installation docs
* Removes unnecessary mozconfig-tweaking instructions
* Removes almost-always-unnecessary DEFINE and troubleshooting
  information.

Differential Revision: https://phabricator.services.mozilla.com/D102973
2021-02-16 17:48:11 +00:00
Mike Hommey 5f86b697af Bug 1692137 - Allow local linux builds to use a bootstrapped sysroot. r=firefox-build-system-reviewers,andi,mhentges
Bug 1690930 added sysroots that can be bootstrapped. With this change,
we allow --enable-bootstrap=install to pull the right sysroot for the
configured target, and --enable-bootstrap to update it if it was already
there.

Differential Revision: https://phabricator.services.mozilla.com/D104797
2021-02-12 20:31:49 +00:00
David Major 1499c8a490 Bug 1692234 - Allow new pass manager with ubsan on clang 10.0.1+ r=firefox-build-system-reviewers,mhentges
The hang in 10.0.0 was fixed in trunk 11 and backported to 10.0.1.

Differential Revision: https://phabricator.services.mozilla.com/D104836
2021-02-11 17:13:09 +00:00
Mike Hommey 49a54d790b Bug 1689284 - Default to opt-level=2 for Rust code. r=firefox-build-system-reviewers,sheehan,mhentges
We used to only push to opt-level=2 on --enable-release builds, to make
local builds faster with opt-level=1. Years later, it seems opt-level=2 makes no noticeable
difference in build times vs. opt-level=1, neither on my Threadripper
workstation at -j64 or my M1 Macbook Air at -j4.

That's one less difference to carry.

Differential Revision: https://phabricator.services.mozilla.com/D103266
2021-01-28 16:47:37 +00:00
Kevin Jacobs f9716bc8ab Bug 1688685 - land NSS 92dcda94c1d4 UPGRADE_NSS_RELEASE, r=bbeurdouche
2021-01-22  Kevin Jacobs  <kjacobs@mozilla.com>

	* automation/abi-check/previous-nss-release, lib/nss/nss.h,
	lib/softoken/softkver.h, lib/util/nssutil.h:
	Set version numbers to 3.62 Beta
	[680ec01577b9]

2021-01-23  Kevin Jacobs  <kjacobs@mozilla.com>

	* tests/chains/scenarios/nameconstraints.cfg,
	tests/libpkix/certs/NameConstraints.ipaca.cert,
	tests/libpkix/certs/NameConstraints.ocsp1.cert:
	Bug 1686134 - Renew two chains libpkix test certificates. r=rrelyea

	[3ddcd845704c]

2021-01-25  Kevin Jacobs  <kjacobs@mozilla.com>

	* gtests/common/testvectors/hpke-vectors.h,
	gtests/pk11_gtest/pk11_hpke_unittest.cc, lib/pk11wrap/pk11hpke.c,
	lib/pk11wrap/pk11hpke.h, lib/pk11wrap/pk11pub.h:
	Bug 1678398 - Update HPKE to draft-07. r=mt

	This patch updates HPKE to draft-07. A few other minor changes are
	included:
	- Refactor HPKE gtests for increased parameterized testing.
	- Replace memcpy calls with PORT_Memcpy
	- Serialization tweaks to make way for context Export/Import (D99277).

	This should not be landed without an ECH update, as fixed ECH test
	vectors will otherwise fail to decrypt.

	[e0bf8cadadc7]

	* automation/abi-check/expected-report-libnss3.so.txt,
	gtests/pk11_gtest/pk11_hpke_unittest.cc, lib/nss/nss.def,
	lib/pk11wrap/pk11hpke.c, lib/pk11wrap/pk11pub.h:
	Bug 1678398 - Add Export/Import functions for HPKE context. r=mt

	This patch adds and exports two new HPKE functions:
	`PK11_HPKE_ExportContext` and `PK11_HPKE_ImportContext`, which are
	used to export a serialized HPKE context, then later reimport that
	context and resume Open and Export operations. Only receiver
	contexts are currently supported for export (see the rationale in
	pk11pub.h).

	One other change introduced here is that `PK11_HPKE_GetEncapPubKey`
	now works as expected on the receiver side.

	If the `wrapKey` argument is provided to the Export/Import
	functions, then the symmetric keys are wrapped with AES Key Wrap
	with Padding (SP800-38F, 6.3) prior to serialization.

	[8bcd12ab3b34]

	* automation/abi-check/expected-report-libssl3.so.txt,
	gtests/ssl_gtest/libssl_internals.c,
	gtests/ssl_gtest/libssl_internals.h,
	gtests/ssl_gtest/ssl_extension_unittest.cc,
	gtests/ssl_gtest/tls_ech_unittest.cc, lib/ssl/ssl3con.c,
	lib/ssl/ssl3ext.c, lib/ssl/ssl3ext.h, lib/ssl/sslexp.h,
	lib/ssl/sslimpl.h, lib/ssl/sslsecur.c, lib/ssl/sslsock.c,
	lib/ssl/sslt.h, lib/ssl/tls13con.c, lib/ssl/tls13con.h,
	lib/ssl/tls13ech.c, lib/ssl/tls13ech.h, lib/ssl/tls13exthandle.c,
	lib/ssl/tls13exthandle.h, lib/ssl/tls13hashstate.c,
	lib/ssl/tls13hashstate.h:
	Bug 1681585 - Update ECH to Draft-09. r=mt

	This patch updates ECH implementation to draft-09. Changes of note
	are:

	- Acceptance signal derivation is now based on the handshake secret.
	- `config_id` hint changes from 32B to 8B, trial decryption added on
	the server.
	- Duplicate code in HRR cookie handling has been consolidated into
	`tls13_HandleHrrCookie`.
	- `ech_is_inner` extension is added, which causes a server to indicate
	ECH acceptance.
	- Per the above, support signaling ECH acceptance when acting as a
	backend server in split-mode (i.e. when there is no other local
	Encrypted Client Hello state).

	[ed07a2e2a124]

2021-01-24  Kevin Jacobs  <kjacobs@mozilla.com>

	* cmd/selfserv/selfserv.c:
	Bug 1681585 - Add ECH support to selfserv. r=mt

	Usage example: mkdir dbdir && cd dbdir certutil -N -d . certutil -S
	-s "CN=ech-public.com" -n ech-public.com -x -t "C,C,C" -m 1234 -d .
	certutil -S -s "CN=ech-private-backend.com" -n ech-private-
	backend.com -x -t "C,C,C" -m 2345 -d . ../dist/Debug/bin/selfserv -a
	ech-public.com -a ech-private-backend.com -n ech-public.com -n ech-
	private-backend.com -p 8443 -d dbdir/ -X publicname:ech-public.com
	(Copy echconfig from selfserv output and paste into the below
	command) ../dist/Debug/bin/tstclnt -D -p 8443 -v -A
	tests/ssl/sslreq.dat -h ech-private-backend.com -o -N <echconfig> -v

	[92dcda94c1d4]

Differential Revision: https://phabricator.services.mozilla.com/D102982
2021-01-26 15:30:01 +00:00
Mike Hommey 66a79a59fe Bug 1553230 - Allow to opt-in to automatically update some bootstrapped toolchains. r=firefox-build-system-reviewers,nalexander,mhentges
This adds a --enable-bootstrap build flag that will automatically update
cbindgen, node, clang, sccache, nasm, wine, lucetc, dump_syms, pdbstr,
and winchecksec if they are already installed in ~/.mozbuild.

Eventually, we'll want to allow to install toolchains that weren't
already install, but one step at a time.

This explicitly doesn't cover rustc, which is its own can of worms, or
android-{ndk,sdk}, which are not installed via toolchain artifacts
currently.

Differential Revision: https://phabricator.services.mozilla.com/D101723
2021-01-15 22:15:51 +00:00
Mike Hommey 4ed35480e2 Bug 1686646 - Look for more tools in MOZ_FETCHES_DIR. r=firefox-build-system-reviewers,dmajor
This will allow to find them on automation without setting anything in
mozconfigs.

Differential Revision: https://phabricator.services.mozilla.com/D101720
2021-01-15 04:33:01 +00:00
Mike Hommey 8362a57bed Bug 1686646 - Use more targeted search paths for each tool. r=firefox-build-system-reviewers,dmajor
Instead of adding all possible tool paths from ~/.mozbuild, we only
add the relevant paths for each of the tools we search for.

Differential Revision: https://phabricator.services.mozilla.com/D101718
2021-01-15 04:26:05 +00:00
Mike Hommey de6099304e Bug 1686646 - Separate out Rust compiler search path. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D101717
2021-01-15 04:26:03 +00:00
Mike Hommey 22956f8151 Bug 1686646 - Separate out MSVC compiler search path. r=firefox-build-system-reviewers,dmajor
We don't need to check the MSVC compiler directory for more than a few
programs.

Differential Revision: https://phabricator.services.mozilla.com/D101716
2021-01-15 04:26:01 +00:00
Mike Hommey 2033eb7bed Bug 1686646 - Remove host_toolchain_search_path. r=firefox-build-system-reviewers,dmajor
The only thing that varies between toolchain_search_path and
host_toolchain_search_path is the path to the MSVC C/C++ compiler and
tools, because MSVC has a different compiler for each platform, and host
and target platforms may differ (when e.g. compiling for arm64 on
x86_64).

However, we don't use the MSVC compiler anymore, and the only thing we
use its path for is the assembler, which we don't use for host things
(and we don't have a HOST_AS), and to derive the path to some system
headers/SDK.

Differential Revision: https://phabricator.services.mozilla.com/D101714
2021-01-15 04:25:56 +00:00
Mike Hommey ea136c68b4 Bug 1686646 - Move --enable-release and DEVELOPER_OPTIONS to top-level moz.configure. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D101713
2021-01-15 04:25:54 +00:00
Mike Hommey a9c5e28258 Bug 1480005 - Move NM to python configure. r=firefox-build-system-reviewers,nalexander
There is only one place where it's used:
config/check_vanilla_allocations.py, which is only executed from
js/src/build/Makefile.in on the condition that the build is targeting
Linux and not LTO. But the LTO test is actually outdated, because we
don't build with `-flto`, but `-flto=thin`, so the exclusion doesn't
work anymore.

There is however no AC_CHECK_PROG, and we currently rely on NM to be
given, or fall back to "nm", which works in most cases, except LTO with
clang. It works on CI because in LTO builds we explicitly set NM to
llvm-nm (which can output symbols from LLVM bitcode objects), but we
could also do that automatically.

So we add a full detection of nm/llvm-nm to python configure, and limit
it to Linux, since we only ever use it there.

Differential Revision: https://phabricator.services.mozilla.com/D101681
2021-01-14 20:17:08 +00:00
Mike Hommey 647145eef9 Bug 1480005 - Look for llvm-ar for AR when compiling with clang. r=firefox-build-system-reviewers,nalexander
And stop setting AR to llvm-ar in mozconfigs.

Differential Revision: https://phabricator.services.mozilla.com/D101679
2021-01-14 03:41:39 +00:00
Mike Hommey a160c92089 Bug 1480005 - Always use llvm-lib when targetting Windows. r=firefox-build-system-reviewers,dmajor
The linker is always lld-link, as we don't support MSVC anymore, so the
fallback to "lib" is never used.

Differential Revision: https://phabricator.services.mozilla.com/D101678
2021-01-14 15:41:30 +00:00
Rob Wu 2506b7584c Bug 1680862 - Use fixed cwd in old.configure for m4 includes r=mhentges
js/src/aclocal.m4 contains includes starting with `../../`.
As explained in https://bugzilla.mozilla.org/show_bug.cgi?id=1680862#c8,
m4 will first try to resolve this path relative to the working directory
and only if that path doesn't exists, fall back to the location set by
`localdir` (from `-I`).

The working directory is usually MOZ_OBJDIR, an immediate subdirectory
of topsrcdir, so `../../` resolves to a location outside of topsrcdir.
Usually, that path does not exist, and m4 falls back to `localdir` that
was passed via `-I`.

But if that path existed and is incompatible with the current Gecko
checkout, then the build will fail (see bug report). To prevent this
from happening, this patch fixes the working directory to `localdir`,
so that m4 will immediately find the expected file.

Differential Revision: https://phabricator.services.mozilla.com/D101500
2021-01-14 18:15:12 +00:00
Mitchell Hentges e7b2115e00 Bug 1685353: Disable -Woverloaded-virtual for GCC r=firefox-build-system-reviewers,sheehan,andi,glandium
In addition to warning on regular methods overloading virtual functions,
GCC also watches for static functions doing such overloads.
:andi confirmed that this is not valuable, so the warning is being
disabled for GCC.

Differential Revision: https://phabricator.services.mozilla.com/D101367
2021-01-12 14:18:22 +00:00
Mitchell Hentges 34e20029c0 Bug 1683213: Don't warn on range-loop-analysis r=sheehan,sg,firefox-build-system-reviewers,andi,glandium
As described in
https://quuxplusone.github.io/blog/2020/08/26/wrange-loop-analysis/
range-loop-analysis warnings sometimes recommend inferior code.

Also removes pragmas that manually disable this warning.

Differential Revision: https://phabricator.services.mozilla.com/D100155
2021-01-11 15:30:45 +00:00
Connor Sheehan 0005a8060d Bug 1684914: stop passing `-flto=thin` to gcc since it doesn't actually work r=glandium,mhentges
Passing `-flto=thin` worked previously but the value passed was just ignored
and full lto was performed. On newer versions of gcc passing an unknown value
causes failure. So this commit checks if `-flto=thin` is passed and fails with
an error message if so, else full lto is enabled if any other value is passed.

Differential Revision: https://phabricator.services.mozilla.com/D100953
2021-01-08 15:54:54 +00:00
Sylvestre Ledru fe296c0858 Bug 1588710 - stack-clash-protection: enable when clang 11.0.1 is used r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D99759
2021-01-08 02:39:50 +00:00
Sylvestre Ledru 760d13f141 Bug 1588710 - Linux/Android: enable -fstack-clash-protection r=tjr,firefox-build-system-reviewers,glandium
This is a new feature in clang (already existing in gcc) provided from version 11.

Not usefull on Mac & Windows and is supported on intel cpu + ppc64 + s390x
https://releases.llvm.org/11.0.0/tools/clang/docs/ReleaseNotes.html#new-compiler-flags

Fedora/Redhat would like to have this option to move from gcc to clang in these
distros.

More on this:
https://blog.qualys.com/vulnerabilities-research/2017/06/19/the-stack-clash
https://pagure.io/fesco/issue/2020
https://reviews.llvm.org/D68720
https://www.phoronix.com/scan.php?page=news_item&px=LLVM-Stack-Clash-Protection-20

It seems that the performance impact is neglible:
https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=a47c98b909b61035dae2e1e00883f2ade0fef129&newProject=try&newRevision=62108fa48bd15fe01f1a0f1ffab133af9b4207cc&framework=13

Differential Revision: https://phabricator.services.mozilla.com/D95999
2021-01-07 16:40:09 +00:00
Bogdan Tara 0f44fec2ac Backed out changeset 9d5f4c9e6fdf (bug 1683213) for nsReadableUtils related bustage CLOSED TREE 2021-01-04 17:44:33 +02:00
Mitchell Hentges e370b9e0e8 Bug 1677994: Clarify that configure executes progs without using shell r=firefox-build-system-reviewers,dmajor,glandium
Some distros include flags when they specify the location of a binary,
such as: `XARGS=xargs -r`.
This was confusing in `configure`, since:
* We require that environment variables contain only path
  overrides (without flags).
* The error message thrown when configure chokes was unclear: "why
  would `$ xargs -r` fail?"

This patch should make our "path-only" requirement more clear.

Differential Revision: https://phabricator.services.mozilla.com/D100044
2021-01-04 15:18:33 +00:00
Mitchell Hentges 08adbab5c3 Bug 1683213: Don't warn on range-loop-analysis for clang < 10 r=sheehan,sg,firefox-build-system-reviewers,andi,glandium
Old clang shakes its fist when `auto&& item : range` is used with a
range
that returns values instead of references.
Modern `clang` doesn't warn for this scenario, so we disable the
warning.

Also removes pragmas that manually disable this warning.

Differential Revision: https://phabricator.services.mozilla.com/D100155
2021-01-04 15:15:46 +00:00
Emilio Cobos Álvarez 6f642487cb Bug 1684380 - Fix some configure error code paths. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D100508
2020-12-29 04:24:49 +00:00
Emilio Cobos Álvarez 78414576b9 Bug 1684350 - Update cbindgen to 0.16.0. r=andi
I was waiting for a better reason to do this, because the cbindgen
changes from 0.15.0 to 0.16.0 don't break trunk builds. But since
downstream has updated (see bug 1684180) and there's no reason not to,
let's do this to avoid future churn.

Differential Revision: https://phabricator.services.mozilla.com/D100499
2020-12-28 13:42:06 +00:00
Kevin Jacobs 1eb47f6133 Bug 1684061 - land NSS 97ef009f7a78 UPGRADE_NSS_RELEASE, r=bbeurdouche
2020-12-11  Kevin Jacobs  <kjacobs@mozilla.com>

	* automation/abi-check/expected-report-libssl3.so.txt, automation/abi-
	check/previous-nss-release, lib/nss/nss.h, lib/softoken/softkver.h,
	lib/util/nssutil.h:
	Set version numbers to 3.61 Beta
	[f277d2674c80]

	* gtests/<...>
	Bug 1677207 - Update Google Test to release-1.10.0 r=bbeurdouche

	./gtests/google_test/update.sh release-1.10.0 && hg remove -A && hg
	add gtests/google_test/*

	[89141382df45]

	* gtests/<...>
	Bug 1677207 - Replace references to TestCase, which is deprecated,
	with TestSuite r=bbeurdouche

	grep -rl --exclude-dir=google_test INSTANTIATE_TEST_CASE_P gtests |
	xargs sed -i '' s/INSTANTIATE_TEST_CASE_P/INSTANTIATE_TEST_SUITE_P/g
	grep -rl --exclude-dir=google_test SetUpTestCase gtests | xargs sed
	-i '' s/SetUpTestCase/SetUpTestSuite/g

	[e15b78be87fa]

	* gtests/ssl_gtest/ssl_ciphersuite_unittest.cc,
	gtests/ssl_gtest/ssl_debug_env_unittest.cc,
	gtests/ssl_gtest/ssl_extension_unittest.cc,
	gtests/ssl_gtest/ssl_loopback_unittest.cc,
	gtests/ssl_gtest/ssl_renegotiation_unittest.cc,
	gtests/ssl_gtest/ssl_resumption_unittest.cc,
	gtests/ssl_gtest/ssl_version_unittest.cc,
	gtests/ssl_gtest/tls_ech_unittest.cc:
	Bug 1677207 - Use GTEST_SKIP in ssl_gtests. r=bbeurdouche

	[0772f1bf5fd6]

2020-12-17  Robert Relyea  <rrelyea@redhat.com>

	* gtests/common/testvectors/ike-aesxcbc-vectors.h,
	gtests/common/testvectors/ike-sha1-vectors.h,
	gtests/common/testvectors/ike-sha256-vectors.h,
	gtests/common/testvectors/ike-sha384-vectors.h,
	gtests/common/testvectors/ike-sha512-vectors.h,
	gtests/common/testvectors_base/test-structs.h,
	gtests/pk11_gtest/manifest.mn, gtests/pk11_gtest/pk11_gtest.gyp,
	gtests/pk11_gtest/pk11_ike_unittest.cc, lib/softoken/sftkike.c:
	Bug 1682071 IKE Quick mode IPSEC give you incorrect keys if you are
	asking for keys smaller than the hash size.

	IKE Appendix B fixes.

	This patch fixes 2 problems.

	 If you run either ike v1 App B or quick mode asking for a key with
	length

	mod macsize = 0, you will generate an extra block that's not used
	and overwrites the end of the buffer.

	 If you use quick mode, the function incorrectly subsets the
	existing key

	rather than generating a new key. This is correct behavior for
	Appendix B, where appendix B is trying to take a generated key and
	create a new longer key (with no diversification, just transform the
	key into something that's longer), so if you ask for a key less than
	or equal to, then you want to just subset the original key. In quick
	mode you are taking a base key and creating a set of new keys based
	on additional data, so you want to subset the generated data. This
	patch only subsets the original key if you aren't doing quickmode.

	Full test vectors have now been added for all ike modes in this
	patch as well (previously we depended on the FIPS CAVS tests to test
	ike, which covers basic IKEv1, IKEv1_psk, and IKEv2 but not IKEv1
	App B and IKE v1 Quick mode).

	[f4995c9fa185]

2020-12-18  Robert Relyea  <rrelyea@redhat.com>

	* gtests/common/testvectors/rsa_pkcs1_2048_test-vectors.h,
	gtests/common/testvectors/rsa_pkcs1_3072_test-vectors.h,
	gtests/common/testvectors/rsa_pkcs1_4096_test-vectors.h,
	gtests/freebl_gtest/Makefile, gtests/freebl_gtest/manifest.mn,
	gtests/freebl_gtest/rsa_unittest.cc, gtests/manifest.mn,
	gtests/pk11_gtest/pk11_rsaencrypt_unittest.cc,
	gtests/pk11_gtest/pk11_rsaoaep_unittest.cc, lib/freebl/alghmac.c,
	lib/freebl/alghmac.h, lib/freebl/rsapkcs.c:
	Bug 1651411 New tlsfuzzer code can still detect timing issues in RSA
	operations.

	This patch defeats Bleichenbacher by not trying to hide the size of
	the decrypted text, but to hide if the text succeeded for failed.
	This is done by generating a fake returned text that's based on the
	key and the cipher text, so the fake data is always the same for the
	same key and cipher text. Both the length and the plain text are
	generated with a prf.

	Here's the proposed spec the patch codes to:

	 1. Use SHA-256 to hash the private exponent encoded as a big-
	endian integer to a string the same length as the public modulus.
	Keep this value secret. (this is just an optimisation so that the
	implementation doesn't have to serialise the key over and over
	again) 2. Check the length of input according to step one of
	https://tools.ietf.org/html/rfc8017#section-7.2.2 3. When provided
	with a ciphertext, use SHA-256 HMAC(key=hash_from_step1,
	text=ciphertext) to generate the key derivation key 4. Use SHA-256
	HMAC with key derivation key as the key and a two-byte big- endian
	iterator concatenated with byte string "length" with the big- endian
	representation of 2048 (0x0800) as the bit length of the generated
	string.
	      - Iterate this PRF 8 times to generate a 256 byte string 5. initialise
	the length of synthetic message to 0 6. split the PRF output into 2
	byte strings, convert into big-endian integers, zero- out high-order
	bits so that they have the same bit length as the octet length of
	the maximum acceptable message size (k-11), select the last integer
	that is no larger than (k-11) or remain at 0 if no integer is
	smaller than (k-11); this selection needs to be performed using a
	side-channel free operators 7. Use SHA-256 HMAC with key derivation
	key as the key and a two-byte big-endian iterator concatenated with
	byte string "message" with the big-endian representation of k*8
	      - use this PRF to generate k bytes of output (right-truncate last HMAC
	call if the number of generated bytes is not a multiple of SHA-256
	output size) 8. perform the RSA decryption as described in step 2 of
	section 7.2.2 of rfc8017 9. Verify the EM message padding as
	described in step 3 of section 7.2.2 of rfc8017, but instead of
	outputting "decryption error", return the last l bytes of the
	"message" PRF, when l is the selected synthetic message length using
	the "length" PRF, make this decision and copy using side-channel
	free operation

	[fc05574c7399]

2020-12-22  Robert Relyea  <rrelyea@redhat.com>

	* gtests/freebl_gtest/rsa_unittest.cc,
	gtests/pk11_gtest/pk11_rsaoaep_unittest.cc, lib/freebl/alghmac.c,
	lib/freebl/rsapkcs.c:
	Restore lost portion of the bleichenbacher timing batch that
	addressed review comments. All the review comments pertained to
	actual code comments, so this patch only affects the comments.
	[fcebe146314e]

2020-12-22  Kevin Jacobs  <kjacobs@mozilla.com>

	* lib/dev/devslot.c:
	Bug 1682863 - Revert nssSlot_IsTokenPresent to 3.58 after ongoing Fx
	hangs with slow PKCS11 devices. r=bbeurdouche

	This patch reverts the `nssSlot_IsTokenPresent` changes made in bug
	1663661 and bug 1679290, restoring the version used in NSS 3.58 and
	earlier. It's not an actual `hg backout` because the comment in
	lib/dev/devt.h is worth keeping. While removing the nested locking
	did resolve the hang for some (most?) third-party modules, problems
	remain with some slower tokens after an even further relaxation of
	the locking, which defeats the purpose of addressing the races in
	the first place.

	The crash addressed by these patches was caused by the Intermediate
	Preloading Healer in Firefox, which has been disabled. We clearly
	have insufficient test coverage for third-party modules, and now
	that osclientcerts is enabled in Fx Nightly, any problems caused by
	these and similar changes is unlikely to be reported until Fx Beta,
	well after NSS RTM. I think the best option at this point is to
	simply revert NSS.

	[97ef009f7a78] [tip]

Differential Revision: https://phabricator.services.mozilla.com/D100401
2020-12-23 19:54:31 +00:00
Sebastian Hengst a3e7021190 Backed out 2 changesets (bug 1588710) for frequent crashes on Linux x64 debug affecting Try pushes (bug 1679994). a=backout
Backed out changeset f0b02db01894 (bug 1588710)
Backed out changeset e45001cddaf4 (bug 1588710)
2020-12-16 11:58:47 +01:00
Dave Townsend dca627418f Bug 1682608: Allow building with macOS SDK 11.1. r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D99819
2020-12-15 23:45:06 +00:00
Sylvestre Ledru e69fa3515b Bug 1588710 - Linux/Android: enable -fstack-clash-protection r=tjr,firefox-build-system-reviewers,glandium
This is a new feature in clang (already existing in gcc) provided from version 11.

Not usefull on Mac & Windows and is supported on intel cpu + ppc64 + s390x
https://releases.llvm.org/11.0.0/tools/clang/docs/ReleaseNotes.html#new-compiler-flags

Fedora/Redhat would like to have this option to move from gcc to clang in these
distros.

More on this:
https://blog.qualys.com/vulnerabilities-research/2017/06/19/the-stack-clash
https://pagure.io/fesco/issue/2020
https://reviews.llvm.org/D68720
https://www.phoronix.com/scan.php?page=news_item&px=LLVM-Stack-Clash-Protection-20

It seems that the performance impact is neglible:
https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=a47c98b909b61035dae2e1e00883f2ade0fef129&newProject=try&newRevision=62108fa48bd15fe01f1a0f1ffab133af9b4207cc&framework=13

Differential Revision: https://phabricator.services.mozilla.com/D95999
2020-12-14 16:02:52 +00:00
Christian Holler a0ed2c7425 Bug 1680837 - Fix libFuzzer gyp flags for nICEr. r=dmajor
The gyp flag logic in nICEr is supposed to ensure that the code is instrumented
for libFuzzer because we have a related fuzzing target. However, libFuzzer
instrumentation must be completely disabled for TSan due to incompatibility.
The current logic fails in doing so and incorrectly falls back to legacy
trace-pc instrumentation causing the TSan fuzzing build to fail on startup.

Differential Revision: https://phabricator.services.mozilla.com/D99351
2020-12-10 18:29:11 +00:00