Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp776898rwb; Mon, 26 Sep 2022 05:51:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM64CD1PyfCV080T+oc2kDZcfQQa2ho8/i0fEgfzc1QpXRyAltdHeLZXzVvLXfX9baJ0MboV X-Received: by 2002:a17:902:e40c:b0:176:9543:883 with SMTP id m12-20020a170902e40c00b0017695430883mr21869366ple.169.1664196716944; Mon, 26 Sep 2022 05:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664196716; cv=none; d=google.com; s=arc-20160816; b=ltedKRMjCoFgeTcqlUZ7DO6ABFNWgaV5Go/yJhs0sSEHhBiNEWfoCg26Tcb0OV+cfI ZIa7Kp2NMm4Sk5SxM7CVmk8A4RPycFmPS9QurZ18cemczknSvcpsbth9UbZRYv0k1tT0 NjrpwvIqKN6U40Smz4qZq+qqjULAbZ7QjdyfJ8eiug5cxyHcaWCbNGiZp3U64m7MO3R0 h9jx4IYGgovtab4BjRnEq1/sNqMZuxkPyBGGf1Di44cGN2VcTC9wV/q4RPFuMrgN+A5d CM8YUKo4zzi7Ea4VlGItq4l/kA1etxgbhNqd/8e1KF2mCLELcEFFliJR48kMZvSBqEIp rpgA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oe0TZCaS8rrE4/gz7pfS5UMpvp3DAdp29qliD8cgUiQ=; b=v+ivL5e+OHQ9ClHSDTlYVO0JBQSZul4WMra70jhuDmL3Rv64jlRzf56+hlqfRAmttC +SZYkTV+V0TWCpX4qC1vOlj0XYvR7xazMXMQAvFiktmLztCfvbNK8e9ouRasUToxiwoP jhduHExpxZNhOPtpwsQBvlkV7pnApLCqRAOPFH+tZL3I3awlrIWzmz0aiRo4Eue3NJJf pD0PZpXaCcZEkwNCIzmjSmTSyaOoVreVbEO9dEjqJLma4mA+5vXDoYtF/FL/hNxhBJVw AxVllVdGNP8BLmNIbYgVq2yr9oRFWft8pjRHU1ZU1tsnt5Ey8QjtFmKgoBQ42KxHecms nKug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tWRK0Waq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t6-20020a170902b20600b001781cf050b6si11213744plr.14.2022.09.26.05.51.45; Mon, 26 Sep 2022 05:51:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tWRK0Waq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235597AbiIZK2c (ORCPT + 99 others); Mon, 26 Sep 2022 06:28:32 -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 X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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