Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jun 2025 23:56:37 GMT
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 934df0ca61bf - main - mman: Reserve two PROT_ for CHERI use
Message-ID:  <202506052356.555NubFi007352@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks:

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

commit 934df0ca61bfbb6bdedba8588457a3ffa2adde25
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2025-06-05 23:55:35 +0000
Commit:     Brooks Davis <brooks@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)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506052356.555NubFi007352>