The branch main has been updated by brooks:

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

commit 934df0ca61bfbb6bdedba8588457a3ffa2adde25
Author:     Brooks Davis <bro...@freebsd.org>
AuthorDate: 2025-06-05 23:55:35 +0000
Commit:     Brooks Davis <bro...@freebsd.org>
CommitDate: 2025-06-05 23:55:35 +0000

    mman: Reserve two PROT_ for CHERI use
    
    In CheriBSD we use two bits to control load and store of CHERI
    capabilities (pointers).  In anticipation of merging CHERI support in
    time for FreeBSD 16, reserved these two bits to avoid the (low, but
    non-zero) risk of a flag day downstream.
    
    I've used PROT_CHERI0 and PROT_CHERI1 rather than their downstream name
    in hopes of avoiding the impression they do something today.
    
    Reviewed by:    kevans, adrian
    Suggested by:   kevans, adrian
    Sponsored by:   DARPA, AFRL
    Differential Revision:  https://reviews.freebsd.org/D50621
---
 sys/sys/mman.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/sys/mman.h b/sys/sys/mman.h
index 611c5b4e669f..ba478bc71c7c 100644
--- a/sys/sys/mman.h
+++ b/sys/sys/mman.h
@@ -53,6 +53,8 @@
 #define        PROT_WRITE      0x02    /* pages can be written */
 #define        PROT_EXEC       0x04    /* pages can be executed */
 #if __BSD_VISIBLE
+#define        PROT_CHERI0     0x08
+#define        PROT_CHERI1     0x10
 #define        _PROT_ALL       (PROT_READ | PROT_WRITE | PROT_EXEC)
 #define        PROT_EXTRACT(prot)      ((prot) & _PROT_ALL)
 

Reply via email to