Kernel Panic if function implementing Scheme panics
So I've been playing around with schemes, and I was being able to cause a kernel panic from userspace, basically...
Anyway, I had some faulty logic that was causing my open
to panic. Here's the stripped down version on how to reproduce:
impl Scheme for MyScheme {
fn open(&self, path: &[u8], uid: u32, gid: u32) -> Result<usize> {
panic!("Hi!");
Ok(0) // <- Unreachable???
}
}
Whip that up into a daemon that looks like the main.rs
here and you get a nce kernel panic whenever you try to cat anything from your scheme...
My guess is that it's an issue with the root scheme not being able to understand a read
not being followed by a write
, but I'm not particularly sure on that.