chromium-src-build/config/mac
Vlad Tsyrklevich 8b7555406c [CFI] Add protected memory container class
This change introduces a ProtectedMemory container class intended to
store dynamically resolved function pointers for cross-DSO calls that
must be exempted from Control Flow Integrity indirect call checking.
These function pointers can not be checked by cfi-icall, instead we
place them in read-only memory and set them writable only when they
need to be initialized.  ProtectedMemory is only suitable for
storing data in global/static variables, a follow-up change will
introduce a container class that allows dynamically allocating
multiple instances of a given type.

ProtectedMemory currently only works on Linux and macOS, its use is
a no-op on other platforms.

This change also introduces two helper macros to easily call function
pointers stored in ProtectedMemory containers without cfi-icall checks
applied in order to avoid sprinkling no_sanitize("cfi-icall") attributes
throughout the source code and encouraging its misuse.

Bug: 771365
Change-Id: Ic9433095d9550ae8478ad9931ec5e3c37edb23ec
Reviewed-on: https://chromium-review.googlesource.com/706859
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#515747}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 36d1a861ddf153756345ca1904a87c15504188fd
2017-11-10 23:50:23 +00:00
..
BUILD.gn [CFI] Add protected memory container class 2017-11-10 23:50:23 +00:00
BuildInfo.plist Fail to build with unbound Info.plist substitutions instead of silently dropping them. 2017-07-05 21:04:22 +00:00
OWNERS [DirectoryOwnership] Add TEAM/COMPONENT into OWNERS files. 2017-02-22 05:57:37 +00:00
base_rules.gni Add a compile_entitlements template on macOS/iOS. 2017-10-24 18:00:18 +00:00
compile_ib_files.py compile_ib_files.py: Handle non-zero ibtool return code. 2017-06-23 17:42:32 +00:00
mac_sdk.gni Remove mac_sdk_min_build_override. 2017-07-13 23:01:50 +00:00
mac_sdk_overrides.gni Reland "Bump macOS SDK to 10.12." 2017-08-02 21:13:14 +00:00
package_framework.py [Mac/GN] Re-do framework packaging to fix framework versioning. 2016-11-09 00:08:07 +00:00
plist_util.py Support both $() and ${} substitution in plist files. 2017-10-24 20:58:02 +00:00
prepare_framework_version.py [Mac/GN] Fix rebuilds when changing framework_version of a mac_framework_bundle. 2016-10-28 14:44:59 +00:00
rules.gni Convert iOS/macOS build to use bundle_contents_dir. 2017-09-22 07:47:00 +00:00
sdk_info.py Revert "Revert "[ios] Define integral version of gn variable xcode_version."" 2017-06-13 11:52:06 +00:00
symbols.gni Partially revert 8b0cda7f8d3f9a4f1d53c78600fb0c62c7eec7f9. 2016-08-11 12:15:17 +00:00
write_pkg_info.py Add support for generating PkgInfo for application bundle on iOS. 2016-12-09 16:08:27 +00:00
xcrun.py Clean up some GN/hermetic build changes. 2016-10-10 18:46:14 +00:00