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

Improve strict-provenance compatibility in the epoll API. #693

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

sunfishcode
Copy link
Member

Change the user-data field of epoll's Event from a bare u64 to a union which can be either a u64 or a *mut c_void to allowe users to store pointers in it that preserve strict provenance.

Also, rename epoll::epoll_add and similar to just epoll::add and similar, for tidiness.

@sunfishcode sunfishcode force-pushed the sunfishcode/epoll-provenance branch 3 times, most recently from 9ea1a84 to 60a117e Compare June 16, 2023 21:36
@sunfishcode sunfishcode mentioned this pull request Jun 16, 2023
17 tasks
@sunfishcode sunfishcode added the semver bump Issues that will require a semver-incompatible fix label Jun 17, 2023
@sunfishcode
Copy link
Member Author

There's a FIXME here; once #615 lands, I'll replace the FIXME comment with tests that Event's layout matches epoll_event.

@sunfishcode sunfishcode force-pushed the sunfishcode/epoll-provenance branch from 60a117e to caf5871 Compare June 17, 2023 12:47
Change the user-data field of epoll's `Event` from a bare `u64` to a
`union` which can be either a `u64` or a `*mut c_void` to allowe users
to store pointers in it that preserve strict provenance.

Also, rename `epoll::epoll_add` and similar to just `epoll::add` and
similar, for tidiness.
@sunfishcode sunfishcode force-pushed the sunfishcode/epoll-provenance branch from caf5871 to 83eff17 Compare June 19, 2023 16:15
@sunfishcode
Copy link
Member Author

FIXME is now fixed.

@sunfishcode sunfishcode merged commit ac4a66f into main Jun 19, 2023
@sunfishcode sunfishcode deleted the sunfishcode/epoll-provenance branch June 19, 2023 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver bump Issues that will require a semver-incompatible fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant