All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>, Jiri Kosina <jkosina@suse.cz>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Oleg Nesterov <oleg@redhat.com>, Ingo Molnar <mingo@redhat.com>,
	Baoquan He <bhe@redhat.com>
Subject: [PATCH 0/2] fs, elf: get rid of MAP_FIXED from the loader
Date: Mon, 16 Oct 2017 15:44:44 +0200	[thread overview]
Message-ID: <20171016134446.19910-1-mhocko@kernel.org> (raw)
In-Reply-To: <20171004075059.bbx7madwgwflb7ky@dhcp22.suse.cz>

Hi,
the previous discussion didn't really show any hard requirement for
MAP_FIXED usage for the elf segments mapping. I have spent some more
time studying the code (thanks to Qualys for their insight) and
concluded that the current MAP_FIXED usage is rather fragile and not
really needed. The first patch replaces it by a hint mmaping and failing
rather than silently corrupt an existing memory and the second patch
removes MAP_FIXED for the initial segment mapping because this shouldn't
be really needed either, I would even call it wrong.
Anyway, more details are in the changelog of patches. I will really
appreciate any feedback.

This has passed some testing with PIE/PIC binaries running in the loop
without any negative side effects detected.

  parent reply	other threads:[~2017-10-16 13:44 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04  7:50 MAP_FIXED for ELF mappings Michal Hocko
2017-10-04  7:59 ` Michal Hocko
2017-10-04 15:03 ` Baoquan He
2017-10-04 15:11   ` Michal Hocko
2017-10-04 15:12   ` Baoquan He
2017-10-04 15:17     ` Michal Hocko
2017-10-04 15:37       ` Baoquan He
2017-10-04 17:12         ` Michal Hocko
2017-10-04 17:15           ` Linus Torvalds
2017-10-04 17:28             ` Michal Hocko
2017-10-05 16:33       ` Oleg Nesterov
2017-10-05 16:42         ` Michal Hocko
2017-10-16 13:44 ` Michal Hocko [this message]
2017-10-16 13:44   ` [PATCH 1/2] fs, elf: drop MAP_FIXED usage from elf_map Michal Hocko
2017-10-16 16:39     ` Kees Cook
     [not found]       ` <CAGXu5jK8n4SCHniH85Wwtzw8QdoO1_1CMoiWqGnG-OBSwH2FRw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-16 19:00         ` Michal Hocko
2017-10-16 19:00           ` Michal Hocko
2017-10-16 20:02           ` James Hogan
2017-10-16 20:02             ` James Hogan
2017-10-17  7:37             ` Michal Hocko
2017-10-17  7:37               ` Michal Hocko
2017-10-17  8:35               ` James Hogan
2017-10-17  8:35                 ` James Hogan
2017-10-17  8:56                 ` Michal Hocko
2017-10-17 12:26     ` Baoquan He
2017-10-17 12:56       ` Michal Hocko
2017-10-17 13:22         ` Baoquan He
2017-10-17 13:33           ` Michal Hocko
2017-10-17 13:42             ` Baoquan He
2017-10-16 13:44   ` [PATCH 2/2] fs, elf: drop MAP_FIXED from initial ET_DYN segment Michal Hocko
2017-10-16 16:44     ` Kees Cook
2017-10-16 18:43       ` Michal Hocko
2017-10-16 19:38         ` Kees Cook
2017-10-17  9:04           ` Michal Hocko
2017-10-17 20:01             ` Kees Cook
2017-10-19 11:20               ` Michal Hocko
2017-10-19 17:19                 ` Kees Cook
2017-10-20  8:45                   ` Michal Hocko
2017-10-20 14:12                     ` Kees Cook

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=20171016134446.19910-1-mhocko@kernel.org \
    --to=mhocko@kernel.org \
    --cc=bhe@redhat.com \
    --cc=jkosina@suse.cz \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.