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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 8B8F5C6FD1F for ; Tue, 26 Mar 2024 08:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lP5LHJSCPM0SREYpA9IYLeFk4UH9u3/QAaDi688s7YE=; b=yv0w3Iw++PbcIj ap2Zax9ip2yHRS+Wcn5AQmkC29036HEs754Q/sRYKrApu6OZyvctncxBdlLpUzPLRo2zUO03isbBQ ZhyiK3bCv8RXBK7I05zIXJH0m3qsYHJ7dcrziYzkElSFNE9kos8K2GnRgCIi7+C/A4zx7ien7TKCq Nmr1qF//dQuHvuFnYokhKsrYf8qhTd0ErDfts7dUXE+RlumXS+F7Jfvq3fduhh17jw8Ilrj7YkLSU wJ0LNutiD3kAZVHewZCMKPZQ/bYKe9O16GhjFmcU6v+Bv+iIqZIWbFGr9tTsjYq4E8U4l6W6gyRAB DwbCZc5NL4H/MIOrDmmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp2OC-00000003eLQ-38LI; Tue, 26 Mar 2024 08:42:36 +0000 Received: from out-184.mta1.migadu.com ([2001:41d0:203:375::b8]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rp2O9-00000003eKZ-0Ogb for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2024 08:42:36 +0000 Date: Tue, 26 Mar 2024 01:42:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711442549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/RKu6qSQVXlpcN6JejyWa9aG5aIhVhSwxHBg5O7Imr8=; b=BglosqrzkG1Cg8t1P4ltdTyaXKjeqqNDnwiL3kXE1sDehRq5nREwzP+Xr6Ne9hvOS8jgsr knnYi4W2CL5McWS7cL1qWRMPtGy8DGXgFd89ULBuvxu4aetdkaykrG/g0kn8G6NkCHs+jL F6thk4SMFL6RZaTG0FjV104PMjhb6GU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Sebastian Ene Cc: catalin.marinas@arm.com, james.morse@arm.com, jean-philippe@linaro.org, maz@kernel.org, qperret@google.com, qwandor@google.com, suzuki.poulose@arm.com, tabba@google.com, will@kernel.org, yuzenghui@huawei.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH 2/2] KVM: arm64: Allow only the specified FF-A calls to be forwarded to TZ Message-ID: References: <20240322124303.309423-1-sebastianene@google.com> <20240322124303.309423-2-sebastianene@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240326_014234_563070_AEB714FB X-CRM114-Status: GOOD ( 20.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 25, 2024 at 11:29:39AM +0000, Sebastian Ene wrote: > On Fri, Mar 22, 2024 at 07:07:52PM -0700, Oliver Upton wrote: > > On Fri, Mar 22, 2024 at 12:43:03PM +0000, Sebastian Ene wrote: > > > The previous logic used a deny list to filter the FF-A calls. Because of > > > this, some of the calls escaped the check and they were forwarded by > > > default to Trustzone. (eg. FFA_MSG_SEND_DIRECT_REQ was denied but the 64 > > > bit version of the call was not). > > > Modify the logic to use an allowlist and allow only the calls specified in > > > the filter function to be proxied to TZ from the hypervisor. > > Hi Oliver, > > > > > I had discussed this with Will back when the feature was upstreamed and > > he said there's a lot of off-label calls that necessitate a denylist > > implementation. Has anything changed to give us confidence that we can > > be restrictive, at least on the FF-A range? > > > > I remember your proposal for having an allowlist instead. The current change makes > sense if we have https://lore.kernel.org/kvmarm/20240322124303.309423-1-sebastianene@google.com/ > which opens the window for more FF-A calls to be forwarded to TZ. Got it. Last time I didn't catch the level of abuse we expect to endure from vendors, but now it seems we will not support non-conforming calls that appear in standardized SMC ranges. Adding mention of this to the changelog might be a good idea then. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel