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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B96E0C34022 for ; Wed, 19 Feb 2020 07:41:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 89D18208E4 for ; Wed, 19 Feb 2020 07:41:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bTexDfvy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="kTNAFKeN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89D18208E4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4KufoJ5tGeFTBMZ7EFbhs434CTI3TGg6u+WudZvIVcg=; b=bTexDfvy8MtXC1 ba19ROoytB7uA+w/xrlwFsWF6Yh8rzZtnOwubhZ9t7qdGBTSQ8KFyVHyC0UO8P5lZ3IVPyQlIhz6Y 7o+scxt2OQTqjceXEFGwt/QxkQJiOuHs+SM5kf8Sq2FBNv2dQE38JDSvlw7kFk5DJCsal3mHun102 nP4H+kH3JAcY62P6wPCaJVhwRG0BBdxYmLOd0rfMeJManYAfyDCwMfYW8dARfkqTch1LF+HCxlq7T XFaJBAEf1jVps8RmdGmU5t3gSYK0rG7i+LTVUlTnvgEf/3QNeE4lYzvt4XDWxQH5c9L2yIvj+eFG5 lAO8OzGqTsaeGJaWvJUg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4Jyj-00071B-7f; Wed, 19 Feb 2020 07:41:05 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j4Jyg-00070d-Ne for linux-arm-kernel@lists.infradead.org; Wed, 19 Feb 2020 07:41:04 +0000 Received: by mail-wr1-x441.google.com with SMTP id m16so26902663wrx.11 for ; Tue, 18 Feb 2020 23:41:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+GRLqrD8FueaUCHAoE5W7lTJg+Amhm25j14mDfWmjkA=; b=kTNAFKeNi58a6U94aPNyk90UBSKG8JCWjWNuMiUHZEtRSl6WJsZaJcDG0H0NH/MESj CjnehUs+Mw5wnTTjyRcxVTT8DDO3TYKY0i49PAel3wB79hMGCm8kP6wc5AXe7RhLv4MG +BJtU+G3G+qHz0vhZxG2POr56LNKq9ITudB6s0ZRvs8mXQa3vl+MuBIH+nb5viJeO9EE WuqgXiODR0hhXK6X737HDKvNJ93MQgCsXeD80gmkLYPXyPNM4g+yhccOAZXmHVgNNDt/ S9dtWANw0xDedARfY27ZmjbXLcmfUtUmkx35qyMjHNcc57H5Bs3W8aBX9QwmS7EiVRsL 6sIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+GRLqrD8FueaUCHAoE5W7lTJg+Amhm25j14mDfWmjkA=; b=gPZI7ol7oBX9P1bqS9iazjQ51eoV/1xsR11+bYcTmFDfApTQ2okWCX+CoESfeMDYyn rPXsoXqORz/blOjw++tX0DyAX+HWxXUmi7Ls4E0JCcagNKSCCNt3n+s2Dj8fu7m14qZo 8REO8Fiyl83ysy/gqOTTaux4Kpq4sV/2HeK3fC0kZ/2dUTLLz4zhPJD/5GocfyNQ3Cgb LIg/4Kx/BIptAj7s2duTb8M91kYYMSf2ZMoqgrCeV9Q1TWS+jo3O7zmJzUwdZGl6DJiK dUh4inRmXzNVsRCp5QM6w1QFhHKFDlA3ppDKUuGst4P0FeU78EHxZgVQ+2cNM5qYEikU uBMg== X-Gm-Message-State: APjAAAXvleClWT2Ct1OyRbvlkMQNqI8JQlEmFI/sRN6WmVswq/R6ABoO JdN++whX0Q9wINJ4e1vq5mTWTpAkxEY3Bu0TM/M3QQ== X-Google-Smtp-Source: APXvYqwCy2jqrGLYe7fHN/XM0e6FNRRUyJj1Go/h3HngUYGMwgnjHkeOth6L5p2FLRI+tlLg9m6uzOIAHQ0dkTFKCQ4= X-Received: by 2002:a5d:5188:: with SMTP id k8mr34117209wrv.151.1582098060684; Tue, 18 Feb 2020 23:41:00 -0800 (PST) MIME-Version: 1.0 References: <20191018161033.261971-1-samitolvanen@google.com> <20200219000817.195049-1-samitolvanen@google.com> <20200219000817.195049-13-samitolvanen@google.com> In-Reply-To: <20200219000817.195049-13-samitolvanen@google.com> From: Ard Biesheuvel Date: Wed, 19 Feb 2020 08:40:47 +0100 Message-ID: Subject: Re: [PATCH v8 12/12] efi/libstub: disable SCS To: Sami Tolvanen X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200218_234102_800737_55DC10E7 X-CRM114-Status: GOOD ( 17.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Kees Cook , Jann Horn , Masahiro Yamada , Catalin Marinas , Kernel Hardening , Nick Desaulniers , Linux Kernel Mailing List , Steven Rostedt , Miguel Ojeda , clang-built-linux , James Morse , Masami Hiramatsu , Marc Zyngier , Laura Abbott , Will Deacon , Dave Martin , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 19 Feb 2020 at 01:09, Sami Tolvanen wrote: > > Disable SCS for the EFI stub and allow x18 to be used. > > Suggested-by: James Morse > Signed-off-by: Sami Tolvanen > --- > 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 98a81576213d..dff9fa5a3f1c 100644 > --- a/drivers/firmware/efi/libstub/Makefile > +++ b/drivers/firmware/efi/libstub/Makefile > @@ -30,6 +30,9 @@ KBUILD_CFLAGS := $(cflags-y) -DDISABLE_BRANCH_PROFILING \ > $(call cc-option,-fno-stack-protector) \ > -D__DISABLE_EXPORTS > > +# remove SCS flags from all objects in this directory > +KBUILD_CFLAGS := $(filter-out -ffixed-x18 $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) > + I don't see why you'd need to remove -ffixed-x18 again here. Not using x18 anywhere in the kernel is a much more maintainable approach. In fact, now that I think of it, the EFI AArch64 platform binding forbids the use of x18, so it would be better to add the -ffixed-x18 unconditionally for arm64 (even though the reason it forbids it is to ensure compatibility with an OS using it as a platform register, and so nothing is actually broken atm). > GCOV_PROFILE := n > KASAN_SANITIZE := n > UBSAN_SANITIZE := n > -- > 2.25.0.265.gbab2e86ba0-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel