Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp820492rwb; Mon, 26 Sep 2022 06:20:04 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5k7JitF2n4KaCRRhiFD0zOpnkvMGIjoLiy0IbJOrZ/m/aieXs+8mmHwQdZ4Zznj9vBeQTT X-Received: by 2002:a17:906:fe09:b0:73d:90ae:f801 with SMTP id wy9-20020a170906fe0900b0073d90aef801mr16765251ejb.699.1664198404201; Mon, 26 Sep 2022 06:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664198404; cv=none; d=google.com; s=arc-20160816; b=FwsAf5ivnHx8xmnb2LhCS9DjiTV2y+0aC89oU0TukWL2dTCRBSVOxRPR4Y61TToiE5 a5scqpVR5v9RHQh6Xl30gwUnvOofRyPbFVs7ld7/RLPDRtlCoWciPm7mhCvzx4O0szJv U9VFL7GFkxy4EiSuMqyhBhazjpoE7QJpYiIdYIZlx0qu+viNrCZOatmJ8b83Eent2VEs Eb7z8cZWJQjk6THox/aPTmQK/v6XW4Tnf3Z+FCyRvgnKS9ffJARaOV2H3KUI2kA29P6A SKkfbZzmxu9p2yciJmVrUBMpRGme1JOecOQZnHaZ9eHtxV5hc1pigzIqJdeygXkbuiLQ bZeg== 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=IAMoJSnsMDaD584z4UwL1hdImoS3kyY9VL3JTJxPacQ=; b=RwigrnWOUE7tJxGCZEyODCdznXR4G8UA5pPJIa2fa/kgDiegbKYP0gxWz7rVPoEoNL Liux/SGm5rZnsTPTPv2Da9A64K2v++70u4p75emgV0YQCXAHIwWRXqIYCm3CIZTTzkc6 qtAlsL+pMrn09M0l0sQ4kkGQL92lVo7k8DBheNdZ6WGiW90CRGDgOwXofWlwM3lNpaez 5Ks3S3T/zgQGd0VTym7wyoCI111GFlgfinsdS2ISuPSIeDVgE8J0/GgjL5lbIxiSmG9V XfLkQx3zHbJFYfTcv2o1zJUFjyVYh4ZUjcPgJp3mAx7iF6bs+0OWh+/2g1QJPVCiyrnH UOEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OeAyUvu8; 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 x9-20020a50d609000000b004534c6c4bd7si14621927edi.433.2022.09.26.06.19.14; Mon, 26 Sep 2022 06:20:04 -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=OeAyUvu8; 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 S235957AbiIZKjz (ORCPT + 99 others); Mon, 26 Sep 2022 06:39:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236117AbiIZKh3 (ORCPT ); Mon, 26 Sep 2022 06:37:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE22A52DF5; Mon, 26 Sep 2022 03:22:04 -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 ams.source.kernel.org (Postfix) with ESMTPS id B3073B80835; Mon, 26 Sep 2022 10:22:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C64D4C433D7; Mon, 26 Sep 2022 10:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664187721; bh=jqnPyBN37PEz0xr+ig2bvxymuiERr5uZNWmJUI6FYcQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OeAyUvu8fSoL+ci5wULiUwzUDd2BXwmnZRC9mPlIIYZOo/gBAfJtrYdtPsIksWGND niDdPLt9ctO1t9uU2MspMg7S6G3zQ6sM/+MEAjJQisWzHBACuN4Zd2ahUI4h+2ZUSz FtMjdKux5HCtYIpclAf1VartvHPFIDoPM8AGUxAw= 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 5.4 007/120] efi/libstub: Disable Shadow Call Stack Date: Mon, 26 Sep 2022 12:10:40 +0200 Message-Id: <20220926100750.834421805@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100750.519221159@linuxfoundation.org> References: <20220926100750.519221159@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 8c5b5529dbc0..f3540d5dd276 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