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

executor: add cover protection support to OpenBSD #1215

Merged
merged 1 commit into from Jun 6, 2019
Merged

executor: add cover protection support to OpenBSD #1215

merged 1 commit into from Jun 6, 2019

Conversation

mptre
Copy link
Collaborator

@mptre mptre commented Jun 4, 2019

No description provided.

@mptre mptre requested review from dvyukov and blackgnezdo June 4, 2019 16:34
@codecov-io
Copy link

codecov-io commented Jun 4, 2019

Codecov Report

Merging #1215 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1215   +/-   ##
=======================================
  Coverage   67.55%   67.55%           
=======================================
  Files         120      120           
  Lines       20884    20884           
=======================================
  Hits        14108    14108           
  Misses       6108     6108           
  Partials      668      668

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfb4a51...8288254. Read the comment docs.

mib[0] = CTL_HW;
mib[1] = HW_PAGESIZE;
len = sizeof(page_size);
if (sysctl(mib, 2, &page_size, &len, NULL, 0) != -1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which 2 is this? ARRAYSIZE(mib)?

@@ -96,6 +110,9 @@ static void cover_unprotect(cover_t* cov)
#if GOOS_freebsd
size_t mmap_alloc_size = kCoverSize * KCOV_ENTRY_SIZE;
mprotect(cov->data, mmap_alloc_size, PROT_READ | PROT_WRITE);
#elif GOOS_openbsd
size_t mmap_alloc_size = kCoverSize * sizeof(uintptr_t);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a global const shared with above patch?

@dvyukov dvyukov removed their request for review June 5, 2019 05:49
@mptre
Copy link
Collaborator Author

mptre commented Jun 5, 2019 via email

@blackgnezdo blackgnezdo merged commit a547def into google:master Jun 6, 2019
@mptre mptre deleted the openbsd-cover-protect branch June 13, 2019 16:52
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.

None yet

3 participants