Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#3098: fix shared ibt table races #3103

Merged
merged 3 commits into from
Jul 13, 2018
Merged

Conversation

derekbruening
Copy link
Contributor

Fixes two races with shared ibt tables:

  • Adding a new table entry must write the start_pc before the tag.
    This is accomplished with a new ENTRY_SET_TO_ENTRY hashtablex.h
    optional specifier. For ARM races in ARM lockless data structure reads #2502 a new MEMORY_STORE_BARRIER macro
    is added.

  • Resizing a table must not clear the tags in the old table to avoid
    losing the tag on the target_delete ibl path.

Adds a test api.ibl-stress which uses the DR IR to synthetically
construct thousands of basic blocks with indirect branches betweent
them.

To make the test work, relaxes several is-on-stack checks to support
pre-building basic blocks (#2463) from generated code or other
locations not known prior to starting the application.

Issue: #3098, #2502, #2463

Fixes #3098

Fixes two races with shared ibt tables:

+ Adding a new table entry must write the start_pc before the tag.
  This is accomplished with a new ENTRY_SET_TO_ENTRY hashtablex.h
  optional specifier.  For ARM #2502 a new MEMORY_STORE_BARRIER macro
  is added.

+ Resizing a table must not clear the tags in the old table to avoid
  losing the tag on the target_delete ibl path.

Adds a test api.ibl-stress which uses the DR IR to synthetically
construct thousands of basic blocks with indirect branches betweent
them.

To make the test work, relaxes several is-on-stack checks to support
pre-building basic blocks (#2463) from generated code or other
locations not known prior to starting the application.

Issue: #3098, #2502, #2463

Fixes #3098
@derekbruening derekbruening merged commit ea6d390 into master Jul 13, 2018
@derekbruening derekbruening deleted the i3098-shared-ibt-races branch July 13, 2018 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant