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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D6D4C6FD18 for ; Tue, 18 Apr 2023 12:42:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231875AbjDRMmO (ORCPT ); Tue, 18 Apr 2023 08:42:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231874AbjDRMmL (ORCPT ); Tue, 18 Apr 2023 08:42:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E94D14440 for ; Tue, 18 Apr 2023 05:41:56 -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 1E40C63329 for ; Tue, 18 Apr 2023 12:41:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16C55C4339B; Tue, 18 Apr 2023 12:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681821715; bh=N0aVjDEryHvsJG1EaYORnjTrCWS41XOE62Wonr7Z8Uw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=W5qaWaULjN6RRE5/LWN8qHwUEtdLd5gJDhMD+QYU8gScK53VFJwhFcXKAu8u/LdNj g3y6mbgI4WfAkWv3lWJ8fwgtqQngM6eg/+DVyRE9cBt5nO14FLa3V19aEpm54G3U+R TrKrX2pSngYRla8jomeaolBsoDvtmErHub2NgaAGnCC7JVa/NpdC3sODEoXhdWtIRu kxD34u8DRG/XMR6/MvGgIvf+0vLNNNKS4FpUZ/cYTyD7GkhyqTfT2+HfQO6JSLk2bk tSz6s8FHmHu9xjpEtQwShal70z8SC8RgZm0dFcnsoxYoypyrJDRqjM1MLJtP2Kw7nR DZAuGEsYOXugw== Date: Tue, 18 Apr 2023 13:41:49 +0100 From: Will Deacon To: Oliver Upton Cc: Quentin Perret , Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Sudeep Holla , Andrew Walbran , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH 03/12] KVM: arm64: Block unsafe FF-A calls from the host Message-ID: <20230418124147.GA32435@willie-the-truck> References: <20221116170335.2341003-1-qperret@google.com> <20221116170335.2341003-4-qperret@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 16, 2022 at 05:40:48PM +0000, Oliver Upton wrote: > On Wed, Nov 16, 2022 at 05:03:26PM +0000, Quentin Perret wrote: > > From: Will Deacon > > > > When KVM is initialised in protected mode, we must take care to filter > > certain FFA calls from the host kernel so that the integrity of guest > > and hypervisor memory is maintained and is not made available to the > > secure world. > > > > As a first step, intercept and block all memory-related FF-A SMC calls > > from the host to EL3. This puts the framework in place for handling them > > properly. > > Shouldn't FFA_FEATURES interception actually precede this patch? At this > point in the series we're outright lying about the supported features to > the host. FF-A is in a pretty sorry state after this patch as we block all the memory transactions, but I take your point that we should be consistent and not advertise the features that we're blocking. I'll return FFA_RET_NOT_SUPPORTED for all FFA_FEATURES calls until the interception patch comes in later and does something smarter. Will