[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-cvs
Subject:    [xen master] x86/emul: ASSERT that X86EMUL_DONE doesn't escape to callers
From:       patchbot () xen ! org
Date:       2023-09-24 1:12:02
Message-ID: E1qkDfG-0003BK-8B () xenbits ! xenproject ! org
[Download RAW message or body]

commit f6b0a80a36766e759a8a49c3556c1f03279978e4
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Fri Sep 15 16:10:58 2023 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Fri Sep 22 16:00:17 2023 +0100

    x86/emul: ASSERT that X86EMUL_DONE doesn't escape to callers
    
    This property is far from clear.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/x86_emulate/x86_emulate.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index e88245eae9..94caec1d14 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -8651,6 +8651,12 @@ int x86_emulate_wrapper(
 
     rc = x86_emulate(ctxt, ops);
 
+    /*
+     * X86EMUL_DONE is an internal signal in the emulator, and is not expected
+     * to ever escape out to callers.
+     */
+    ASSERT(rc != X86EMUL_DONE);
+
     /*
      * Most retire flags should only be set for successful instruction
      * emulation.
--
generated by git-patchbot for /home/xen/git/xen.git#master

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic