lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190807221539.94583-3-ndesaulniers@google.com>
Date:   Wed,  7 Aug 2019 15:15:34 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de
Cc:     peterz@...radead.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org, yamada.masahiro@...ionext.com,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: [PATCH v5 0/2] Support kexec/kdump for clang built kernel

1. Reuse the implementation of memcpy and memset instead of relying on
__builtin_memcpy and __builtin_memset as it causes infinite recursion
in Clang (at any opt level) or GCC at -O2.
2. Don't reset KBUILD_CFLAGS, rather filter CONFIG_FUNCTION_TRACER,
CONFIG_STACKPROTECTOR, CONFIG_STACKPROTECTOR_STRONG, and
CONFIG_RETPOLINE flags via `CFLAGS_REMOVE_<file>.o'.

A good test of this series (besides boot testing a kexec kernel):
* There should be no undefined symbols in arch/x86/purgatory/purgatory.ro:
$ nm arch/x86/purgatory/purgatory.ro
  particularly `warn`, `bcmp`, `__stack_chk_fail`, `memcpy` or `memset`.
* `-pg`, `-fstack-protector`, `-fstack-protector-strong`, and
  $(RETPOLINE_CFLAGS) should not be added to the command line for the C
  source files under arch/x86/purgatory/ when compiling with
  CONFIG_FUNCTION_TRACER=y, CONFIG_STACKPROTECTOR=y,
  CONFIG_STACKPROTECTOR_STRONG=y, and CONFIG_RETPOLINE=y.

V5 of: https://lkml.org/lkml/2019/7/25/1276

Nick Desaulniers (2):
  x86/purgatory: do not use __builtin_memcpy and __builtin_memset
  x86/purgatory: use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS

 arch/x86/boot/string.c         |  7 +++++++
 arch/x86/purgatory/Makefile    | 29 ++++++++++++++++++++++++-----
 arch/x86/purgatory/purgatory.c |  6 ++++++
 arch/x86/purgatory/string.c    | 23 -----------------------
 4 files changed, 37 insertions(+), 28 deletions(-)
 delete mode 100644 arch/x86/purgatory/string.c

-- 
2.22.0.709.g102302147b-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ