From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21AECC433EF for ; Mon, 6 Sep 2021 15:43:20 +0000 (UTC) Received: from smtp4.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 mail.kernel.org (Postfix) with ESMTPS id DD61060F14 for ; Mon, 6 Sep 2021 15:43:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DD61060F14 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=korsgaard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.buildroot.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B7F06404CF; Mon, 6 Sep 2021 15:43:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EsAiNb5746UA; Mon, 6 Sep 2021 15:43:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 1876B404DF; Mon, 6 Sep 2021 15:43:18 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 31BD11BF97E for ; Mon, 6 Sep 2021 15:42:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 2BD6E60883 for ; Mon, 6 Sep 2021 15:42:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iS7TpN6pLuhZ for ; Mon, 6 Sep 2021 15:42:30 +0000 (UTC) Received: from busybox.osuosl.org (busybox.osuosl.org [140.211.167.122]) by smtp3.osuosl.org (Postfix) with ESMTP id 689336072C for ; Mon, 6 Sep 2021 15:42:30 +0000 (UTC) Received: by busybox.osuosl.org (Postfix, from userid 4021) id C4901886F6; Mon, 6 Sep 2021 15:41:03 +0000 (UTC) From: Peter Korsgaard To: buildroot@buildroot.org Date: Mon, 6 Sep 2021 17:36:05 +0200 X-Git-Refname: refs/heads/2021.02.x X-Git-Oldrev: d657acfffba70fa65e5938767cc37007b6c4dc0d X-Git-Newrev: e310dccbee0e346a1921fe2824aa8c3f482be290 X-Patchwork-Hint: ignore Message-Id: <20210906154103.C4901886F6@busybox.osuosl.org> Subject: [Buildroot] [git commit branch/2021.02.x] Config.in: disable Fortify Source for microblaze X-BeenThere: buildroot@lists.buildroot.org 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: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@lists.buildroot.org Sender: "buildroot" commit: https://git.buildroot.net/buildroot/commit/?id=e310dccbee0e346a1921fe2824aa8c3f482be290 branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2021.02.x As reported by Toolchain-builder project [1], the microblaze glibc toolchain creates a system that doesn't boot when FORTIFY_SOURCE is enabled: the init process hangs. Also, hardening features may not be wanted or possible for such slow soft-core cpus [2]. Note: for completeness, BR2_RELRO_PARTIAL was manually tested and it does boot. [1] https://gitlab.com/bootlin/toolchains-builder/-/jobs/1467624500 [2] http://lists.busybox.net/pipermail/buildroot/2021-June/312416.html Signed-off-by: Romain Naour Cc: Thomas Petazzoni Cc: Giulio Benetti Signed-off-by: Arnout Vandecappelle (Essensium/Mind) (cherry picked from commit 2e94aeed1a97f5b66b9a8dc4f0133451b7b7b34f) Signed-off-by: Peter Korsgaard --- Config.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Config.in b/Config.in index 48c373af9f..dad39a5837 100644 --- a/Config.in +++ b/Config.in @@ -835,8 +835,15 @@ endchoice comment "RELocation Read Only (RELRO) needs shared libraries" depends on !BR2_SHARED_LIBS +config BR2_FORTIFY_SOURCE_ARCH_SUPPORTS + bool + default y + # Microblaze glibc toolchains don't work with Fortify Source enabled + depends on !BR2_microblaze + choice bool "Buffer-overflow Detection (FORTIFY_SOURCE)" + depends on BR2_FORTIFY_SOURCE_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_USES_GLIBC depends on !BR2_OPTIMIZE_0 help @@ -877,6 +884,7 @@ config BR2_FORTIFY_SOURCE_2 endchoice comment "Fortify Source needs a glibc toolchain and optimization" + depends on BR2_FORTIFY_SOURCE_ARCH_SUPPORTS depends on (!BR2_TOOLCHAIN_USES_GLIBC || BR2_OPTIMIZE_0) endmenu _______________________________________________ buildroot mailing list buildroot@lists.buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot