Page MenuHomeFreeBSD

Implement shmat(2) flag SHM_REMAP.
ClosedPublic

Authored by kib on Jan 14 2019, 8:24 AM.
Tags
None
Referenced Files
F105941664: D18837.diff
Sun, Dec 22, 9:20 PM
Unknown Object (File)
Mon, Nov 25, 8:40 PM
Unknown Object (File)
Sun, Nov 24, 2:17 AM
Unknown Object (File)
Sun, Nov 24, 1:54 AM
Unknown Object (File)
Sat, Nov 23, 2:44 PM
Unknown Object (File)
Nov 20 2024, 3:51 AM
Unknown Object (File)
Nov 20 2024, 3:48 AM
Unknown Object (File)
Nov 20 2024, 3:48 AM

Details

Summary

Based on the description in Linux man page.

Sponsored by: Mellanox Technologies

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 21949

Event Timeline

kib edited the summary of this revision. (Show Details)

Bump man page date.

This seems ok to me. I'm not sure about modifying the NetBSD tests, might be nice to wrap the changes with #ifdef SHM_REMAP if they are to be upstreamed.

Seems like in the future we could implement MAP_REMAP with find_space != VMFS_NO_SPACE to provide the semantics needed for Linux's mremap(2).

lib/libc/sys/shmat.2
84

"is specified and the passed"

86

"existing mappings"?

90

addresses -> address

I would also s/already has/contains/.

Fix grammar.
Wrap new test with #ifdef SHM_REMAP.
Document ENOMEM.

The test changes are ok. I figure I'll have to make a pass over the tree anyhow to find what all may have changed in the past year under contrib/netbsd-tests, so there's no time like the present-ish to do it.

contrib/netbsd-tests/kernel/t_sysv.c
864

Hmmm... 4160 is a curious number (this is copied from other tests, so the voodoo-ness comes from NetBSD).

This revision is now accepted and ready to land.Jan 15 2019, 8:17 AM
lib/libc/sys/shmat.2
86

.Dv NULL should be used instead of NULL here and elsewhere, since it's a constant.

markj added inline comments.
lib/libc/sys/shmat.2
127

"due to the amount of available space being smaller"

128

"pre-existing mappings are in the range"

This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state Needs Review.Jan 16 2019, 5:16 AM
This revision was automatically updated to reflect the committed changes.