Demo entry 6757331



Submitted by anonymous on Aug 08, 2018 at 10:23
Language: C. Code size: 668 Bytes.

        cmpl $nr_system_calls-1,%eax
        ja bad_sys_call
        push %ds
        push %es
        push %fs
        pushl %edx
        pushl %ecx      # push %ebx,%ecx,%edx as parameters
        pushl %ebx      # to the system call
        movl $0x10,%edx        # set up ds,es to kernel space
        mov %dx,%ds
        mov %dx,%es
        movl $0x17,%edx        # fs points to local data space
        mov %dx,%fs
        call sys_call_table(,%eax,4)
        pushl %eax
        movl current,%eax
        cmpl $0,state(%eax)        # state
        jne reschedule
        cmpl $0,counter(%eax)      # counter
        je reschedule

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).