Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1146092pxv; Fri, 9 Jul 2021 19:28:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8YvtTOFfKq7hBYnVebM5eJyvCvvjOHA2wfqUMkJIb+myUqDW4y1pjb8hzzfed6Z3GSZqr X-Received: by 2002:a17:906:36cc:: with SMTP id b12mr40100934ejc.534.1625884133064; Fri, 09 Jul 2021 19:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625884133; cv=none; d=google.com; s=arc-20160816; b=cB1+J4fx8SOEYFxFyL1a4feQsPeCdIHVyFgEmeOaDTf3bVstIqQ/NUigOP+8ZQUqDD LMXFRGw/BjPyp71BWDSTWHHl8KaCewHcvQBUUU3+5qWxd3qsXAEBC4kUGqPrEDA3O7B6 8PwLKIxT/Bu8UwdRiwkTqGcwt6lB+sXT/RwdO7xOjRHUsv3u/CDw0aljGpvFfcGVFnsJ /es4keFY25iFJfeAZx+NE+ZnoLIzt94SvT42CnjO2AeNXRgzkKSmD9BCRDlWUiWHdOKP nS+rHkDLG19jyycVawH1xO0xvd0EH+5dUMV3YeUgEGe/B0OqkRKKk8DoT8thMPZtbrHJ daMQ== 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=xWWhlaNSps4AmPkQ6ooUVyu6BGHjKENVNuAep2Unohw1sRFSazkznwd+hIFLMhjm4s XMrDN8LaeOsAP6Hm1MhfBpIQ3FlrpXtwJ1SismUa+TOLEaZWqyOUhxeCb98mvh46ewKJ pbcbCF+6MntxPhnYVTKRC5M99NvX0jxAq0GqOIoCg94lGNjOlvb4hUg9u3ffJCFx5W7b MT6LPwPheznsN4aF24e44bZ+Gwh+dKUxw3u0l8BObnGrXgAD6MZe4iFhR5MFtSs1zRt8 3YPGqIpoEpp7KvCo3RJUXzlOBMj1/jEuvF5Qka/XxwIXz0uNcqVV8bcKwUeTIqtkDvKx xbEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="so/SUlL0"; 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 y7si9541951edc.202.2021.07.09.19.28.30; Fri, 09 Jul 2021 19:28:53 -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="so/SUlL0"; 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 S233697AbhGJC1C (ORCPT + 99 others); Fri, 9 Jul 2021 22:27:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:43262 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233162AbhGJCZw (ORCPT ); Fri, 9 Jul 2021 22:25:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 51C67613AF; Sat, 10 Jul 2021 02:23:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883788; bh=iltiHxdz1e8vkb/ZLiYSQzFszXkKMHS4XNSyFkNI/TE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=so/SUlL0w5SKrvtQl6dNuYqzx4VBsekKMnmCkAjP6lAwxK+S/4cqoshhZp0zTVQYn 8wNOZ3ZRZxa1lXeBTEbDzHCN82XnEB88rh39rMOWqZrWIOozvr7l9vT17ctj+6QlbV El4ILWQyny/UNruS33Ex0vqYYoSUDOrLAjwbYSPtMS0Qs75LUUY1JDPW3YdUtHObXZ 9yH6lwFiNSktOjoZhFzv5Jk4u2Ah8JTg/1MXTxY0oZNFDnQu+2AHgDeSJEi1j119LQ 3b1SpK+J3Qlo1mIWrigqOmCGZa69n+ygOX9McUJlxVT9TpkukUUbKG5amQ4E4tpXDm OOjRuHiu2A5sQ== 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.12 054/104] s390: disable SSP when needed Date: Fri, 9 Jul 2021 22:21:06 -0400 Message-Id: <20210710022156.3168825-54-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710022156.3168825-1-sashal@kernel.org> References: <20210710022156.3168825-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