Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1148714pxv; Fri, 9 Jul 2021 19:34:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/opNKoFgFL9UKr38CPKa0SauqXfRDZ+g367S4mxbMW79/QNO8f92XcJ1sfTkQ9hVHmdWq X-Received: by 2002:a05:6402:1591:: with SMTP id c17mr25337379edv.146.1625884449461; Fri, 09 Jul 2021 19:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884449; cv=none; d=google.com; s=arc-20160816; b=zWF2/NQDjRtmjgd3+okoi7kbIjNE5goJGznEhlZgSt0r12pZlPaEmosbO0xTRsiLUa 9FXdgKb1rr9qUTniR4UkLkmGjpDIr/LWZgopzpBh2kXfU3+JBCLz/4mOHRKidM+371NP Tsk/XGDcQEJkZAtsC6YhgcIONXxpciNNerIr8vWWT4b48Sjqk0Ct7qA13Uu6zc0+mL9s Af0+UC8F4tLFMZLSqEvinp389BMQTi2fxpL93wGFEVAe3GBs1SOqu+/h0GY1+DqtqrGx fmorIN8uTxic9PwUy1jrF/0t/QTaDW6tBq0kX6k9gIDZ9DvbdBUlOFkFSU++gK8P9Dke 1fQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9Q99gSvcyY1310YrB/somMAm5yrDrXEZODNrnpCi8YM=; b=0EV0HC5fKmknssKPwVtpG1fcW99plZ62S5fPu5gk9kePF2hAKjcIwHD//GTMjcKhgJ fiRfniPHhYUIQ2M+ucXRTK0GRgI7FBNjjpn2dhpzF3igIP84I3s+XkI6txJjPY28JEcx i6+hYvgOxSRTm6vlb2o8EnbBvnltemRDt30F61ZaxC3SRG4gmvQK+IxuU75Je4PDFYVv EkW827/9Z8K78ZEsdMubmZDrRAegwnu63berbTXQN+ex7HvfWWNaq4aIJmThgwTg0xp4 YhaoKDFhfy5TPAY/PKRUVvCjtbaiWMc0cPGLyyVfSqRUhqB83THD09WMKE1xo9eOv1dF OusQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WFuNhiUk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si10232156edj.103.2021.07.09.19.33.45; Fri, 09 Jul 2021 19:34:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WFuNhiUk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233970AbhGJCc6 (ORCPT + 99 others); Fri, 9 Jul 2021 22:32:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:42574 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234168AbhGJC3O (ORCPT ); Fri, 9 Jul 2021 22:29:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7AB0A6142B; Sat, 10 Jul 2021 02:25:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883936; bh=IxaehiJGGRFs1bfaxinZIXvUNI2hkK+ktz7VylF8d7w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WFuNhiUkR3dnB7U8y75Ue2OxcejBZtXOfs2ztY5P9vMPEiwSCpnmyew3+AD1sW5iD z8mv/u5unP0rcam6qzoCkhQGa2CsUIeNIgUdKlCMh78oK6oItoXHSOkNHfpP1RS7vk RM412gXrI2v90fDoy8QIuvJZV+uX17o8p/a7ijBTHuKF+mcdzLQNmyC+2irYh0iCED UUmrVdG8lJ/ePf4Uv17ogGCHvkAjLmEN9isPu1oZ0FoAPCfkmReR9IY/M/ZaW+sPem eTyi0bLTBo0OJtpe9cgdWhqpkImylra9WJa+7yFrnGDDZstLcNgQ6czT8qc3UXPFRv lcDTuCawn4xrA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Fabrice Fontaine , Vasily Gorbik , Alexander Egorenkov , Sasha Levin , linux-s390@vger.kernel.org Subject: [PATCH AUTOSEL 5.10 51/93] s390: disable SSP when needed Date: Fri, 9 Jul 2021 22:23:45 -0400 Message-Id: <20210710022428.3169839-51-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022428.3169839-1-sashal@kernel.org> References: <20210710022428.3169839-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fabrice Fontaine [ Upstream commit 42e8d652438f5ddf04e5dac299cb5e623d113dc0 ] Though -nostdlib is passed in PURGATORY_LDFLAGS and -ffreestanding in KBUILD_CFLAGS_DECOMPRESSOR, -fno-stack-protector must also be passed to avoid linking errors related to undefined references to '__stack_chk_guard' and '__stack_chk_fail' if toolchain enforces -fstack-protector. Fixes - https://gitlab.com/kubu93/buildroot/-/jobs/1247043361 Signed-off-by: Fabrice Fontaine Signed-off-by: Vasily Gorbik Reviewed-by: Alexander Egorenkov Tested-by: Alexander Egorenkov Link: https://lore.kernel.org/r/20210510053133.1220167-1-fontaine.fabrice@gmail.com Signed-off-by: Vasily Gorbik Signed-off-by: Sasha Levin --- arch/s390/Makefile | 1 + arch/s390/purgatory/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/s390/Makefile b/arch/s390/Makefile index ba94b03c8b2f..92506918da63 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -28,6 +28,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables KBUILD_CFLAGS_DECOMPRESSOR += -ffreestanding +KBUILD_CFLAGS_DECOMPRESSOR += -fno-stack-protector KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-member) KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g) KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,)) diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile index c57f8c40e992..21c4ebe29b9a 100644 --- a/arch/s390/purgatory/Makefile +++ b/arch/s390/purgatory/Makefile @@ -24,6 +24,7 @@ KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding KBUILD_CFLAGS += -c -MD -Os -m64 -msoft-float -fno-common +KBUILD_CFLAGS += -fno-stack-protector KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_CFLAGS += $(call cc-option,-fno-PIE) KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS)) -- 2.30.2