Changeset 4f35b9ff in mainline


Ignore:
Timestamp:
2010-11-02T19:48:30Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c75698b
Parents:
4687a26c
Message:

Prevent information leak in syscall_entry().

File:
1 edited

Legend:

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

    r4687a26c r4f35b9ff  
    386386        movq ISTATE_OFFSET_RSP(%rsp), %rsp
    387387
     388        /*
     389         * Clear the rest of the scratch registers to prevent information leak.
     390         * The 32-bit XOR on the low GPRs actually clears the entire 64-bit
     391         * register and the instruction is shorter.
     392         */
     393        xorl %edx, %edx
     394        xorl %esi, %esi
     395        xorl %edi, %edi
     396        xorq %r8, %r8
     397        xorq %r9, %r9
     398        xorq %r10, %r10
     399
    388400        sysretq
    389401
Note: See TracChangeset for help on using the changeset viewer.