Reland "[cfi-icall] Use ProtectedMemory for GetProcAddress"

This is a reland of d2cc1555dc5c28e34d0b56f8455a758ef76364e5 now that
crrev.com/00fb4b7ed96237cd71e7b81fd61b458f0c9c15b4 landed fixing the lock-up
issue we previously saw.

Original change's description:
> [cfi-icall] Use ProtectedMemory for GetProcAddress
>
> Control Flow Integrity [1] indirect call (cfi-icall) checking can not
> verify that dynamically resolved function pointers call their intended
> function. Instead we place the pointer for GLGetProcAddress in
> ProtectedMemory, a wrapper for keeping variables in read-only memory
> except for when they are initialized.  After setting the pointer in
> protected memory we can use the UnsanitizedCfiCall wrapper to disable
> cfi-icall checking when calling it since we know it can not be tampered
> with.
>
> [1] https://www.chromium.org/developers/testing/control-flow-integrity
>
> Bug: 771365
> Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
> Change-Id: Ia79c1cfab8e00f88bcc437c34cbb3012537c015a
> Reviewed-on: https://chromium-review.googlesource.com/769654
> Commit-Queue: Peter Collingbourne <pcc@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Peter Collingbourne <pcc@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#517208}

Bug: 771365
Change-Id: Id38d5ab1bb31547a62f92ee64679ea4ed57f7d44
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/783570
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518700}
GitOrigin-RevId: 4fc273839a160c7e4b43f4583aa4b8196ecff0fd
1 file changed
tree: 5d532c33fe0db2086e6ee72d6857592eab5ff6b3
  1. blacklist.txt
  2. blacklist_android.txt
  3. OWNERS