From nobody Fri Dec 19 07:18:07 2025 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 10879C07E9D for ; Mon, 26 Sep 2022 10:22:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235317AbiIZKWx (ORCPT ); Mon, 26 Sep 2022 06:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235133AbiIZKVj (ORCPT ); Mon, 26 Sep 2022 06:21:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1C1A4BA68; Mon, 26 Sep 2022 03:16:11 -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 F37EE60B7E; Mon, 26 Sep 2022 10:16:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF965C433C1; Mon, 26 Sep 2022 10:16:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187370; bh=y7+eLYjbcVCNH/jVgiBmW+NgV5JOjwNfZtMYz35Va1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rwt5x/nZTzaMcy1Sa50UAUnFUcDz8k5JKd1rUKli+J/xsZur1wPS0ZNjdF803RaBO TrwSr7lTntMH05aVOEwuh2kmawRBtV4MgXfFbdFdmJDucYJNIOPx2eey+Fp2VhE/lb Dk7MjAXN2/1yH2sjY4azrwRVjLYcnMTbV5Bby4t8= 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.14 05/40] efi/libstub: Disable Shadow Call Stack Date: Mon, 26 Sep 2022 12:11:33 +0200 Message-Id: <20220926100738.422260948@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100738.148626940@linuxfoundation.org> References: <20220926100738.148626940@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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/l= ibstub/Makefile index 678bc910e080..54dbcec7e06f 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -23,6 +23,9 @@ KBUILD_CFLAGS :=3D $(cflags-y) -DDISABLE_BRANCH_PROFILI= NG \ $(call cc-option,-ffreestanding) \ $(call cc-option,-fno-stack-protector) =20 +# remove SCS flags from all objects in this directory +KBUILD_CFLAGS :=3D $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) + GCOV_PROFILE :=3D n KASAN_SANITIZE :=3D n UBSAN_SANITIZE :=3D n --=20 2.35.1