]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sysvshm: pass relevant uap members as arguments
authorbrooks <brooks@FreeBSD.org>
Tue, 3 Nov 2020 19:14:03 +0000 (19:14 +0000)
committerbrooks <brooks@FreeBSD.org>
Tue, 3 Nov 2020 19:14:03 +0000 (19:14 +0000)
commitbfb98faf5f6997ce7b782d93a23d345cc27cad14
tree0a7de60354e23886bd12e08f24813d0d04784bd3
parent5cd8696957756c217cda80de5d92b5c336ea12c7
sysvshm: pass relevant uap members as arguments

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.

Reviewed by: kib
Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D27077
sys/kern/sysv_shm.c