From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 A3E843E1716 for ; Wed, 10 Jun 2026 13:56:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781099795; cv=none; b=J89ysboYL6DYZwtFOcVgmaR6x+c1jAIHrA7x+vN5AbK8Bsw0ELmRmNgVTZBMQNLgFC/y4+JxfbxSYdRqQjNd95D67koeVHJXmqsZvsN18fBb4ekrpqugajZzDuGH7+J7pGnimaU7aOcaD8U00xGmf6pm84H6LNB4/4lm0kgIEJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781099795; c=relaxed/simple; bh=pSKkvcdgY/elb1Zv2hNLL4Bv9H5QA0QKePDJaPMMupI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jHpGlgp2EK9vJgnfnA/CvMpg9Ht+OKNeBU8lDgfk9Eg9OEExRWfomp9sNWe9g8RsN7Hi3U9+s8ocKXS733pfdhMHCL/VcGqJdWew1oIdJdknDCR8qDe8d7gd5BDuy0mVLEU14/cFkcFPgLDeewucxUQxjwe/he4+/MCLA/i6azA= 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=ex4/2viT; arc=none smtp.client-ip=209.85.128.45 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="ex4/2viT" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-490b2b037d2so59702935e9.3 for ; Wed, 10 Jun 2026 06:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781099789; x=1781704589; 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=uygtCkOWTfgppeg9iSnO+7F/NY50yL00/8USYGKdihE=; b=ex4/2viThtcJhPhN8OHT+gT/fd4LqXVJThx/P0se1vVaoNhsXmxoYeuMnDUvEvdXET RRq3BImSskOPqi5VwP81rmHRblR/znEKVcelZrLr5nol84o+YHWq+Og0fw9Rv/X/bt6F S9MPr7/5Pyf1AuToRzSXkB9hMOlSVQOicD8LSJpuk5sAQleFQ9uUVRIsFp+fk4hZFtX/ +xXRrSuEYyB0HjC2N8245sSmG0cO5KNGotPDbDJnAvfoZZeZ9gzEaHbwUldd0ut9aQzC qYr2yfWhWCaAut9ntLyjIZGT7MJzAgoteNs9XLJ7hV/xsZ2JY1u3Etdd+UICVgPPNzx2 L+Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781099789; x=1781704589; 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=uygtCkOWTfgppeg9iSnO+7F/NY50yL00/8USYGKdihE=; b=HCJQ+rxxjNo5Z7Km69NiKs0jB5tLWJLJn+42pktNZ9ZgeH+NafchgCveq6MQfgqce4 vdzpJKlJIKaoRk5g1qf3937VM6e7/wRLTcx7XKspVDHxCJaCVFI38YtPbX6e9qipiEBA SgShr3pKbM8TqeMYPkYO6HsQHP77l+Y5Aw4JfQkYMNgABK5+YD/mQeHOdI/7y5rLGEgH 662Wysbfj0TmSeHyrK6CzRcZOuNZ3b7cIVBd7IwPONbkNWcICHoSFt5s3yK4yXCxILqK 1fB75Y6noa2ZtX30QWaehoxDpYjIQt8TyiPMBu6G4JTomM5ARIO8bcmU6GxHusA/DFOX P4Sg== X-Forwarded-Encrypted: i=1; AFNElJ+XxfR3+EDh+RNLlexqb3wGPTYsFmYhL6GDRSYrRQYCHq/ykQsui4S5E22fHw0wac2PIqnVqMXSBIL/r0M=@vger.kernel.org X-Gm-Message-State: AOJu0YwmDfuDoQqe1k0wtJS+WQmoSlD+lGrtE0lSVLG7Uw5JU0arZA0e 0OXz/YxO/Tek+B4zuwS7rHAeQLomXwe/s70Ton4VVjAJt8zHR3fybN+tDOMWXUzXGA== X-Gm-Gg: Acq92OH5uYNkSBaHbkzzjbay/GcSpxxVrb5avpA/F+oWBkYelu6SX/dRecV54T7suWa 5qSaRRLqOgu8CTerIU8MIZ1A7kwoSqccalWe5oVYIo9vYzd4oZhuNiJGHcGoS+ljwe4lSXdSBax 8k1kTeI+pdLLcqNvsXu1K7LdfbNCHieeTGtQQ5qTE6STxQTSL39GhX74tB+P4SP1i2nn2XvXh0j hMI5ulavbe4b8LRA6K2kquAraUd/EoHtLe0A/LUaj20nazsIIkXHJFk6dvDqkjeYr1P2xhbaf/b 6rB6qdJDVN8vT5hA6rdMO8LczJDGhCtojMVFPuFUvIlYg1+TZhhcnojM91X7NqjRR8B7baNI3X2 Bsf9W++mPwkv+fg0yPpipEAPIWLZOZbtWvXVi1xWhXKPixszgL2dsZiNDOOZGFB9/qCXh4ImSev SF1NPv4xwHWgcIVVgGS49S7/Qb+h7J6mQO+d75Z7mKd23MyXKtBJLdT/lMrkwYITLCQ3VM+w5uR HvBYQ== X-Received: by 2002:a05:600c:8b6a:b0:490:44eb:c1d9 with SMTP id 5b1f17b1804b1-490c26217damr373581055e9.28.1781099788613; Wed, 10 Jun 2026 06:56:28 -0700 (PDT) Received: from google.com (135.91.155.104.bc.googleusercontent.com. [104.155.91.135]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490bc3c15cesm548817495e9.5.2026.06.10.06.56.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2026 06:56:27 -0700 (PDT) Date: Wed, 10 Jun 2026 14:56:24 +0100 From: Vincent Donnefort To: Will Deacon Cc: Sebastian Ene , catalin.marinas@arm.com, maz@kernel.org, oupton@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 v2 0/7] KVM: arm64: Forward FFA_NOTIFICATION* calls to TrustZone Message-ID: References: <20260608165549.1479409-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: On Wed, Jun 10, 2026 at 01:23:04PM +0100, Will Deacon wrote: > On Wed, Jun 10, 2026 at 01:15:44PM +0100, Vincent Donnefort wrote: > > On Wed, Jun 10, 2026 at 11:15:14AM +0100, Will Deacon wrote: > > > On Wed, Jun 10, 2026 at 10:26:59AM +0100, Vincent Donnefort wrote: > > > > On Mon, Jun 08, 2026 at 04:55: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'. > > > > > > > > As it is only a relayer. Is it really important to check SBZ arguments and > > > > fields on behalf of Trustzone? It doesn't feel it brings any security. If the > > > > host passes broken arguments, I don't believe this puts pKVM at risk. Does it? > > > > > > I think the problem would be if an update to FF-A allocated some of the > > > currently SBZ bits to implement some functionality that we would want > > > to filter at EL2. > > > > I suppose that would bump the FF-A version and the proxy would reject it? > > Maybe? I don't think they'd _have_ to bump the version number. > > > If we really want to check for those arguments to be 0: > > > > * Shouldn't we extend this check to other FF-A invocations? > > yes, that's what the diff was doing in the reply here: > > https://lore.kernel.org/all/af3fW468-f1KXCrC@google.com/ > > but, as I said here: > > https://lore.kernel.org/all/ahmxiFXXTupafbXw@willie-the-truck/ > > I don't particularly like the table-driven indirection (the checks > should just be inlined). Ha, sorry I'm late to the party. Perhaps this series should start with adding ffa_check_unused_args_sbz() to the existing allowed FF-A invocations? > > > * Do we really want to also look into the !SBZ arguments to verify what we can? > > (I'm thinking about the checks on flags) > > For known arguments, we only need to verify things that can affect EL2. > I suspect we don't care about a bunch of it. > > Will