lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1507261078-23615-1-git-send-email-bhe@redhat.com>
Date:   Fri,  6 Oct 2017 11:37:55 +0800
From:   Baoquan He <bhe@...hat.com>
To:     linux-kernel@...r.kernel.org
Cc:     viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org,
        oleg@...hat.com, mhocko@...ne.org, keescook@...omium.org,
        jkosina@...e.cz, mingo@...e.hu, torvalds@...ux-foundation.org,
        Baoquan He <bhe@...hat.com>
Subject: [PATCH 0/3] binfmt_elf: Clean up codes related to total_size passed into elf_map()

Currently total_size passed into elf_map() is non-zero only for dynamic
loader, either in load_elf_interp(), or in load_elf_binary() for ET_DYN
without INTERP case. Now PIE programs are loaded offset from ELF_ET_DYN_BASE,
and map flags has been set as MAP_FIXED, no need to use tatal_size strategy.

And in elf_map(), Oleg pointed out that the mmap(total_size) + munmap(extra_size)
way looks very ugly. We can search the unmapped area of total_size big,
then only map the 1st PT_LOAD segment with the searched address.

In this patchset, clean up them all.

Baoquan He (3):
  binfmt_elf: Clean up the variable name of map flags
  binfmt_elf: Get the total_size only for dynamic loader in
    load_elf_binary()
  binfmt_elf: Search an unmapped area with total_size but not map the
    whole image

 fs/binfmt_elf.c | 50 +++++++++++++++++++++++++++-----------------------
 1 file changed, 27 insertions(+), 23 deletions(-)

-- 
2.5.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ