|
|
|
@ -389,8 +389,12 @@ public:
|
|
|
|
|
|
|
|
|
|
if (bss_size) {
|
|
|
|
|
auto block_guard = detail::ScopeExit([&] {
|
|
|
|
|
page_table.UnmapCodeMemory(addr + nro_size, bss_addr, bss_size);
|
|
|
|
|
page_table.UnmapCodeMemory(addr, nro_addr, nro_size);
|
|
|
|
|
page_table.UnmapCodeMemory(
|
|
|
|
|
addr + nro_size, bss_addr, bss_size,
|
|
|
|
|
Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange);
|
|
|
|
|
page_table.UnmapCodeMemory(
|
|
|
|
|
addr, nro_addr, nro_size,
|
|
|
|
|
Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const ResultCode result{
|
|
|
|
@ -570,17 +574,21 @@ public:
|
|
|
|
|
auto& page_table{system.CurrentProcess()->PageTable()};
|
|
|
|
|
|
|
|
|
|
if (info.bss_size != 0) {
|
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size +
|
|
|
|
|
info.ro_size + info.data_size,
|
|
|
|
|
info.bss_address, info.bss_size));
|
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(
|
|
|
|
|
info.nro_address + info.text_size + info.ro_size + info.data_size, info.bss_address,
|
|
|
|
|
info.bss_size, Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size + info.ro_size,
|
|
|
|
|
info.src_addr + info.text_size + info.ro_size,
|
|
|
|
|
info.data_size));
|
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size,
|
|
|
|
|
info.src_addr + info.text_size, info.ro_size));
|
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address, info.src_addr, info.text_size));
|
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(
|
|
|
|
|
info.nro_address + info.text_size + info.ro_size,
|
|
|
|
|
info.src_addr + info.text_size + info.ro_size, info.data_size,
|
|
|
|
|
Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange));
|
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(
|
|
|
|
|
info.nro_address + info.text_size, info.src_addr + info.text_size, info.ro_size,
|
|
|
|
|
Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange));
|
|
|
|
|
CASCADE_CODE(page_table.UnmapCodeMemory(
|
|
|
|
|
info.nro_address, info.src_addr, info.text_size,
|
|
|
|
|
Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange));
|
|
|
|
|
return ResultSuccess;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|