From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A0BF03AE1B9 for ; Fri, 15 May 2026 10:21:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778840478; cv=none; b=qWkEC7vKcHwsZYo/jjd9codtsN6tqSpgWSLMiq4vhMdAo1ONZvA/n6qbinHsZDDu9YZXCmT0fWLFUfOmIY4Ki6QhAhzI4QjNcCWVXxf6ZW7DfO+vfIrH6DclLHVHszbLphrWCpI9gdAaY0h4oHHOIVBsFWy8v0WLrZkfu5mffBQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778840478; c=relaxed/simple; bh=axThhzIei62WMqZ0/cwTAYunJ77KwZqp+AkX3EkBR4Y=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=nallDdd5EhAbzMxnzV8lVWPmgVCvhuZ7Gc4l2PL1i7yvUl5yiD1ZA8FYEIWzwSIwJHbl+8aDk4xYWZ+E9H1ZM/94XnPmgn73ecWn5zDgM1EvSsNF0Gq2iYnTd2+jWTK0LoIK0RXNvhk4LIH+r9v4Bszw2WxnxVhAu+oChKQyJY4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=URrClAU9; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="URrClAU9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36A20C2BCB0; Fri, 15 May 2026 10:21:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778840478; bh=axThhzIei62WMqZ0/cwTAYunJ77KwZqp+AkX3EkBR4Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=URrClAU9bqMbk/ZOtAuQWvjWADo+TWA3p7Re2tvPiPnjRU0vruoZR4TlZwDAiv6M8 2VXnwIsJQlJEz9HNXmhaYGuxU9YriWfj9PHCVU66SPw/Zydb04fZuYbFtWfwQK9Q8u NOfFQaBTTP1J9Na9kr+y6mSFIz48trt7bAhgEWjHP8GqYcAvZ9GAj0DoNC31gXp5DG 4qEgqbDeBEcH0IdyAcoGGxHIy5KLHcNBnDz1n9nVDE6pJJyqlhidtPklYXiEfyj1j9 RiJ1NT89BlrTMzmmVHaZ0w2Vc42OTErl+5UWLf+E4zZDXdNnJb1vNZ+/ITRJmwiSV0 K9x7JxkImtxNA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wNpfQ-00000002eRs-08N4; Fri, 15 May 2026 10:21:16 +0000 Date: Fri, 15 May 2026 11:21:15 +0100 Message-ID: <867bp5x9b8.wl-maz@kernel.org> From: Marc Zyngier To: Vincent Donnefort Cc: oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kernel-team@android.com Subject: Re: [PATCH] KVM: arm64: Fix nVHE/pKVM hyp tracing error on invalid desc In-Reply-To: <20260514162624.3477857-1-vdonnefort@google.com> References: <20260514162624.3477857-1-vdonnefort@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: vdonnefort@google.com, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Thu, 14 May 2026 17:26:24 +0100, Vincent Donnefort wrote: > > pKVM must validate the host-provided tracing buffer descriptor. > However, if an error is found, the hypervisor would just return 0 to the > host. Fix the return value on validation failure. > > While at it, rename the function to hyp_trace_desc_is_valid() and skip > validation for the nVHE mode as we trust host-provided data in that > case. > > Signed-off-by: Vincent Donnefort Fixes: tag? Should it be considered as a Cc: to stable? M. -- Without deviation from the norm, progress is not possible.