Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1144144pxv; Fri, 9 Jul 2021 19:24:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwA7EQY9A7jPToh47LJ0JTvbmjN6MzrsjUph1JbuC5jY/cFPC0EMLZ6zpyYk5gu3262f/k8 X-Received: by 2002:a05:6402:2552:: with SMTP id l18mr51247987edb.363.1625883873151; Fri, 09 Jul 2021 19:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625883873; cv=none; d=google.com; s=arc-20160816; b=vU9r/Hg51Hat8pJJqN55NGu5AMo2TM8ciXyTAzTnIk7hoiboq9UWs1A9HVy7u71Q72 9i4VE0SygU3wzlXUoRy6ENuA9uzuIXzNc4vbHUHgrtcGrE4E37MAYEInl9oQCIm4qvov ew7UnpzHV2YWDtQl9SXUaGh++Dqyk3jaRnYlNPIGHF0s5GuUDNLWQ+LFLKWOgRfJaRyE O/4/iDJ/NIYY8gVYYfUQ+wDokpSIAkl7dKzZitkKu5rCVf8r83jJXmE7/DkFpnp8Eb7j VGLTDKVPip9vbqM6khOZ6pCj2E61ey6teb10vzmddQ1IjdKzosHDQv7wwCiBAMTmgGf7 17YA== 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=viPX9murpNmXYcIqBNzmZo6AekpyxdFLXvtXSuLuEwY=; b=prrLdokUSJpVHzv7oPSH1c5GYArTK1IkE1+oKon9G03NvURpVQHNvQxD7zwUVfl8kt mc4IT9Bwgzike292VsIW0LnUvs2aHeJ8giQ9Zxxlc03aysvlcbNwqSVGFGIRhRUUmUB/ JtJOG7o4diBOw4NyKpryLmFzXAhbvjPMGsVU3JZVPnqFiZAr2jC6AK9wJRZaVYlpkbyx yahpSf8jiprTLqZ8X52Go3uKr8aX/yuTQmO2cK1vafaxlWEw69JVQheuC4Zf4KZiB8QA 09/hWMW5U0JoKyw1mMAUhDMG9UJjtpb+nxF6UjWDKGM6T4/4w7J7x4+khN0QCjm09ozp lU3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K9KeVi0O; 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 w9si9731677edx.213.2021.07.09.19.24.10; Fri, 09 Jul 2021 19:24:33 -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=K9KeVi0O; 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 S232754AbhGJCXB (ORCPT + 99 others); Fri, 9 Jul 2021 22:23:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:38938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232658AbhGJCVy (ORCPT ); Fri, 9 Jul 2021 22:21:54 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CEB6B613CC; Sat, 10 Jul 2021 02:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883549; bh=iltiHxdz1e8vkb/ZLiYSQzFszXkKMHS4XNSyFkNI/TE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K9KeVi0OC+zE7g8aHVaokx6voJbdpyFI9ns0N2166y4nB2VRsvyiNCut5ppkdl/iV tiVxRWZKMA2QbzMHJsdFKyyaitTcgKY9Tii/Dy/uucnVovPaFLf4m3IhyYzIg0vrRY SWNKFl/IoNLA4iJB+CLtNm/xVThavOEUFmyJHhH0PNB6cUsz4/P7//jmqW+ZzKr8HW 28AGA2F3NfbaDexu2qCNeMI9wEvpr3TsP6ZpHCSsEx5EOkciUCIvP0mYx6dfhHXmdr 33m86uooRDToLZVjaoNKWoOFOMEc2M9NQndYfGoU1UT18ZT6E0w1aAOTbnOvx6lpIF IF+SKJI5fFk+g== 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.13 059/114] s390: disable SSP when needed Date: Fri, 9 Jul 2021 22:16:53 -0400 Message-Id: <20210710021748.3167666-59-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710021748.3167666-1-sashal@kernel.org> References: <20210710021748.3167666-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 e443ed9947bd..098abe3a56f3 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 -mbackchain 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