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

Jan Beulich posted 1 patch 1 year ago
Failed in applying to current master (apply log)
[PATCH] x86/mm: replace bogus assertion in paging_log_dirty_op()
Posted by Jan Beulich 1 year ago
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.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/mm/paging.c
+++ b/xen/arch/x86/mm/paging.c
@@ -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;
     }
Re: [PATCH] x86/mm: replace bogus assertion in paging_log_dirty_op()
Posted by Roger Pau Monné 12 months ago
On Thu, Apr 27, 2023 at 02:29:06PM +0200, Jan Beulich wrote:
> 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.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.