Changeset e13daa5d in mainline for kernel/arch/amd64/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/amd64/src/boot/boot.S

    r20b8bf3 re13daa5d  
    5555
    5656multiboot_image_start:
     57        cld
    5758        movl $START_STACK, %esp                 # initialize stack pointer
    5859        lgdtl bootstrap_gdtr                    # initialize Global Descriptor Table register
     
    127128        mov $VESA_INIT_SEGMENT << 4, %edi
    128129        mov $e_vesa_init - vesa_init, %ecx
    129         cld
    130130        rep movsb
    131131
     
    283283        movq $AP_BOOT_OFFSET, %rdi
    284284        movq $_hardcoded_unmapped_size, %rcx
    285         cld
    286285        rep movsb
    287286       
     
    557556       
    558557        movw $0x0c00, %ax                               # black background, light red foreground
    559         cld
    560558       
    561559        ploop:
Note: See TracChangeset for help on using the changeset viewer.