Use isohybrid to generate a USB stick friendly ISO

Add assertions to verify that grants are unmapped
Fix grant unmapping in exec and exit, thus fixing some crashes without network cards
This commit is contained in:
Jeremy Soller 2016-12-06 14:47:05 -07:00
parent 7ee0ea3c86
commit 31d62f9272
5 changed files with 61 additions and 8 deletions

View file

@ -106,6 +106,10 @@ impl UserInner {
for i in 0 .. grants.len() {
let start = grants[i].start_address().get();
if to_address + full_size < start {
{
let name = context.name.lock();
println!("{}: {}: Can grant {:X} to {:X} size {}", context.id.into(), ::core::str::from_utf8(&name).unwrap_or(""), from_address, to_address, full_size);
}
grants.insert(i, Grant::map_inactive(
VirtualAddress::new(from_address),
VirtualAddress::new(to_address),
@ -123,6 +127,10 @@ impl UserInner {
}
}
{
let name = context.name.lock();
println!("{}: {}: Can grant {:X} to {:X} size {}", context.id.into(), ::core::str::from_utf8(&name).unwrap_or(""), from_address, to_address, full_size);
}
grants.push(Grant::map_inactive(
VirtualAddress::new(from_address),
VirtualAddress::new(to_address),