Page MenuHomeFreeBSD

Implement shmat(2) flag SHM_REMAP.
ClosedPublic

Authored by kib on Jan 14 2019, 8:24 AM.
Tags
None
Referenced Files
F101305615: D18837.diff
Sun, Oct 27, 12:58 PM
Unknown Object (File)
Mon, Sep 30, 3:23 AM
Unknown Object (File)
Mon, Sep 30, 3:23 AM
Unknown Object (File)
Mon, Sep 30, 3:14 AM
Unknown Object (File)
Sep 22 2024, 10:47 PM
Unknown Object (File)
Sep 22 2024, 7:05 PM
Unknown Object (File)
Sep 21 2024, 10:38 PM
Unknown Object (File)
Sep 21 2024, 1:57 PM

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.