From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 432693D3D00 for ; Tue, 23 Jun 2026 11:24:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782213893; cv=none; b=Z9kaygqi6+ojLoTf/2lIvDE3YLEA1W4NOj9mGcvotayjfdK8SeA2M0h8+gVBMCKy3yt73dtKec4ENjSioy4xOePqhjNONOavaSlQdg/Nc2yqtAnaR5viBRuezptngnycwYoePxhJM050QTCiS0sUtzuNvQMwdD9tiZrlx32gh48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782213893; c=relaxed/simple; bh=xub7d8UVLHJ/EeANQ4PqYtB+BzlixBIMOx8ZjkHOPR4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XvawCuGYk0UDICC3nUWkGz/nwd67GtC4oM4KeDqliE6V2X4ZMil6zbSLzSgFQVuZrT/HFbMc7FWfJ4kP+sl/bmn5bGDqbeW0QkoBy/xXL3Eu60CVIp947GF+yJG9pltgC7L38hxRtXnBhVuuCxwi9umqiWplvUUhRIVBEFavoJ8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=oO9n+rv/; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="oO9n+rv/" Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-c0c5d170ad4so384621766b.3 for ; Tue, 23 Jun 2026 04:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1782213891; x=1782818691; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=G1i1oDfCJW72UVj6tqHkuUrHq9UVqOgjHQzojRLhWq8=; b=oO9n+rv/x+3BHgHwKHvWIjBiY4ABq1zjmfghQndCko0Bl+eZKElWSUK35V4lNHKYsQ UNrjuPGS6eP61qIv/OxFqtChuB3XfrwepGG4GOLBsTqsLfhmFan73vrck2+Sa7vtk1kX H6/rwQ7ygrB8JoJfmtoNN24Y/vScFjv38s7Onxf03GRTJxJhyA7XsibweLDLGusRZ1AR wwv/SucPNiLkpIjwgprpU+KY4eVVyaVORDLAcNjXec4X3mshnnkUqmw6HudQihY9Estb x8V2Tflw8tluo8ULEox5VOeUz3lPTInovuJHlZCaw4IjGEObsUQ28tLoVY4tFcG9KBy7 Zi6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782213891; x=1782818691; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G1i1oDfCJW72UVj6tqHkuUrHq9UVqOgjHQzojRLhWq8=; b=UtypZaBwKBWzx9sZMV6rS3yKW9UgRNWhslFJAM6yOOoGWbUfLFXz5mT4SmlREh6pqh csqR60kwIMYHe/PYCkf4gDJ9q4ozFFk4RJSpaol5LMRayWOfsGkd6K1MQOTkdPflXUuX ga7XHI1W9HjgrVPVbKkbDMHZZevQjXNbdfdD7xdUQMdzG5Rkm0d033TbRRNKA37skvaH CpmrAQMSxtcfrjutN5Jt7mcRWCrfrV+C35MnP6BkfBIQF4uASZRypRD99m0fHZbEOumm g9XcBVs8LgfD2VjANV8A55gAYWNH3dAYIP0c+ZwzatHiwHISjbchNMBvgQr2zw7H5TyW dEHw== X-Forwarded-Encrypted: i=1; AFNElJ+HPtPOwmr+YDARA67761bQ36/kDuYWaXinFhb2ttMMS4gajfHPf9kGrP7SbZUDgwDj4lNTphCgA6i/BU8=@vger.kernel.org X-Gm-Message-State: AOJu0Yxnp0EZ1IUCDRsqQtooZKRe7mzXZOSZMweBiLhi3TfESQtf8Bzp 7a+5B55v+sGC8kPkA4+xmrMvEP5Zf6EbZqqhbsoF7AlCoSZ2uLg88ISmkmJ9EV7T5g== X-Gm-Gg: AfdE7cl19Kw0IhGmejBLWdyGcucEU1QB4Bp0a0IVW0mR15FsSywZB1WHPd10thy8bFn 32ynIhHn3WGWnWTcUrBMGl8uZBQ+JVwDCgAl0iQ9aq4rX5fl2V/PM5JAkofR1QcnQHyYope/+96 TgCyJVeqQRGZEu1G5oLZuwgmyHsZCDemroI3+0FFp8D0YH0e54+Wb6GnGAEl033V/P/tQ8KE9e+ AAtbT3KkOIvz4tP3PxfduUq6Old9IGj97QS/yzUMZgo/5j787qgZt3XPArq23aiwPNUzmmB3O7+ yyN4SKbIj1AALkEl0TLjhQsnWHLH07MqJTKVJUciCNdS1KZhU4/rBZlsL/R/w+7pN3LFaFjcc1+ tH8FOMU/JMl2RZsi39xPtjF2fOrJtR/WHxwyYoUP4dM0jGh9/zT6MyeXCpVq4rI/pR4Zrd52Eh/ L8Vw1VLBSxagVNmDLmCsWrbpNR0pqTKtQJDiyrIUCJTbQIMaokgtu+5fqx X-Received: by 2002:a17:907:97d0:b0:c0b:90b3:ad25 with SMTP id a640c23a62f3a-c108eff706cmr105170566b.44.1782213889951; Tue, 23 Jun 2026 04:24:49 -0700 (PDT) Received: from google.com (135.91.155.104.bc.googleusercontent.com. [104.155.91.135]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c0ff4c9610bsm157445566b.42.2026.06.23.04.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2026 04:24:48 -0700 (PDT) Date: Tue, 23 Jun 2026 12:24:44 +0100 From: Vincent Donnefort To: Sebastian Ene Cc: catalin.marinas@arm.com, maz@kernel.org, oupton@kernel.org, will@kernel.org, joey.gouly@arm.com, korneld@google.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, android-kvm@google.com, mrigendra.chaubey@gmail.com, perlarsen@google.com, suzuki.poulose@arm.com, yuzenghui@huawei.com Subject: Re: [PATCH v4 0/7] KVM: arm64: Forward FFA_NOTIFICATION* calls to TrustZone Message-ID: References: <20260616154149.2763214-1-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: <20260616154149.2763214-1-sebastianene@google.com> On Tue, Jun 16, 2026 at 03:41:42PM +0000, Sebastian Ene wrote: > Remove the FFA_NOTIFICATION* calls from the blocklist used by the pKVM > FF-A proxy. This restriction was preventing the use of asynchronous > signaling mechanisms defined by the Arm FF-A specification to > communicate with the secure services. > While these calls are markes as optional, there is no reason why the > hypervisor proxy would block them because: > > 1. Host is the Sole Non-Secure Endpoint: The Host operates as the > only Non-Secure VM ID (VM ID 0) recognized by the Secure World. > Because all forwarded notifications are inherently attributed to > the Host by the SPMC, there is no risk of VM ID spoofing > originating from the Normal World. > > 2. No Memory Pointers or Addresses: The FFA_NOTIFICATION_* ABIs > operate strictly via register-based parameters, passing only > VM IDs, VCPU IDs, flags, and bitmaps. Because these calls do > not contain memory addresses, offsets, or pointers, forwarding > them doesn't pose a risk of memory-based confused deputy attack > (e.g., tricking the SPMC into overwriting protected memory). > > While the pKVM proxy behaves as a relayer, it doesn't currently have its > own FF-A ID(only the host has the ID 0). The behavior of the setup > flow is covered by the spec in the: '10.9 Notification support without > a Hypervisor'. For the whole series: Reviewed-by: Vincent Donnefort > > --- > Changes in v4: > - previous series(v3) had serious issues with the patch number and it > appeared like it used a mixed bag from v2 as well. Resend this to > restore the correct order of the patches. > - fix strict check in ffa_check_unused_args_sbz and make it "<= 17" > - check the receiver endpoint Id in > FFA_NOTIFICATION_BIND/FFA_NOTIFICATION_UNBIND instead of the sender > - use hyp_smccc_1_2_smc all along > - check the receiver endpoit Id when doing FFA_NOTIFICATION_GET > > Changes in v3: > - applied Will's suggestion to use the introduced method > ffa_check_unused_args_sbz for existing calls and added a new > patch in the beggining of the series to do this. > - merged the handling of > FFA_NOTIFICATION_BITMAP_CREATE/FFA_NOTIFICATION_BITMAP_DESTROY into > one patch as Vincent suggested and create one handler for both. > > Changes in v2: > - enforce the MBZ/SBZ fields > - split the calls into separate patches > - rebase on 7.1-rc7 > > Link to v3: > https://lore.kernel.org/all/20260616105417.2578670-1-sebastianene@google.com/ > Link to v2: > https://lore.kernel.org/all/20260608165549.1479409-1-sebastianene@google.com/ > Link to v1: > https://lore.kernel.org/all/20260501114447.2389222-2-sebastianene@google.com/ > > Sebastian Ene (7): > KVM: arm64: Enforce strict SBZ checks in the FF-A proxy > KVM: arm64: Forward FFA_NOTIFICATION_BITMAP calls to Trustzone > KVM: arm64: Support FFA_NOTIFICATION_BIND in host handler > KVM: arm64: Support FFA_NOTIFICATION_UNBIND in host handler > KVM: arm64: Support FFA_NOTIFICATION_SET in host handler > KVM: arm64: Support FFA_NOTIFICATION_GET in host handler > KVM: arm64: Support FFA_NOTIFICATION_INFO_GET in host handler > > arch/arm64/kvm/hyp/nvhe/ffa.c | 211 ++++++++++++++++++++++++++++++++-- > 1 file changed, 203 insertions(+), 8 deletions(-) > > -- > 2.54.0.1136.gdb2ca164c4-goog >