Page MenuHomeFreeBSD

sysv shm: Fix SHM_REMAP flag value
ClosedPublic

Authored by brooks on Sep 27 2024, 9:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 21, 9:59 PM
Unknown Object (File)
Tue, Oct 21, 9:50 PM
Unknown Object (File)
Tue, Oct 21, 9:20 PM
Unknown Object (File)
Tue, Oct 21, 9:47 AM
Unknown Object (File)
Tue, Oct 21, 6:04 AM
Unknown Object (File)
Fri, Oct 17, 4:22 AM
Unknown Object (File)
Sep 23 2025, 2:15 PM
Unknown Object (File)
Sep 18 2025, 12:40 PM
Subscribers

Details

Summary

SHM_REMAP was incorrectly defined to 030000 which collides with
SHM_RDONLY and SHM_RND. Renumber to 040000 (incidentally matching
Linux).

This is an ABI break, but the previous ABI was unusable (SHM_REMAP would
imply SHM_RDONLY and vice versa). Fortunately SHM_REMAP has very few
consumers in the wild (I spotted openjdk for Linux, libfabric, MIPCH,
and one other MPI thing in Debian code search)

Fixes: ea7e7006db10 Implement shmat(2) flag SHM_REMAP.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable