aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2024-10-04 20:34:03 +0000
committerBrooks Davis <brooks@FreeBSD.org>2024-10-04 20:34:03 +0000
commitd0af970e3ce4a7e2108a4bc2442c6c98f6aa4ffa (patch)
tree6d8d5dabc6be1fcf2b4fded2ef9be3eeaba5e57e
parente0c37c160b115b0bf41847ab60a5dabf0dc71300 (diff)
downloadsrc-d0af970e3ce4a7e2108a4bc2442c6c98f6aa4ffa.tar.gz
src-d0af970e3ce4a7e2108a4bc2442c6c98f6aa4ffa.zip
sysv shm: Fix SHM_REMAP flag value
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) Reviewed by: kib Fixes: ea7e7006db10 Implement shmat(2) flag SHM_REMAP. Differential Revision: https://reviews.freebsd.org/D46825
-rw-r--r--sys/sys/shm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/shm.h b/sys/sys/shm.h
index d80de811ef7d..df32230dcdc7 100644
--- a/sys/sys/shm.h
+++ b/sys/sys/shm.h
@@ -51,7 +51,7 @@
#define SHM_RDONLY 010000 /* Attach read-only (else read-write) */
#define SHM_RND 020000 /* Round attach address to SHMLBA */
-#define SHM_REMAP 030000 /* Unmap before mapping */
+#define SHM_REMAP 040000 /* Unmap before mapping */
#define SHMLBA PAGE_SIZE /* Segment low boundary address multiple */
/* "official" access mode definitions; somewhat braindead since you have