The branch main has been updated by brooks:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=d0af970e3ce4a7e2108a4bc2442c6c98f6aa4ffa

commit d0af970e3ce4a7e2108a4bc2442c6c98f6aa4ffa
Author:     Brooks Davis <bro...@freebsd.org>
AuthorDate: 2024-10-04 20:34:03 +0000
Commit:     Brooks Davis <bro...@freebsd.org>
CommitDate: 2024-10-04 20:34:03 +0000

    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
---
 sys/sys/shm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

Reply via email to