linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/4] KASLR feature to randomize each loadable module
@ 2018-09-13 21:31 Rick Edgecombe
  2018-09-13 21:31 ` [PATCH v6 1/4] vmalloc: Add __vmalloc_node_try_addr function Rick Edgecombe
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Rick Edgecombe @ 2018-09-13 21:31 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86, linux-kernel, linux-mm, kernel-hardening,
	daniel, jannh, keescook, alexei.starovoitov
  Cc: kristen, dave.hansen, arjan, Rick Edgecombe

Hi,

This is V6 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.

V6 is just a fix for 0-day arch=SH report, and made the error handling code
more robust in case this gets used for something unforeseeable in the future.

Changes for V6:
 - 0-day build fixes by removing un-needed functional testing, more error
   handling

Changes for V5:
 - Add module_alloc test module

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.
 - Fixed issues reported by 0-day.

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

Changes for V2:
 - New implementation of __vmalloc_node_try_addr based on the
   __vmalloc_node_range implementation, that only flushes TLB when needed.
 - Modified module loading algorithm to try to reduce the TLB flushes further.
 - Increase "random area" tries in order to increase the number of modules that
   can get high randomness.
 - Increase "random area" size to 2/3 of module area in order to increase the
   number of modules that can get high randomness.
 - Fix for 0day failures on other architectures.
 - Fix for wrong debugfs permissions. (thanks to Jann Horn)
 - Spelling fix. (thanks to Jann Horn)
 - Data on module_alloc performance and TLB flushes. (brought up by Kees Cook
   and Jann Horn)
 - Data on memory usage. (suggested by Jann)


Rick Edgecombe (4):
  vmalloc: Add __vmalloc_node_try_addr function
  x86/modules: Increase randomization for modules
  vmalloc: Add debugfs modfraginfo
  Kselftest for module text allocation benchmarking

 arch/x86/include/asm/pgtable_64_types.h       |   7 +
 arch/x86/kernel/module.c                      | 165 ++++++++++--
 include/linux/vmalloc.h                       |   3 +
 lib/Kconfig.debug                             |  10 +
 lib/Makefile                                  |   1 +
 lib/test_mod_alloc.c                          | 354 ++++++++++++++++++++++++++
 mm/vmalloc.c                                  | 279 +++++++++++++++++++-
 tools/testing/selftests/bpf/test_mod_alloc.sh |  29 +++
 8 files changed, 823 insertions(+), 25 deletions(-)
 create mode 100644 lib/test_mod_alloc.c
 create mode 100755 tools/testing/selftests/bpf/test_mod_alloc.sh

-- 
2.7.4

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-09-24 21:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-13 21:31 [PATCH v6 0/4] KASLR feature to randomize each loadable module Rick Edgecombe
2018-09-13 21:31 ` [PATCH v6 1/4] vmalloc: Add __vmalloc_node_try_addr function Rick Edgecombe
2018-09-21 18:46   ` Kees Cook
2018-09-13 21:31 ` [PATCH v6 2/4] x86/modules: Increase randomization for modules Rick Edgecombe
2018-09-21 19:05   ` Kees Cook
2018-09-24 18:57     ` Edgecombe, Rick P
2018-09-24 19:58       ` Kees Cook
2018-09-24 21:27         ` Edgecombe, Rick P
2018-09-24 21:29           ` Kees Cook
2018-09-13 21:31 ` [PATCH v6 3/4] vmalloc: Add debugfs modfraginfo Rick Edgecombe
2018-09-21 18:56   ` Kees Cook
2018-09-24 18:58     ` Edgecombe, Rick P
2018-09-24 20:03       ` Kees Cook
2018-09-13 21:31 ` [PATCH v6 4/4] Kselftest for module text allocation benchmarking Rick Edgecombe
2018-09-18  0:27   ` kbuild test robot
2018-09-21 19:05 ` [PATCH v6 0/4] KASLR feature to randomize each loadable module Kees Cook

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).