Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp720882ybt; Wed, 24 Jun 2020 09:34:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZbcbpH/rMvOEzg5Zkk2VXZNcBIJ+OtY/sdwar2pF+59dpjoxfp+Wkx/+ZhhJP/DF8yXRx X-Received: by 2002:a17:906:fcc1:: with SMTP id qx1mr7897337ejb.379.1593016472302; Wed, 24 Jun 2020 09:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593016472; cv=none; d=google.com; s=arc-20160816; b=KYBYeE2Dx4vVy1orAYKk2B0p8MY4H608s8L0PCKFDowGrcMLZbSURx01RHWv4Pw+aL bYsFvoFl9HPd6fNUuQ1dKucwwtexJtRD12mBKqjGJZsIvRBeaQ4LkQIwjB6xmu6Urw9H FuKG4OQN0N5KeVWT+naz4XH8W5SsQpptN91MP7SOPszm4zKyyHF+qNR1j/gQdaydH+Hl pviIfNU7PfOpb2qOBIkIGDydZ0hwlXymsH/rIp/BRcP0SEfkSJb0Csnj3c8SgztmNSsd BIC6w7Ipts78zydsAVRMSrpWKpbXjC0TBv/WI0db68lAf/TuvmH+SCwvkzopAtP1h95y vBWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6gY+qytC2xLnUfYMmShjM62XObt4XnPfFVSP7034DME=; b=osf+0BFx0Pl4RA2jeLtemMsUBA20Z3oKSdNlhzYbaDKxfXpNPhWDuEoIMCkO1dWy9r zAwtUHBCssmhsPODd+IUPaNugO1sZ1EHc9X9zppywoygdhp0J7PS0JgDPabHjkksLn84 Tn7G/XH9E8KGRvS/2zJBsb4kUpgy+NyskNY0INtpNkW6cYSFBe3OGHMIkEhY8rt4d6UJ GQWmiSmfdvpZp9VRfBxkadsiiPtPjNePaegIxgfhQNPtNeqIgZwQcQ8SeD8bTmsS4zP+ 50K+2evynE5FjRf/RYS7KhBmmtZ4HrduP3uXYFYrknB+avePImmcs83+pSX+hk3okwKO fMYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e1si13605114ejb.286.2020.06.24.09.34.09; Wed, 24 Jun 2020 09:34:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405156AbgFXQak (ORCPT + 99 others); Wed, 24 Jun 2020 12:30:40 -0400 Received: from foss.arm.com ([217.140.110.172]:40744 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404976AbgFXQ30 (ORCPT ); Wed, 24 Jun 2020 12:29:26 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5209A1FB; Wed, 24 Jun 2020 09:29:24 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8FA1B3F73C; Wed, 24 Jun 2020 09:29:21 -0700 (PDT) Date: Wed, 24 Jun 2020 17:29:19 +0100 From: Dave Martin To: Ard Biesheuvel Cc: Kees Cook , Mark Rutland , linux-arch , linux-efi , Arnd Bergmann , Fangrui Song , Peter Collingbourne , Catalin Marinas , Masahiro Yamada , X86 ML , Nick Desaulniers , Russell King , Linux Kernel Mailing List , clang-built-linux , Arvind Sankar , Ingo Molnar , James Morse , Thomas Gleixner , Borislav Petkov , Will Deacon , Nathan Chancellor , Linux ARM Subject: Re: [PATCH v3 3/9] efi/libstub: Remove .note.gnu.property Message-ID: <20200624162919.GH25945@arm.com> References: <20200624014940.1204448-1-keescook@chromium.org> <20200624014940.1204448-4-keescook@chromium.org> <20200624033142.cinvg6rbg252j46d@google.com> <202006232143.66828CD3@keescook> <20200624104356.GA6134@willie-the-truck> <202006240820.A3468F4@keescook> <202006240844.7BE48D2B5@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 05:48:41PM +0200, Ard Biesheuvel wrote: > On Wed, 24 Jun 2020 at 17:45, Kees Cook wrote: > > > > On Wed, Jun 24, 2020 at 05:31:06PM +0200, Ard Biesheuvel wrote: > > > On Wed, 24 Jun 2020 at 17:21, Kees Cook wrote: > > > > > > > > On Wed, Jun 24, 2020 at 12:46:32PM +0200, Ard Biesheuvel wrote: > > > > > I'm not sure if there is a point to having PAC and/or BTI in the EFI > > > > > stub, given that it runs under the control of the firmware, with its > > > > > memory mappings and PAC configuration etc. > > > > > > > > Is BTI being ignored when the firmware runs? > > > > > > Given that it requires the 'guarded' attribute to be set in the page > > > tables, and the fact that the UEFI spec does not require it for > > > executables that it invokes, nor describes any means of annotating > > > such executables as having been built with BTI annotations, I think we > > > can safely assume that the EFI stub will execute with BTI disabled in > > > the foreseeable future. > > > > yaaaaaay. *sigh* How long until EFI catches up? > > > > That said, BTI shouldn't _hurt_, right? If EFI ever decides to enable > > it, we'll be ready? > > > > Sure. Although I anticipate that we'll need to set some flag in the > PE/COFF header to enable it, and so any BTI opcodes we emit without > that will never take effect in practice. In the meantime, it is possible to build all the in-tree parts of EFI for BTI, and just turn it off for out-of-tree EFI binaries? If there's no easy way to do this though, I guess we should wait for / push for a PE/COFF flag to describe this properly. Cheers ---Dave