doc/wg/core/notes/core-notes-2022-10-07.md
Attendees:
has_different_identifiers, which given a process and an array of processes,
will tell you whether they're unique. There was a default implementation of
this in the trait and the intention was that nobody would ever reimplement
it, in part because it checks the short IDs, and Hudson suggested that it
should be moved into the kernel crate so nobody can accidentally violate
kernel guarantees. That method has been pulled out of the trait and made a
kernel function.SyscallDriver trait.ProcessBuffer.KernelResources
trait or some other mechanism to make it customizable, or is it too
integrated for that?master.master.NODEVICE as it would before automatizing these ones.
It should return NODEVICE if the driver does not exist.libtock-rs against the
implementation of the kernel. I do recall finding something -- although I
thought it was a Tock 2.0 thing not a 2.1 thing -- but I found something
where TRD 104 did not match the implementation. I forget if I updated TRD 104
to match but it was after stabilization so I didn't think it could be
changed, I'll have to see.INVAL. Technically the TRD
would not be correct -- Command would return NODEVICE but Subscribe would
return INVAL for the same incorrect driver number.NODEVICE.NODEVICE. The kernel would fail to allocate the grant which would result in
INVAL or NOMEM.NODEVICE if there's not a device. At least for debugging,
this will be a nightmare if somebody messes up a driver number.This conversation happened in chat alongside the above conversation:
ProcessSlices towards raw pointers #2977ProcessSlices towards raw pointers underneath. I think it's an
important issue to solve but tons of things have come up and I haven't had
time to get to it. ProcessSlices are currently built using [Cell<>] which
is unsound in terms of Rust's aliasing rules, and the only sound solution
seems to be to change the types to use raw pointers and use Rust's methods
for working on raw pointers. I think there is general agreement this is
useful and the API seems to be good. As part of the PR, we wanted to
transition as many capsules away from panicing on userspace buffer accesses
and perform more sensible error handling. I've spent a day rebasing it, and
reworked tons of capsules to refactor them. The lesson from that is we should
punt on converting capsules away from panicing accesses to a separate PR,
because it is hard to do that without changing their behavior on edge cases.
E.g. when a process asks a capsule to perform an operation that goes beyond
the bounds of the buffer it has shared. That's kind of the state of that, I
think the only thing missing is Miri tests, which I'm currently writing, to
have some confidence that what we're doing is sound. Does that make sense to
everybody?bors r+-ed the basic one.mret that we don't save. I tried a few things, and couldn't get
it to work, wanted to see what the general feel ways. Sounds like I could
talk to Amit about it.