Skip to content

Conversation

devnexen
Copy link
Contributor

@devnexen devnexen commented Aug 15, 2025

@rustbot rustbot added the O-unix label Aug 15, 2025
@devnexen devnexen marked this pull request as ready for review August 15, 2025 06:00
@neuschaefer
Copy link
Contributor

Could you please rebase on the latest commit of the main branch? This will resolve some unrelated FreeBSD CI failures and thus make the CI results clearer.

adding missing PROC_SPROTECT helpers while at it.

ref: https://github.com/freebsd/freebsd-src/blob/c992ac6213276f54d868f317cc5092f8aed4ff54/sys/sys/procctl.h#L68

c992ac6213276f54d868f317cc5092f8aed4ff54 seems to be a rather arbitrary recent commit. I'd suggest linking dabf006a638fdc44cdcf69731de8ac83959db731 instead, which is the commit that introduced the new constants.
Perhaps with this link: freebsd/freebsd-src@dabf006#diff-769c07b1f90eef1351a20f40593b254f85925859273219036320baa1d086774cR68

Copy link
Contributor

@neuschaefer neuschaefer left a comment

Choose a reason for hiding this comment

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

Hi, thanks for your contribution! It looks good (to my eyes at least) for the most part

@@ -3012,6 +3012,11 @@ pub const PROC_NO_NEW_PRIVS_STATUS: c_int = 20;
pub const PROC_WXMAP_CTL: c_int = 21;
pub const PROC_WXMAP_STATUS: c_int = 22;
pub const PROC_PROCCTL_MD_MIN: c_int = 0x10000000;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's best to keep PROC_PROCCTL_MD_MIN at the end, it doesn't really have a place between PROC_WXMAP_STATUS and PROC_LOGSIGEXIT_CTL in the original headers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

@@ -4788,6 +4793,14 @@ safe_f! {
pub {const} fn PR_SCTP_VALID_POLICY(x: c_int) -> bool {
PR_SCTP_POLICY(x) <= SCTP_PR_SCTP_MAX
}

pub {const} fn PPROT_OP(o: c_int) -> c_int {
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally would prefer the PPROT changes in a separate commit (same PR is ok), so they can get a more focused commit message (perhaps with a reference link as well)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but ultimately I will have to squash it so..

Copy link
Contributor

Choose a reason for hiding this comment

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

Just fyi, >1 commit per PR is fine if they're meaningful (the merge strategy here is rebase). We just don't want the progress commits like "fix abc" "update" etc.

@devnexen devnexen force-pushed the procctl_update branch 2 times, most recently from 865eb73 to 54943db Compare August 20, 2025 19:08
@tgross35
Copy link
Contributor

tgross35 commented Sep 1, 2025

It looks like there are still some test failures with FreeBSD14, so
@rustbot author

@rustbot
Copy link
Collaborator

rustbot commented Sep 1, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants