Revert "[cfi-icall] Refactor GL g_driver_* to be CFI-safe"
This reverts commit a71b54d8. Reason for revert: Breaking the Linux Debug NVidia bot. See crbug.com/795332 for more details. Original change's description: > [cfi-icall] Refactor GL g_driver_* to be CFI-safe > > Control Flow Integrity [1] indirect call (cfi-icall) checking can not > verify that dynamically resolved function pointers call their intended > function. To account for this, we place the function pointers in the > various g_driver_* structs in ProtectedMemory, a wrapper for keeping > variables in read-only memory except for when they are initialized. > Once they are set they can not be tampered with since the memory is set > back to read-only. > > The generated bindings in gl_bindings_autogen_*.cc are not aware of the > fact that their implementation is held in protected memory, so instead > of using base::UnsanitizedCfiCall() we mark the individual function > stubs with __attribute__((no_sanitize("cfi-icall"))) to disable icall > checks on the generated bindings since their function pointer calls > are routed through protected memory. > > [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: I6bbf1b9a4122e1d00f6d2a365ae3730b4bb95a73 > Reviewed-on: https://chromium-review.googlesource.com/770252 > Commit-Queue: Peter Collingbourne <pcc@chromium.org> > Reviewed-by:Dan Sanders <sandersd@chromium.org> > Reviewed-by:
Dale Curtis <dalecurtis@chromium.org> > Reviewed-by:
Peter Collingbourne <pcc@chromium.org> > Reviewed-by:
Daniel Cheng <dcheng@chromium.org> > Reviewed-by:
Kenneth Russell <kbr@chromium.org> > Cr-Commit-Position: refs/heads/master@{#524318} TBR=dcheng@chromium.org,dalecurtis@chromium.org,kbr@chromium.org,sandersd@chromium.org,pcc@chromium.org,vtsyrklevich@chromium.org Change-Id: Ib4a1eae5e9f01f5e9ddbb1fcc5c66fc0b91f1015 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 771365, 795332 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/830173 Reviewed-by:
Eric Karl <ericrk@chromium.org> Commit-Queue: Eric Karl <ericrk@chromium.org> Cr-Commit-Position: refs/heads/master@{#524411}
Loading
Please register or sign in to comment