I recall that Laurence Tratt has written a blog post about
difficulties of using rusts pointer
types with cheri because of the additional data and rusts assumption
that a pointer basically
just contains an address. (If I recall correctly from memory)
https://tratt.net/laurie/blog/2022/making_rust_a_better_fit_for_cheri_and_other_platforms.html
On Tue, Dec 2, 2025 at 1:28 AM Matt Rice <rat...@gmail.com> wrote:
>
> On Tue, Dec 2, 2025 at 1:20 AM Matt Rice <rat...@gmail.com> wrote:
> Actually, I am reminded of the language Mezzo, which is based upon
> separation logic.
> In it (in fact right in the description) "marrying a static discipline
> of permissions and a dynamic mechanism of adoption and abandon."
> https://protz.github.io/mezzo/
>
> I would imagine the added value would be similar to this
> static/dynamic divide, presumably you could have a dynamic
> distribution of permissions with a static enforcement or some such.
>
> I could maybe convince myself that adds value?
Sorry, I really should make clear here that I was speaking not of
CHERI specifically here (Where I don't know.),
But of a more theoretical "what additional value could there be?".
> > >I'm considering a variant in which capabilities reference OS objects, and do not replace conventional pointers.
> >
> > So kind of like a system call which is stored.
I could imagine a world where the only value of running rust code on CHERI (under the assumption of soundness) is just one wants to run rust code on it... But I don't know if that is actually true, but if there is additional value it has gone over my head.
Sorry, I really should make clear here that I was speaking not of
CHERI specifically here (Where I don't know.),
But of a more theoretical "what additional value could there be?".
One thing I think that throwing out C would make nicer is just the
main entry point,
and stringifying arguments through char pointers.
You could really integrate a language and its module system together
with the executable format
by tossing out the notion of a singular main entry point.
I think maybe you _could_ implement something of
the sort which could run on current day glibc as a position
independent executable with a custom PT_INTERP that somehow selects
between entry points.
--
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAAP%3D3QPFaNjdKCRmYMX5EBSYm4RVNL%2Bma27hFqhXQzvxfLuC7A%40mail.gmail.com.
If one is talking read capabilities, how about adding standard control (stdctl) to stdin, stdout, stderr?
--
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAAP%3D3QPkDa%3Dzqk8Gy4Tp5%2BZF4NzbtYLa5KP%3DwPfhzM2-egpYDA%40mail.gmail.com.
Yes, my idea is a bit like streams, because there’s two inputs and two outputs, but instead of streams of bytes, think streams of capabilities.
I’m not clear if Coyotos even has filenames, probably not!
--
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAAP%3D3QMMSw0AC1K6VfcuycDb2TOrWb7QNd%2BJaeLJVkH7kE1rmQ%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/4da26f9e-13b5-4f3d-9702-76bb5c8404f3n%40googlegroups.com.
So perhaps the initial capability is to a temporary Directory of capabilities.
--
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAAP%3D3QMkq336%3D3gGs27Gkm6j_T9SUMikm3KQKP_NkESyH1SFwQ%40mail.gmail.com.
And a Directory of capabilities is a c-list.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAGC3UEm2ixehVPG_VHh6mf%3D92FpP2xMzO6rX%3DfviKx%2BD%3D4FW2A%40mail.gmail.com.
What do we call a stream of petnames?
I had in mind different levels of membership for an influencer’s channel, probably a bit like multi-level security. Broader memberships would allow larger and larger number of capabilities. But memberships might also be distinct from each other.But my idea sounds a bit like ambient authority, without any intention of being so. Each member would receive an initial batch of capabilities, which could be extended with new content being available.
With another hat, I am considering which contacts I want to invite to meetings, such that I could create a revocable capability (bearer token) I could send them to access a meeting.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CANpA1Z0P-pZB_TMZc6CGSjpqbfE6Qqttc%2B8m4Ybk8sOobbcz0A%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CANpA1Z2E_-%3DDX2EK7nvJXrt0SUELT6A5KPv%2BMXMm8%3DHj%3DxwfnA%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAGC3UEmHYFda1c6WQ2ZKxtwg5mb6mgRye8sAJQnaDDd4AnoujA%40mail.gmail.com.
On Tue, Dec 2, 2025 at 8:23 PM Jonathan S. Shapiro
<jonathan....@gmail.com> wrote:
>
> On Mon, Dec 1, 2025 at 9:47 PM Matt Rice <rat...@gmail.com> wrote:
> But more importantly, I think the entire notion of UNIX-style command line arguments may not turn out to be a great fit for Coyotos.
>
> Context: because everything is capability-oriented, Coyotos is heavily biased toward "design to API" rather than "design to command line". For those applications that respond to a command line interface, the likely mechanism is that they start in main, do their initialization, and at some point return a capability (via the construction process) that publishes an interface suitable for command interaction. The native shell doesn't do fork+exec; it sends a set of strings to that published capability API.
>
When I tried writing a shell for coyotos/capros I believe the way I
went (the details are fuzzy) was by sending the `allegedType` message
to the target, and having the shell parse the IDL for that type (I
don't remember if allegedType returned the IDL directly or if it just
returned a code that I then had to have the IDL for).
It then after parsing the IDl could hand out completions to the user,
and use their input to build a message sent to the target.
So.... this is a totally hair-brained thought, but I'm wondering if it's interesting.One of the really painful limitations of the KeyKOS family is that you can't store capabilities to main memory. This means that capabilities cannot be passed on the application stack as parameters in any natural or practical way. This makes building libraries that manipulate capabilities really hard. EROS and later have capability pages mainly so that they can support a "split stack". Easier to work with than what KeyKOS was doing, but far from easy. Best I could do without changing the hardware.I have finally started to look at the CHERI work from Cambridge. It starts with a 128 bit capability format and a side unit that adds a tag bit to every 8 byte region of memory.CHERI chose to focus on fine-grain memory-oriented capabilities. I think this is because they were trying to continue to support large bodies of existing C code. I'm of the opinion that the result is fantastic, more expensive (in terms of porting cost) than anybody anticipated, and could be done in other ways by making different programming language choices.
Some thoughts:
- It is possible to use their tagged memory approach to allow KeyKOS-style capability structures to be stored in main memory in a KeyKOS-style system.
- Parts of the kernel could be implemented in hardware - most critically the invocation path.
I'm not suggesting that we eliminate the kernel (though that's both possible and interesting), though there are paths we could accelerate given enough FPGA space. I'm suggesting that a strongly typed low-level programming language coupled with strong OS-capability isolation seems like an interesting path to explore.Before you scoff about the programming language part (and you might be right):
- I think that Rust's success is making people more open to the possibility that maybe we don't need to remain stuck in C.
- The language might even be Rust - perhaps with SES-like extensions if needed.
- Alternatively, the language might be a type-safe variant of C, again with SES-like extensions if needed.
I realize this is a crazy, hair-brained thought. But is it hair-brained enough to be interesting?
--Jonathan
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAAP%3D3QN0KRy22%2ByuFRr8N9ssyQCywwFzGgEGBQzDn9oOBue3nQ%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CANpA1Z0Uj8xLRoxWEqPNfw%2B1yYDS0k-8ZGUyWswhdU5cFX36mw%40mail.gmail.com.
Speaking as one of the first members of the project: the original motivation was actually to reduce the enormous cost of compartmentalisation. Which CHERI turns out to do very well. C/C++ memory safety was an unintended but very welcome side effect of the underlying mechanism.
In terms of cost of porting: I am not sure where you got that impression., CHERI porting is mostly *very* cheap - .03% of lines of code change and most of those are changing int/void * to the correct type (intptr_t) and the need to do that is clearly signalled by compile-time errors.
A few types of things are significantly harder:
- It is possible to use their tagged memory approach to allow KeyKOS-style capability structures to be stored in main memory in a KeyKOS-style system.
Indeed it is.
- Parts of the kernel could be implemented in hardware - most critically the invocation path.
Look at CHERIoT to understand why CHERI as it stands is already a fantastic boon for OSes.
If you want to go down the language path, I think it is also a good idea to build an understanding of the memory lifecycle into it - see CheriOS for some inspiration.
Rust,. IMO, is too constrained to impedance match CHERI well.
First off, I get that capabilities are things like small integers that are passed to operations.
The implementation of capabilities is a c-list to resource+operations (object or permissions) mapping.
I also know next to nothing about how capabilities are implemented in hardware or kernel.
Alan’s comment is fair, my definition of directory stems from a list of names mapped to numbers, much like DNS does.
If my object is a stream of capabilities...
It seems like there’s a restriction that capabilities should be in a pre allocated array before a process starts, and I don’t really have an issue with that. I just don’t want every process I create to have the same size c-list.
I think your argument is that c-lists don’t exist in storage, but I’d like to hear about the actual implementation of that.
I do have some experience upping the number of network file descriptors to unlimited to simulate 250000 wireless lights sending UDP messages to a server...
From what I recall on coyotos, eros, and capros the directory object was
a fixed size array with a name and capability buffer.
I do have some experience upping the number of network file descriptors to unlimited to simulate 250000 wireless lights sending UDP messages to a server...I can see why you would want 250,000 nameable things in that scenario. I'm not at all clear that 250,000 descriptors would be the most natural way to achieve that - especially if they transit a network.
On Wed, Dec 3, 2025 at 7:18 AM 'Ben Laurie' via cap-talk <cap-...@googlegroups.com> wrote:Speaking as one of the first members of the project: the original motivation was actually to reduce the enormous cost of compartmentalisation. Which CHERI turns out to do very well. C/C++ memory safety was an unintended but very welcome side effect of the underlying mechanism.x86/amd64 is a big impediment to compartmentalization. On other architectures Jochen and I and others got the cycle counts fairly far down, but there are greater parallelization opportunities in hardware.
In terms of cost of porting: I am not sure where you got that impression., CHERI porting is mostly *very* cheap - .03% of lines of code change and most of those are changing int/void * to the correct type (intptr_t) and the need to do that is clearly signalled by compile-time errors.Probably pulled it from some combination of my a*s and a vague recollection of a random statement someone made that I happened across.A few types of things are significantly harder:I would have expected everything on that list. They share in common a bunch of low-level memory abuses. I'm a little surprised that garbage collectors aren't on that list as well.
- It is possible to use their tagged memory approach to allow KeyKOS-style capability structures to be stored in main memory in a KeyKOS-style system.
Indeed it is.Very helpful to have that confirmed.
- Parts of the kernel could be implemented in hardware - most critically the invocation path.
Look at CHERIoT to understand why CHERI as it stands is already a fantastic boon for OSes.I've been actively trying to figure out which FPGA board to buy. Definitely not the existing Sonata or the Arty A7. Unfortunate, to my mind, that the Sonata XL (apparently) wasn't commercialized, but a board with an A7200T part (or comparable) would be enough to let me play around with stray thoughts. Any recommendations?If you want to go down the language path, I think it is also a good idea to build an understanding of the memory lifecycle into it - see CheriOS for some inspiration.Concur.Rust,. IMO, is too constrained to impedance match CHERI well.To my mind, that's completely believable. And one of the things we learned from Cyclone is that simple region inference isn't good enough either. But I think we're in a much different position today socially than we were 15 years ago in terms of perceived requirements:All I'm saying is that I think there may be a window of opportunity at the moment, and the final winner isn't at all clear.
- Whole program compilation is now acceptable (c.f. go), which changes what we can analyze in a major way.
- The burst of alternative systems languages says there's a window of acceptance for innovation that didn't exist in 2010 (or earlier).
- People are now willing to tolerate a surprising amount of pain (c.f. borrow checker) for robust results - especially for the sake of concurrency.
--Jonathan
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAAP%3D3QMY7iJJC%2BY1BT11aJPYLyuQ3e5EHDPjyy7VeJ6J22ChHA%40mail.gmail.com.
I somewhat hesitate to ask, but in the hardware variant is there a
plan for how transparent
the persistence layer is going to be?
I would somewhat assume it
would keep the MMU/paging system
like design at the hardware level (i.e. not transparent).
Part of the reason I ask is I've always wanted to explore ways to keep
orthogonal persistence while making it less transparent at least for
some applications. Either through allowing processes to read the
status of dirty bits.
Or some kind of atomic commit phase, and capability which sends a
message when a checkpoint is reached.
This latter thing is made more difficult due to the lack of signals
but I digress.
The main point is that if you intend to make the persistence entirely
hardware and totally transparent, there are
probably some applications where that is desirable. But tinkering with
the persistence layer isn't one of those.
> What's the use case for the information exposure you are suggesting? What are you actually trying to accomplish?
>
I had two things in mind, the first is very simply displaying the saved status.
The second (probably more controversial) is actually organizing the
process's state so that it can produce a
diff between the last checkpointed state and the current state.
E.g. when one is replicating process state between systems via network
and wants to give priority to the uncheckpointed portion of data.
The general idea was that if you kept within your process state an
array, and you could keep a tally of the last persisted index which
was fully/completely written at which point the data associated with
that index was finished.
The notion of atomic commit that I was considering was "is guaranteed
to be either entirely written checkpoint or entirely absent from a
checkpoint"
Perhaps I am remembering capros then that had I believe per-domain checkpoint.
Sorry I don't want to belabour the point...
First, when I said "diff between the last checkpointed state and the
current state.", I really should have said
"the unwritten portion of an append-only log" or something similar, in
theory it isn't append-only,
the ideal implementation that I wanted was basically a LIFO queue in a
ring buffer.
It wasn't clear to me that the database log "escape hatch" described
in the single level store paper was suitable as that kind of a ring
buffer.
Let me use an analogy which is not perfect, but also not too far from the truth.
Basically we wanted a flight-recorder box (that also transmits its
current sensor data via a network).
The checkpoint interval if I recall was minutes, which is ample time
to crash and burn due to catastrophic failure between checkpoints.
It isn't clear to me that there *is* a standard flight data recorder
that includes arbitrary sensor data and control input data.
In our case the intent was to deploy them in front of fire lines of
forest fires to relay conditions on the ground to those behind them,
putting the machine in harm's way. This made it more of a distributed
problem.
--
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAAP%3D3QPGJs9A_nEdCvk_o2Pj8nydrge-868Nrmzaf1NfLgpz%3Dw%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CANpA1Z2KbaOaxeK7LedE30wgDxeoaZj-xZ10ja3DWH9N2G4OWQ%40mail.gmail.com.
Alan:Thanks for the helpful thought. Unfortunately, modify-in-place is pretty essential in many parts of a kernel. Clone() isn't a solution for those. But one of the things I was really happy to see is that Rust handles the control flow graph around non-returning procedures correctly. Without that, I think I'd be toast.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAAP%3D3QOVpP-G5s%2BWWNE%2BXJTnRPeeDSAP_tgM_3RpqWQ8Aq8y8A%40mail.gmail.com.
--Jonathan
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAAP%3D3QOcnoxDWhVYqk-jcCjD0b9QbME94bqP4gT2eP3%3DENVE4A%40mail.gmail.com.
I don't see a direct replacement for a lot of things in the coyotos build process, like cargo gives you pretty basic bin and lib targets. Nothing directly equivalent to an image.Similarly I'm not certain how to beat integrate the IDL compiler, proc macros which read the IDL files I would guess.
Similarly I'm not certain how to beat integrate the IDL compiler, proc macros which read the IDL files I would guess.
--William ML Leslie
--
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAHgd1hG-mwboQziCEurXZ%2Bo4UiboN3JOCGgapLBmpdOAwiiBkg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "cap-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cap-talk+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cap-talk/CAHgd1hG-mwboQziCEurXZ%2Bo4UiboN3JOCGgapLBmpdOAwiiBkg%40mail.gmail.com.
Yeah I meant to say that invoking either rustc directly or cargo as part of a make based build script is also doable. I haven't looked at Microkit or rust-sel4 but sel4 is cmake based so they either invoke cmake from cargo, or cargo or rustc directly from cmake. Both are possible.
One of the reasons I advocate a purely cargo based approach is the ability to avoid pre installation of tools and interpreters. It would be nice if the total sum of cross build instructions could be, install rust compilers, checkout, and cargo build. Without futzing with setting up build environments, etc. that is personally what I think would be ideal, but it might not be the easiest thing in the world...To me though for a book like project, the lower friction the amount of pre build setup the better. To just avoid losing people in the initial bootstrap before they even get their feet wet.
Have you looked at projects developing an OS in Rust, such as https://www.redox-os.org/? Maybe they have some tools you can use.
But let's start with a different question: What added value does CHERI provide if we start from the assumption that the application code is required to be type safe and/or verified memory safe?
I'm considering a variant in which capabilities reference OS objects, and do not replace conventional pointers.