Changeset 2c86f81 in mainline for kernel/generic/src/mm/backend_elf.c


Ignore:
Timestamp:
2011-04-17T18:54:49Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3ac69647
Parents:
b4dc35a
Message:

Writable ELF segments need to be reserved memory regardless of whether
some pages are anonymous or not.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/backend_elf.c

    rb4dc35a r2c86f81  
    7575        size_t nonanon_pages = ALIGN_DOWN(entry->p_filesz, PAGE_SIZE);
    7676
     77        if (entry->p_flags & PF_W)
     78                nonanon_pages = 0;
     79
    7780        if (area->pages <= nonanon_pages)
    7881                return true;
     
    8588        elf_segment_header_t *entry = area->backend_data.segment;
    8689        size_t nonanon_pages = ALIGN_DOWN(entry->p_filesz, PAGE_SIZE);
     90
     91        if (entry->p_flags & PF_W)
     92                nonanon_pages = 0;
    8793
    8894        if (new_pages > area->pages) {
     
    195201        elf_segment_header_t *entry = area->backend_data.segment;
    196202        size_t nonanon_pages = ALIGN_DOWN(entry->p_filesz, PAGE_SIZE);
     203
     204        if (entry->p_flags & PF_W)
     205                nonanon_pages = 0;
    197206
    198207        if (area->pages > nonanon_pages)
Note: See TracChangeset for help on using the changeset viewer.