Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Issue 2259293002: Enable CFI for virtual calls on Linux x86-64 official builds. (Closed)

Created:
4 years, 4 months ago by krasin
Modified:
4 years, 4 months ago
Reviewers:
Dirk Pranke, esprehn
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable CFI for virtual calls on Linux x86-64 official builds. This is the second incremental step towards the full CFI launch. In the first step, we enabled LinkTimeOptimization (LTO) for the official Chrome builds, which allowed us to devirtualize 51491 site calls pointing to 23149 virtual methods: https://storage.googleapis.com/cfi-stats/2016-08-15/devirt-methods.html That sped up a few layout benchmarks by up to 7% (see https://crbug.com/580389 and https://crbug.com/617283) and more by 2%-3%. In the current step, we add Control Flow Integrity checks for virtual calls. As of now, some functions are excluded from CFI for performance reasons by either tools/cfi/blacklist.txt or DISABLE_CFI_PERF attribute. Once we have proven that there're no perf regressions, we'll be working on the compiler optimizations to allow reenabling CFI on the currently suppressed functions. The remaining part would be to add bad-cast checks to ensure the forward-edge Control Flow Integrity works as planned. That will require more work on reducing the overhead for size and speed by these CFI checks, so we don't enable them right away. The expected Perf impact by this CL: - Chrome binary size is increased by 5%, - Some of the benchmarks are slowed down by up to 3%. If we see any slowdown, the regressed microbenchmarks will be profiled, and a few top methods will have CFI disabled on them. This is the safety valve we intend to use until Clang is ready to generate more efficient code in these cases. BUG=464797 Committed: https://crrev.com/e4f3427521c7d96fb1772bd74c7938e39346d280 Cr-Commit-Position: refs/heads/master@{#413252}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Revert gyp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M build/config/sanitizers/sanitizers.gni View 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
krasin
Hi Dirk, please, approve this CL to enable CFI on the Linux x86-64 official builds. ...
4 years, 4 months ago (2016-08-19 17:02:09 UTC) #2
Dirk Pranke
https://codereview.chromium.org/2259293002/diff/1/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/2259293002/diff/1/build/common.gypi#newcode851 build/common.gypi:851: 'cfi_vptr%': 1, you don't really need to change GYP ...
4 years, 4 months ago (2016-08-19 20:22:10 UTC) #7
krasin
PTAL https://codereview.chromium.org/2259293002/diff/1/build/common.gypi File build/common.gypi (right): https://codereview.chromium.org/2259293002/diff/1/build/common.gypi#newcode851 build/common.gypi:851: 'cfi_vptr%': 1, On 2016/08/19 20:22:09, Dirk Pranke wrote: ...
4 years, 4 months ago (2016-08-19 20:30:46 UTC) #8
Dirk Pranke
okay. I think we should move the flags, but it's fine to do that in ...
4 years, 4 months ago (2016-08-19 20:56:19 UTC) #11
krasin
On 2016/08/19 20:56:19, Dirk Pranke wrote: > okay. I think we should move the flags, ...
4 years, 4 months ago (2016-08-19 20:58:36 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2259293002/20001
4 years, 4 months ago (2016-08-19 21:01:13 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-08-19 21:42:44 UTC) #16
commit-bot: I haz the power
4 years, 4 months ago (2016-08-19 21:46:47 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/e4f3427521c7d96fb1772bd74c7938e39346d280
Cr-Commit-Position: refs/heads/master@{#413252}

Powered by Google App Engine
This is Rietveld 408576698