mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 15:49:15 +00:00
Kernel: Propagate overflow errors from Memory::page_round_up
Fixes #11402.
This commit is contained in:
parent
11599a3342
commit
33b78915d3
Notes:
sideshowbarker
2024-07-17 22:09:47 +09:00
Author: https://github.com/eggpi 🔰
Commit: 33b78915d3
Pull-request: https://github.com/SerenityOS/serenity/pull/11433
Issue: https://github.com/SerenityOS/serenity/issues/11402
Reviewed-by: https://github.com/awesomekling
31 changed files with 112 additions and 100 deletions
|
@ -156,7 +156,7 @@ Memory::MappedROM map_bios()
|
|||
Memory::MappedROM mapping;
|
||||
mapping.size = 128 * KiB;
|
||||
mapping.paddr = PhysicalAddress(0xe0000);
|
||||
mapping.region = MM.allocate_kernel_region(mapping.paddr, Memory::page_round_up(mapping.size), {}, Memory::Region::Access::Read).release_value();
|
||||
mapping.region = MM.allocate_kernel_region(mapping.paddr, Memory::page_round_up(mapping.size).release_value_but_fixme_should_propagate_errors(), {}, Memory::Region::Access::Read).release_value();
|
||||
return mapping;
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ Memory::MappedROM map_ebda()
|
|||
size_t ebda_size = (*ebda_length_ptr_b1 << 8) | *ebda_length_ptr_b0;
|
||||
|
||||
Memory::MappedROM mapping;
|
||||
mapping.region = MM.allocate_kernel_region(ebda_paddr.page_base(), Memory::page_round_up(ebda_size), {}, Memory::Region::Access::Read).release_value();
|
||||
mapping.region = MM.allocate_kernel_region(ebda_paddr.page_base(), Memory::page_round_up(ebda_size).release_value_but_fixme_should_propagate_errors(), {}, Memory::Region::Access::Read).release_value();
|
||||
mapping.offset = ebda_paddr.offset_in_page();
|
||||
mapping.size = ebda_size;
|
||||
mapping.paddr = ebda_paddr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue