• S
    target-i386: Fixed syscall posssible segfault · 885b7c44
    Stanislav Shmarov 提交于
    In user-mode emulation env->idt.base memory is
    allocated in linux-user/main.c with
    size 8*512 = 4096 (for 64-bit).
    When fake interrupt EXCP_SYSCALL is thrown
    do_interrupt_user checks destination privilege level
    for this fake exception, and tries to read 4 bytes
    at address base + (256 * 2^4)=4096, that causes
    segfault.
    
    Privlege level was checked only for int's, so lets
    read dpl from memory only for this case.
    Signed-off-by: NStanislav Shmarov <snarpix@gmail.com>
    Message-Id: <1473773008-2588376-1-git-send-email-snarpix@gmail.com>
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    885b7c44
seg_helper.c 87.3 KB