Page MenuHomeFreeBSD

sysvshm: pass relavent uap members as arguments
ClosedPublic

Authored by brooks on Nov 3 2020, 5:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 9:21 PM
Unknown Object (File)
Tue, Nov 19, 9:02 PM
Unknown Object (File)
Mon, Nov 18, 4:13 PM
Unknown Object (File)
Sun, Nov 17, 2:33 PM
Unknown Object (File)
Thu, Nov 14, 3:59 PM
Unknown Object (File)
Thu, Nov 14, 9:26 AM
Unknown Object (File)
Mon, Nov 11, 1:50 PM
Unknown Object (File)
Fri, Nov 8, 3:55 PM
Subscribers

Details

Summary

Alter shmget_allocate_segment and shmget_existing to take the values
they want from struct shmget_args rather than passing the struct
around. In general, uap structures should only be the interface to
sys_<foo> functions.

This makes on small functional change and records the allocated space
rather than the requested space. If this turns out to be a problem (e.g.
if software tries to find undersized segments by exact size rather than
using keys), we can correct that easily.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks requested review of this revision.Nov 3 2020, 5:44 PM
brooks created this revision.
kib added inline comments.
sys/kern/sysv_shm.c
114 ↗(On Diff #79134)

Since you are modifying all lines, move declarations to the block below, together with other function's declarations.

This revision is now accepted and ready to land.Nov 3 2020, 6:37 PM
This revision was automatically updated to reflect the committed changes.