Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1513555lqp; Fri, 22 Mar 2024 19:08:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW2Fpf9/00Sxv/EU2v4IThwf705SInlX9hHbXKxq5ldGRdN+WJY6XE6UiDvSJ1JQ43ZMvRriXjA/8qq+6najEnBT+kTPillprdcFILEsg== X-Google-Smtp-Source: AGHT+IFNDy5QP3ZhqF6VjbWVCbe2ZRnPptiGdUzlft4x8pp56ThzUhGRVMHwjPhH9TzwLTyaJeNm X-Received: by 2002:a05:622a:13:b0:431:3af8:96d1 with SMTP id x19-20020a05622a001300b004313af896d1mr1292520qtw.7.1711159691033; Fri, 22 Mar 2024 19:08:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711159691; cv=pass; d=google.com; s=arc-20160816; b=gU7n1ZpkiQjBY0n8E78R6W5nWopvOWQqoe7GeIsSLqKlSKcuElnxx50hN2F7CMzKnP 2uDCnkhAA4b4ijpLfI3C0WCgz14lKmv2Z9Z8H21MxPBI46omctmdWR1935WtwgnDYbG+ 43syYfNOuIJUb//83QnCLuKl7jCSG65iPPP0Q6nsi8Fi6oyj2v2ORD7+JIBX0isdYz82 ofJ8yva4hpluq02yP9HaPuqewK2+Is0qdVtxZDlV4tDxnieqm1LedHFxUTruOzOdwwVD F4dwtHS0dvIg3VKTrEkTLmdjKFmnqCt94AKp7XhIfeSbZXL4M2oACkmq//l7rt3AyFbT zHpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=5VkD5z9YkAdX6FArt2jg1nT/B62sh2p7lPRadskyhS4=; fh=HUKyBv3oD1TSo27bDLc23VtwJD4oBc4qrikT7JNqe6k=; b=k1lhVdTbFqVSzXEIv2Q0jK5YkbfutkINf+4N3YTgjiawOjFuIhh1fJSpdVhFJynDdr vM122DvwHaaO9kM6Ffiw1RNYHxHxt3JrLvAq33NlzjgmNY9HFxpcCNjtRe8unVAy69fM ySHIQLfoHqT3214z1mgnf2zAoPU0hEpeL62rb7Cf7NcZvsOTvcNMR6EgQmG946RK9LCx DS5HFYnVMB+esBwpuO14pCVk10oBJfCZTKk4jQY43fRjekddy0g1mFMc1vlfHQiYx1Dz bAbCLWyRck7wOmEJq8sS5cqXFQJj4ztUgnpPyQeLRV3f6jUYVYR+YcJavDYz4MLVgfmx vF2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=SDHpXhFd; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-112176-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112176-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id fk15-20020a05622a558f00b00430b1adf1c8si849235qtb.791.2024.03.22.19.08.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 19:08:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112176-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=SDHpXhFd; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-112176-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112176-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B7F0C1C22BD2 for ; Sat, 23 Mar 2024 02:08:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A8C71388; Sat, 23 Mar 2024 02:08:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SDHpXhFd" Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC206EC2 for ; Sat, 23 Mar 2024 02:08:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711159684; cv=none; b=CzydNXMRmO/5Jzo+95AFOqKvSYzPi+ulWldDl5zLr3EROIMruNFwlXjHnewXvis749B4Kk2ixodCKhi5s9ZSET4HcG2uqB/37DYQzmfLIekaqmg0m8b1RjGcRNiFxv29yyGXPiPgX81ZGWTn5yuWOr7z9ioducumZxRS2ahsYYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711159684; c=relaxed/simple; bh=G0qqejbTt8x+fQsE2uIDzXF2fMgwgfYI1BMVmDEbtVw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O1pK5Q4LAyAhB8d1CWofbh2Jw7OsQ8TZl9WlCE0KWvl173io7/IiujDxScFhWU2g2SDbtHnIsSSd/m1O12lCG+9XsC1fR6AT2Wq0s4qex1RnnZb1nlAJqAAT++QIHpsgHnqQizUohTTOT+xV7I1wQ1w4FiAMAKsiEcvRnQz2+sY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SDHpXhFd; arc=none smtp.client-ip=91.218.175.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Fri, 22 Mar 2024 19:07:52 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711159681; 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=5VkD5z9YkAdX6FArt2jg1nT/B62sh2p7lPRadskyhS4=; b=SDHpXhFdepH9Nj+WO/hIIjmvTRVCgXX6AKi+TQQXTYMd1JS/R4MWvwg2QeCz5Aza55n83d GkB2zofd2b4riHxCi3zhFaTsWoBg0QiEQG46JIHRc+WKtDgpogxfMXOXnsnveH9HCUaWhT pXFNjI9dkhah5sJIwmnK7NeD46SWwrs= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240322124303.309423-2-sebastianene@google.com> X-Migadu-Flow: FLOW_OUT 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. 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? -- Thanks, Oliver