• W
    target/i386: fix interrupt CPL error when using ist in x86-64 · e95e9b88
    Wu Xiang 提交于
    In do_interrupt64(), when interrupt stack table(ist) is enabled
    and the the target code segment is conforming(e2 & DESC_C_MASK), the
    old implementation always set new CPL to 0, and SS.RPL to 0.
    
    This is incorrect for when CPL3 code access a CPL0 conforming code
    segment, the CPL should remain unchanged. Otherwise higher privileged
    code can be compromised.
    
    The patch fix this for always set dpl = cpl when the target code segment
    is conforming, and modify the last parameter `flags`, which contains
    correct new CPL, in cpu_x86_load_seg_cache().
    Signed-off-by: NWu Xiang <willx8@gmail.com>
    Message-Id: <20170621142152.GA18094@wxdeubuntu.ipads-lab.se.sjtu.edu.cn>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    e95e9b88
seg_helper.c 87.4 KB