From: Mike Rapoport <rppt@kernel.org>
To: Topi Miettinen <toiwoton@gmail.com>
Cc: linux-hardening@vger.kernel.org, akpm@linux-foundation.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Andy Lutomirski <luto@kernel.org>, Jann Horn <jannh@google.com>,
Kees Cook <keescook@chromium.org>,
Linux API <linux-api@vger.kernel.org>,
Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH] mm/vmalloc: randomize vmalloc() allocations
Date: Thu, 3 Dec 2020 08:58:01 +0200 [thread overview]
Message-ID: <20201203065801.GH751215@kernel.org> (raw)
In-Reply-To: <9d34fb0a-7aba-1e84-6426-006ea7c3d9f5@gmail.com>
On Wed, Dec 02, 2020 at 08:49:06PM +0200, Topi Miettinen wrote:
> On 1.12.2020 23.45, Topi Miettinen wrote:
> > Memory mappings inside kernel allocated with vmalloc() are in
> > predictable order and packed tightly toward the low addresses. With
> > new kernel boot parameter 'randomize_vmalloc=1', the entire area is
> > used randomly to make the allocations less predictable and harder to
> > guess for attackers.
> >
>
> This also seems to randomize module addresses. I was going to check that
> next, so nice surprise!
Heh, that's because module_alloc() uses vmalloc() in that way or another :)
> -Topi
>
> > spin_unlock(&free_vmap_area_lock);
> > if (unlikely(addr == vend))
> >
>
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2020-12-03 6:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 21:45 [PATCH] mm/vmalloc: randomize vmalloc() allocations Topi Miettinen
2020-12-02 18:49 ` Topi Miettinen
2020-12-03 6:58 ` Mike Rapoport [this message]
2020-12-03 23:15 ` David Laight
2020-12-04 10:58 ` Topi Miettinen
2020-12-04 13:33 ` David Laight
2020-12-04 16:53 ` Topi Miettinen
2020-12-09 19:08 ` Topi Miettinen
2020-12-10 19:58 ` Topi Miettinen
2020-12-02 18:53 ` Matthew Wilcox
2020-12-02 21:28 ` Topi Miettinen
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=20201203065801.GH751215@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=jannh@google.com \
--cc=keescook@chromium.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=toiwoton@gmail.com \
--cc=willy@infradead.org \
/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.