From: Baoquan He <bhe@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
oleg@redhat.com, mhocko@kerne.org, keescook@chromium.org,
jkosina@suse.cz, mingo@kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org
Subject: Re: [PATCH 0/3] binfmt_elf: Clean up codes related to total_size passed into elf_map()
Date: Tue, 7 Nov 2017 20:00:15 +0800 [thread overview]
Message-ID: <20171107120015.GB14732@x1> (raw)
In-Reply-To: <1507261078-23615-1-git-send-email-bhe@redhat.com>
Hi maintainers and experts,
Any comment about this patchset?
At least for patch 2, I think we can correct it since we do not have to
take the total_size way for PIE programs which are MAP_FIXED and are
loaded offset from ELF_ET_DYN_BASE. That is making code a little
confusing.
About patch 3, it's pointed out in an Redhat internal patch reviewing. I
am fine if no one like it.
If approved, I can update the git log to make it better and repost.
Thanks
Baoquan
On 10/06/17 at 11:37am, Baoquan He wrote:
> 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
>
prev parent reply other threads:[~2017-11-07 12:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 3:37 [PATCH 0/3] binfmt_elf: Clean up codes related to total_size passed into elf_map() Baoquan He
2017-10-06 3:37 ` [PATCH 1/3] binfmt_elf: Clean up the variable name of map flags Baoquan He
2017-10-06 3:37 ` [PATCH 2/3] binfmt_elf: Get the total_size only for dynamic loader in load_elf_binary() Baoquan He
2017-10-06 3:37 ` [PATCH 3/3] binfmt_elf: Search an unmapped area with total_size but not map the whole image Baoquan He
2017-11-07 12:00 ` Baoquan He [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171107120015.GB14732@x1 \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=jkosina@suse.cz \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@kerne.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).