Skip to contentSkip to conversation

x86/mm: replace bogus assertion in paging_log_dirty_op()

PATCH In review Jan Beulich 2 participants 2 messages Apr 27, 2023 – May 2, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/mm: replace bogus assertion in paging_log_dirty_op()

While I was the one to introduce it, I don't think it is correct: A bogus continuation call issued by a tool stack domain may find another continuation in progress. IOW we've been asserting caller controlled state (which is reachable only via a domctl), and the early (lock-less) check in paging_domctl() helps in a limited way only.

xen/arch/x86/mm/paging.c +2 -2
@@ -431,8 +431,8 @@ static int paging_log_dirty_op(struct do
               d->arch.paging.preempt.op != sc->op )
     {
         paging_unlock(d);
-        ASSERT(!resuming);
-        domain_unpause(d);
+        if ( !resuming )
+            domain_unpause(d);
         return -EBUSY;
     }
 
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Jan Beulich

While I was the one to introduce it, I don't think it is correct: A bogus continuation call issued by a tool stack domain may find another continuation in progress. IOW we've been asserting caller controlled state (which is reachable only via a domctl), and the early (lock-less) check in paging_domctl() helps in a limited way only.

Thanks, Roger.