mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
Fix for mm0 bss mapping of zero pages starting from wrong offset
bss segment may have some of it at the end of data, but the bits that lie on a new page need to be mmaped as anonymous. When this occured we were not passing the new page boundary but the last data page where bss started
This commit is contained in:
@@ -614,7 +614,7 @@ int task_map_bss(struct vm_file *f, struct exec_file_desc *efd, struct tcb *task
|
||||
* map those as anonymous zero pages
|
||||
*/
|
||||
if (task->bss_end > bss_mmap_start) {
|
||||
if (IS_ERR(mapped = do_mmap(0, 0, task, task->bss_start,
|
||||
if (IS_ERR(mapped = do_mmap(0, 0, task, bss_mmap_start,
|
||||
VM_READ | VM_WRITE |
|
||||
VMA_PRIVATE | VMA_ANONYMOUS,
|
||||
__pfn(page_align_up(task->bss_end) -
|
||||
|
||||
Reference in New Issue
Block a user