Thread (18 messages) 18 messages, 8 authors, 2024-12-22

Re: [PATCH v3 4/6] arm64/kvm: Avoid invalid physical addresses to signal owner updates

From: Ard Biesheuvel <ardb@kernel.org>
Date: 2024-12-12 11:44:51
Also in: lkml

On Thu, 12 Dec 2024 at 12:33, Quentin Perret [off-list ref] wrote:
On Thursday 12 Dec 2024 at 09:18:46 (+0100), Ard Biesheuvel wrote:
quoted
@@ -908,6 +892,9 @@ static bool stage2_leaf_mapping_allowed(const struct kvm_pgtable_visit_ctx *ctx,
      if (data->force_pte && ctx->level < KVM_PGTABLE_LAST_LEVEL)
              return false;

+     if (data->annotation && ctx->level == KVM_PGTABLE_LAST_LEVEL)
+             return true;
+
I don't think it's a problem, but what's the rationale for checking
ctx->level here? The data->force_pte logic should already do this for us
and be somewhat orthogonal to data->annotation, no?
So you are saying this could be
quoted
+     if (data->annotation)
+             return true;
right? That hides the fact that we expect data->annotation to imply
data->force_pte, but other than that, it should work the same, yes.
Either way, the patch looks good to me

  Reviewed-by: Quentin Perret [off-list ref]
Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help