Page MenuHomeFreeBSD

mprotect.2: Improve the description of prot
ClosedPublic

Authored by brooks on Sep 1 2021, 9:28 PM.

Details

Summary

The new wording is based on the POSIX description.

Sponsored by: DARPA

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

As requested in D30442, this improves the wording of the description of the prot argument.

The wording is much better, and I don't think changes the intended meaning...

This revision is now accepted and ready to land.Sep 1 2021, 9:33 PM
lib/libc/sys/mprotect.2
59–60

Technically, the argument should be the bitwise OR of some subset of {READ, WRITE, EXEC} or PROT_NONE. ORing PROT_NONE with other flags does nothing.

  • Separate PROT_NONE from other arguments
This revision now requires review to proceed.Sep 2 2021, 6:47 PM
This revision is now accepted and ready to land.Sep 2 2021, 9:09 PM
markj added inline comments.
lib/libc/sys/mprotect.2
53
lib/libc/sys/mprotect.2
75–76

While we're here, I would suggest adding the word "later" here, i.e., saying, "... from later upgrading ..." Also, wouldn't "adding" be clearer than "upgrading"?

78

Add the word "bitwise" here, like above?

I agree with mark and alc comments.

  • Adopt reviewer suggestions
  • Render "or" consistently
This revision now requires review to proceed.Sep 2 2021, 11:53 PM
This revision was not accepted when it landed; it landed in state Needs Review.Sep 7 2021, 4:29 PM
This revision was automatically updated to reflect the committed changes.