Changeset e13daa5d in mainline for kernel/arch/ia32/src/boot/boot.S


Ignore:
Timestamp:
2008-03-19T21:13:49Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
047aa46
Parents:
20b8bf3
Message:

Fortify ia32 and amd64 kernels against mallicious uspace applications that set
DF prior to entering the kernel. For AMD64 syscalls, we don't use the CLD
instruction, but make use of the SFMASK MSR instead. Simics works fine with
it, but QEMU seems to have a problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/boot/boot.S

    r20b8bf3 re13daa5d  
    5151       
    5252multiboot_image_start:
     53        cld
    5354        movl $START_STACK, %esp                 # initialize stack pointer
    5455        lgdt KA2PA(bootstrap_gdtr)              # initialize Global Descriptor Table register
     
    8687        mov $VESA_INIT_SEGMENT << 4, %edi
    8788        mov $e_vesa_init - vesa_init, %ecx
    88         cld
    8989        rep movsb
    9090
     
    207207        movl $AP_BOOT_OFFSET, %edi
    208208        movl $_hardcoded_unmapped_size, %ecx
    209         cld
    210209        rep movsb
    211210       
     
    280279       
    281280        movw $0x0c00, %ax                                               # black background, light red foreground
    282         cld
    283281       
    284282        ploop:
Note: See TracChangeset for help on using the changeset viewer.