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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C08FDC07E9D for ; Mon, 26 Sep 2022 10:29:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235599AbiIZK2f (ORCPT ); Mon, 26 Sep 2022 06:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235439AbiIZK0q (ORCPT ); Mon, 26 Sep 2022 06:26:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5001E14D0A; Mon, 26 Sep 2022 03:18:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 78E4260BA3; Mon, 26 Sep 2022 10:17:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75375C433C1; Mon, 26 Sep 2022 10:17:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187466; bh=FtrAb8yIhs9plVrTLiCfUdL8komEh3KnF6Xt2WoP/cs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tWRK0WaqKS7dkbawBSMCg+dFUg1Y9O/ZJ5OKuNn+cj+XdmY1fQ7HdC2bXpFdkTm+Z dA+ht0WDNntleigNq9AnDEstpdBbe5j0o68xNQ/uLLhRenAflSlqYEle6DpcdHOS5q 6LQ/cuTn8952cp8RpRsgB/LK/c6pXh0J3rAvjb1Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, James Morse , Sami Tolvanen , Kees Cook , Ard Biesheuvel , Will Deacon , Sasha Levin Subject: [PATCH 4.19 05/58] efi/libstub: Disable Shadow Call Stack Date: Mon, 26 Sep 2022 12:11:24 +0200 Message-Id: <20220926100741.616552937@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100741.430882406@linuxfoundation.org> References: <20220926100741.430882406@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sami Tolvanen [ Upstream commit cc49c71d2abe99c1c2c9bedf0693ad2d3ee4a067 ] Shadow stacks are not available in the EFI stub, filter out SCS flags. Suggested-by: James Morse Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Acked-by: Ard Biesheuvel Signed-off-by: Will Deacon Stable-dep-of: 1a3887924a7e ("efi: libstub: Disable struct randomization") Signed-off-by: Sasha Levin --- drivers/firmware/efi/libstub/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index d3777d754984..e0cff3b942ac 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -31,6 +31,9 @@ KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \ $(call cc-option,-fno-addrsig) \ -D__DISABLE_EXPORTS +# remove SCS flags from all objects in this directory +KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) + GCOV_PROFILE := n KASAN_SANITIZE := n UBSAN_SANITIZE := n -- 2.35.1