Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1422390

[PATCH v3 0/4] Introduce the latent_entropy gcc plugin

From Emese Revfy <re.emese@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v3 0/4] Introduce the latent_entropy gcc plugin
Date 2016-06-15 00:20 +0200
Message-ID <rK4QF-2oZ-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


I would like to introduce the latent_entropy gcc plugin. This plugin mitigates
the problem of the kernel having too little entropy during and after boot
for generating crypto keys.

This plugin mixes random values into the latent_entropy global variable
in functions marked by the __latent_entropy attribute.
The value of this global variable is added to the kernel entropy pool
to increase the entropy.

It is a CII project supported by the Linux Foundation.

The latent_entropy plugin was ported from grsecurity/PaX originally written by
the PaX Team. You can find more about the plugin here:
https://grsecurity.net/pipermail/grsecurity/2012-July/001093.html

The plugin supports all gcc version from 4.5 to 6.0.

I do some changes above the PaX version. The important one is mixing
the stack pointer into the global variable too.
You can find more about the changes here:
https://github.com/ephox-gcc-plugins/latent_entropy

This patch set is based on the "Introduce GCC plugin infrastructure" patch set (v9 next-20160520).

Emese Revfy (4):
 Add support for passing gcc plugin arguments
 Add the latent_entropy gcc plugin
 Mark functions with the latent_entropy attribute
 Add the extra_latent_entropy kernel parameter


Changes from v2:
  * Moved the passing of gcc plugin arguments into a separate patch
    (Suggested-by: Kees Cook <keescook@chromium.org>)
  * Mix the global entropy variable with the stack pointer (latent_entropy_plugin.c)
  * Handle tail calls (latent_entropy_plugin.c)
  * Fix some indentation related warnings suggested by checkpatch.pl (latent_entropy_plugin.c)
  * Commented some latent_entropy plugin code
    (Suggested-by: Kees Cook <keescook@chromium.org>)

Changes from v1:
  * Remove unnecessary ifdefs
    (Suggested-by: Kees Cook <keescook@chromium.org>)
  * Separate the two definitions of add_latent_entropy()
    (Suggested-by: Kees Cook <keescook@chromium.org>)
  * Removed unnecessary global variable (latent_entropy_plugin.c)
  * About the latent_entropy gcc attribute (latent_entropy_plugin.c)
  * Measure the boot time performance impact of the latent_entropy plugin (arch/Kconfig)

---
 Documentation/kernel-parameters.txt         |   5 +
 arch/Kconfig                                |  23 ++
 arch/powerpc/kernel/Makefile                |   8 +-
 block/blk-softirq.c                         |   2 +-
 drivers/char/random.c                       |   6 +-
 fs/namespace.c                              |   2 +-
 include/linux/compiler-gcc.h                |   7 +
 include/linux/compiler.h                    |   4 +
 include/linux/fdtable.h                     |   2 +-
 include/linux/genhd.h                       |   2 +-
 include/linux/init.h                        |   4 +-
 include/linux/random.h                      |  14 +-
 init/main.c                                 |   1 +
 kernel/fork.c                               |   5 +-
 kernel/rcu/tiny.c                           |   2 +-
 kernel/rcu/tree.c                           |   2 +-
 kernel/sched/fair.c                         |   2 +-
 kernel/softirq.c                            |   4 +-
 kernel/time/timer.c                         |   2 +-
 lib/irq_poll.c                              |   2 +-
 lib/random32.c                              |   2 +-
 mm/page_alloc.c                             |  30 ++
 net/core/dev.c                              |   4 +-
 scripts/Makefile.gcc-plugins                |  10 +-
 scripts/gcc-plugins/Makefile                |   1 +
 scripts/gcc-plugins/latent_entropy_plugin.c | 597 ++++++++++++++++++++++++++++
 26 files changed, 714 insertions(+), 29 deletions(-)

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/4] Introduce the latent_entropy gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-15 00:20 +0200
  [PATCH v3 2/4] Add the latent_entropy gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-15 00:20 +0200
    Re: [PATCH v3 2/4] Add the latent_entropy gcc plugin Kees Cook <keescook@chromium.org> - 2016-06-15 20:10 +0200
      Re: [PATCH v3 2/4] Add the latent_entropy gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-15 22:50 +0200
        Re: [PATCH v3 2/4] Add the latent_entropy gcc plugin Kees Cook <keescook@chromium.org> - 2016-06-16 00:40 +0200
  [PATCH v3 3/4] Mark functions with the latent_entropy attribute Emese Revfy <re.emese@gmail.com> - 2016-06-15 00:20 +0200
  [PATCH v3 1/4] Add support for passing gcc plugin arguments Emese Revfy <re.emese@gmail.com> - 2016-06-15 00:20 +0200
  Re: [PATCH v3 0/4] Introduce the latent_entropy gcc plugin Kees Cook <keescook@chromium.org> - 2016-06-15 21:00 +0200
    Re: [PATCH v3 0/4] Introduce the latent_entropy gcc plugin Emese Revfy <re.emese@gmail.com> - 2016-06-15 22:40 +0200
      Re: [PATCH v3 0/4] Introduce the latent_entropy gcc plugin Kees Cook <keescook@chromium.org> - 2016-06-16 01:10 +0200
        Re: [PATCH v3 0/4] Introduce the latent_entropy gcc plugin Joe Perches <joe@perches.com> - 2016-06-16 01:20 +0200

csiph-web