Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v7 0/4] Hardening Wrapper Updates and Test
@ 2018-09-17 21:21 Matt Weber
  2018-09-17 21:21 ` [Buildroot] [PATCH v7 1/4] toolchain/toolchain-wrapper: add BR2_RELRO_ Matt Weber
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Matt Weber @ 2018-09-17 21:21 UTC (permalink / raw)
  To: buildroot

This series looks to update the implementation and migration of
hardening related options to the compiler wrapper.

The series also provides runtime testing for RELRO/SSP/FORTIFY.

Overall test of features
-------------------------------------
support/testing/run-tests -k -o ~/runtime_test_tmp -d ~/dl_tmp \
 tests.core.test_hardening.TestFortifyConserv \
 tests.core.test_hardening.TestFortifyNone \
 tests.core.test_hardening.TestRelro \
 tests.core.test_hardening.TestRelroPartial \
 tests.core.test_hardening.TestSspNone \
 tests.core.test_hardening.TestSspStrong

Changes
--------------------------------------------------
v6 -> v7
 - Fixed a last minute endif rebase bug in the v6 series

v5 -> v6
 - Moved all RELRO/PIE handling to GCC frontend wrapper.
 - Updated PIE disable conditions and added comments
 - Updated comments in code and on patches to make design choices
   clear

v4 -> v5
 - RELRO patch updated to handle link time -r represented also as
   -wl,r

v3 -> v4
 - RELRO/PIE patch updated to solely use the wrapper.  I didn't
   understand how the specfiles where used and thought I needed to
   do something similar during the use of LD.  That is not the case.
   GCC compile wrapper has been updated to handle CC and LD options
   required for this feature.  Testing with verification using the
   checksec tool confirms the intended behavior is close to identical
   between the specfile approach and wrapper.  Wrapper actually is
   just slightly better since the specfile relied on FLAGS being
   correctly used.

v2 -> v3
 - Realized the complexity of having a link wrapper application vs
   using a combo of link specfile and GCC wrapper.  This patchset
   presents that hybrid approach and has updated comments on the
   patches implementing this concept to support the discussion.
 - Added additional detail to descriptions and test cases to this
   cover letter

v1 -> v2
 - There were issues when I started regression testing where
   packages where providing multiple pie/pic/shared args on
   a single call of gcc/ld.

Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
CC: Jan Kundr?t <jan.kundrat@cesnet.cz>
CC: Stefan S?rensen <stefan.sorensen@spectralink.com>

Matt Weber (4):
  toolchain/toolchain-wrapper: add BR2_RELRO_
  toolchain/toolchain-wrapper: add BR2_SSP_* support
  BR2_FORTIFY*: toolchain wrapper limitation note
  support/testing/tests/core: SSP & hardening flags

 .gitlab-ci.yml                               |   6 ++
 package/Makefile.in                          |  28 +++----
 support/testing/tests/core/test_hardening.py | 110 +++++++++++++++++++++++++++
 toolchain/toolchain-wrapper.c                |  91 +++++++++++++++++++++-
 toolchain/toolchain-wrapper.mk               |  14 ++++
 5 files changed, 228 insertions(+), 21 deletions(-)
 create mode 100644 support/testing/tests/core/test_hardening.py

-- 
1.9.1

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

end of thread, other threads:[~2018-10-20 11:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-17 21:21 [Buildroot] [PATCH v7 0/4] Hardening Wrapper Updates and Test Matt Weber
2018-09-17 21:21 ` [Buildroot] [PATCH v7 1/4] toolchain/toolchain-wrapper: add BR2_RELRO_ Matt Weber
2018-10-20 10:49   ` Peter Korsgaard
2018-09-17 21:21 ` [Buildroot] [PATCH v7 2/4] toolchain/toolchain-wrapper: add BR2_SSP_* support Matt Weber
2018-10-20 10:53   ` Peter Korsgaard
2018-09-17 21:21 ` [Buildroot] [PATCH v7 3/4] BR2_FORTIFY*: toolchain wrapper limitation note Matt Weber
2018-10-20 11:21   ` Peter Korsgaard
2018-09-17 21:21 ` [Buildroot] [PATCH v7 4/4] support/testing/tests/core: SSP & hardening flags Matt Weber
2018-10-20 11:26   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox