Changeset 72cf064 in mainline for kernel/arch/amd64/src/asm.S


Ignore:
Timestamp:
2012-08-13T17:17:04Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
33fee91
Parents:
f4a8734 (diff), 4820360 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/asm.S

    rf4a8734 r72cf064  
    362362         */
    363363        call syscall_handler
    364        
     364
     365        /*
     366         * Test if the saved return address is canonical and not-kernel.
     367         * We do this by looking at the 16 most significant bits
     368         * of the saved return address (two bytes at offset 6).
     369         */
     370        testw $0xffff, ISTATE_OFFSET_RIP+6(%rsp)
     371        jnz bad_rip
     372
    365373        cli
    366374       
     
    388396        sysretq
    389397
     398bad_rip:
     399        movq %rsp, %rdi
     400        movabs $bad_rip_msg, %rsi
     401        xorb %al, %al
     402        callq fault_from_uspace
     403        /* not reached */
     404       
     405bad_rip_msg:
     406        .asciz "Invalid instruction pointer."
     407
    390408/** Print Unicode character to EGA display.
    391409 *
Note: See TracChangeset for help on using the changeset viewer.