From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Rick Edgecombe <rick.p.edgecombe@intel.com>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org,
kernel-hardening@lists.openwall.com, daniel@iogearbox.net,
jannh@google.com, keescook@chromium.org, kristen@linux.intel.com,
dave.hansen@intel.com, arjan@linux.intel.com,
netdev@vger.kernel.org
Subject: Re: [PATCH v4 0/3] KASLR feature to randomize each loadable module
Date: Wed, 29 Aug 2018 19:27:04 -0700 [thread overview]
Message-ID: <20180830022703.xxl5eolthinicgwp@ast-mbp> (raw)
In-Reply-To: <1535583579-6138-1-git-send-email-rick.p.edgecombe@intel.com>
On Wed, Aug 29, 2018 at 03:59:36PM -0700, Rick Edgecombe wrote:
> Hi,
>
> This is v4 of the "KASLR feature to randomize each loadable module" patchset.
> The purpose is to increase the randomization and also to make the modules
> randomized in relation to each other instead of just the base, so that if one
> module leaks the location of the others can't be inferred. It is enabled for
> x86_64 for now.
>
> V4 is a few small fixes. I humbly think this is in pretty good shape at this
> point, unless anyone has any comments. The only other big change I was
> considering was moving the new randomization algorithm into vmalloc so it could
> be re-used for other architectures or possibly other vmalloc usages.
>
> A few words on how this was tested - As previously mentioned, the entropy
> estimates were done using extracted module text sizes from the in-tree modules.
> These were also used to run 100,000's of simulated module allocations by calling
> module_alloc from a test module, including testing until allocation failure. The
> simulations kept track of every allocation address to make sure there were no
> collisions, and verified memory was actually mapped.
>
> In addition the __vmalloc_node_try_addr function has a suite of unit tests that
> verify for a bunch of edge cases that it:
> - Allows for allocations when it should
> - Reports the right error code if it collides with a lazy-free area or real
> allocation
> - Verifies it frees a lazy free area when it should
>
> These synthetic tests were also how the performance metrics were gathered.
>
> Changes for V4:
> - Fix issue caused by KASAN, kmemleak being provided different allocation
> lengths (padding).
> - Avoid kmalloc until sure its needed in __vmalloc_node_try_addr.
> - Fix for debug file hang when the last VA is a lazy purge area
> - Fixed issues reported by 0-day build system.
>
> Changes for V3:
> - Code cleanup based on internal feedback. (thanks to Dave Hansen and Andriy
> Shevchenko)
> - Slight refactor of existing algorithm to more cleanly live along side new
> one.
> - BPF synthetic benchmark
I don't see this benchmark in this patch set.
Could you prepare it as a test in tools/testing/selftests/bpf/ ?
so we can double check what is being tested and run it regularly
like we do for all other tests in there.
next prev parent reply other threads:[~2018-08-30 2:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 22:59 Rick Edgecombe
2018-08-29 22:59 ` [PATCH v4 1/3] vmalloc: Add __vmalloc_node_try_addr function Rick Edgecombe
2018-08-29 22:59 ` [PATCH v4 2/3] x86/modules: Increase randomization for modules Rick Edgecombe
2018-08-29 22:59 ` [PATCH v4 3/3] vmalloc: Add debugfs modfraginfo Rick Edgecombe
2018-08-30 2:27 ` Alexei Starovoitov [this message]
2018-08-30 18:24 ` [PATCH v4 0/3] KASLR feature to randomize each loadable module Edgecombe, Rick P
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=20180830022703.xxl5eolthinicgwp@ast-mbp \
--to=alexei.starovoitov@gmail.com \
--cc=arjan@linux.intel.com \
--cc=daniel@iogearbox.net \
--cc=dave.hansen@intel.com \
--cc=hpa@zytor.com \
--cc=jannh@google.com \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=kristen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rick.p.edgecombe@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox