From patchwork Fri Nov 20 21:35:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christoph Muellner X-Patchwork-Id: 1404146 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=theobroma-systems.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cd8xW69PQz9sTR for ; Sat, 21 Nov 2020 08:36:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5C50486F1D; Fri, 20 Nov 2020 21:36:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KjcJ-qPQ2MDS; Fri, 20 Nov 2020 21:36:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5CA1D86E3E; Fri, 20 Nov 2020 21:36:09 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 6CE631BF29F for ; Fri, 20 Nov 2020 21:36:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5AB9020377 for ; Fri, 20 Nov 2020 21:36:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c6-hgYOvLyRT for ; Fri, 20 Nov 2020 21:36:05 +0000 (UTC) X-Greylist: delayed 00:06:35 by SQLgrey-1.7.6 Received: from mail.theobroma-systems.com (vegas.theobroma-systems.com [144.76.126.164]) by silver.osuosl.org (Postfix) with ESMTPS id 8A4042036E for ; Fri, 20 Nov 2020 21:36:05 +0000 (UTC) Received: from ip092042140082.rev.nessus.at ([92.42.140.82]:52542 helo=localhost.localdomain) by mail.theobroma-systems.com with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1kgE4Y-0003Pj-DS; Fri, 20 Nov 2020 22:36:02 +0100 From: =?utf-8?q?Christoph_M=C3=BCllner?= To: buildroot@buildroot.org Date: Fri, 20 Nov 2020 22:35:55 +0100 Message-Id: <20201120213555.2994761-1-christoph.muellner@theobroma-systems.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] boot/arm-trusted-firmware: Forward stack protection configuration X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Sergey Matyukevich , =?utf-8?q?Christoph_M=C3=BCllner?= Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" TF-A supports stack smashing protection (-fstack-protector-*). Since we already forward the required compiler flag, let's also tell TF-A that we actually want the required symbols (e.g. __stack_chk_guard) to be available. Signed-off-by: Christoph Müllner --- boot/arm-trusted-firmware/arm-trusted-firmware.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.mk b/boot/arm-trusted-firmware/arm-trusted-firmware.mk index a3553e36cf..f5be39100e 100644 --- a/boot/arm-trusted-firmware/arm-trusted-firmware.mk +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.mk @@ -100,6 +100,18 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += MV_DDR_PATH=$(MV_DDR_MARVELL_DIR) ARM_TRUSTED_FIRMWARE_DEPENDENCIES += mv-ddr-marvell endif +ifeq ($(BR2_SSP_REGULAR),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ENABLE_STACK_PROTECTOR=default +endif + +ifeq ($(BR2_SSP_STRONG),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ENABLE_STACK_PROTECTOR=strong +endif + +ifeq ($(BR2_SSP_ALL),y) +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += ENABLE_STACK_PROTECTOR=all +endif + ARM_TRUSTED_FIRMWARE_MAKE_TARGETS = all ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP),y)