Skip to content

Add F_SEAL_FUTURE_WRITE on Linux/Android #1372

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

Merged
merged 1 commit into from
May 28, 2019

Conversation

tklauser
Copy link
Contributor

This was added in Linux 5.1 and will only show up in the next glibc
release, thus skip in tests.

@rust-highfive
Copy link

r? @gnzlbg

(rust_highfive has picked a reviewer for you, use r? to override)

@tklauser tklauser force-pushed the f-seal-future-write branch 2 times, most recently from 1bddccf to b5b9ef5 Compare May 28, 2019 10:30
@gnzlbg
Copy link
Contributor

gnzlbg commented May 28, 2019

Thank you for the PR. This LGTM. I prefer to merge this after #1365 lands, so after that's merged this will need to be rebased on top of it.

@@ -465,6 +465,7 @@ pub const F_SEAL_SEAL: ::c_int = 0x0001;
pub const F_SEAL_SHRINK: ::c_int = 0x0002;
pub const F_SEAL_GROW: ::c_int = 0x0004;
pub const F_SEAL_WRITE: ::c_int = 0x0008;
pub const F_SEAL_FUTURE_WRITE: ::c_int = 0x0010;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this available in emscripten ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet, I think. It also seems to be missing from musl currently. What is the proper place to put this in that case? src/unix/notbsd/linux/other/mod.rs and a copy to src/unix/notbsd/android/mod.rs?

Copy link
Contributor

Choose a reason for hiding this comment

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

So one copy goes into android/mod.rs, another copy goes into linux/mips/mod.rs/linux/s390x/mod.rs, linux/other/mod.rs - basically everywhere in linux except linux/musl/mod.rs.

@bors
Copy link
Contributor

bors commented May 28, 2019

☔ The latest upstream changes (presumably #1365) made this pull request unmergeable. Please resolve the merge conflicts.

@gnzlbg
Copy link
Contributor

gnzlbg commented May 28, 2019

The build.rs has been substantially changed. There is a section in skip_const for Linux where we document what's not available in the current kernel headers used in CI. You probably want to add there a new "section" for the 5.1 kernel, adding this constant to the list.

@tklauser tklauser force-pushed the f-seal-future-write branch from b5b9ef5 to 7277138 Compare May 28, 2019 14:21
@tklauser
Copy link
Contributor Author

Thanks @gnzlbg. Now pushed a rebased version and integrated your review comments.

@tklauser tklauser force-pushed the f-seal-future-write branch from 7277138 to 2458d2a Compare May 28, 2019 14:30
@gnzlbg
Copy link
Contributor

gnzlbg commented May 28, 2019

@bors: r+

@bors
Copy link
Contributor

bors commented May 28, 2019

📌 Commit 2458d2a has been approved by gnzlbg

@gnzlbg
Copy link
Contributor

gnzlbg commented May 28, 2019

Thank you!

This was added in Linux 5.1 and will only show up in the next glibc
release, thus skip in tests.
@tklauser tklauser force-pushed the f-seal-future-write branch from 2458d2a to 7364369 Compare May 28, 2019 14:33
@gnzlbg
Copy link
Contributor

gnzlbg commented May 28, 2019

@bors: r+

@bors
Copy link
Contributor

bors commented May 28, 2019

📌 Commit 7364369 has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented May 28, 2019

⌛ Testing commit 7364369 with merge c9fbd00...

bors added a commit that referenced this pull request May 28, 2019
Add F_SEAL_FUTURE_WRITE on Linux/Android

This was added in Linux 5.1 and will only show up in the next glibc
release, thus skip in tests.
@bors
Copy link
Contributor

bors commented May 28, 2019

☀️ Test successful - checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-travis, status-appveyor
Approved by: gnzlbg
Pushing c9fbd00 to master...

@bors bors merged commit 7364369 into rust-lang:master May 28, 2019
@tklauser tklauser deleted the f-seal-future-write branch May 28, 2019 20:34
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.

4 participants