flat assembler
Message board for the users of flat assembler.

Index > Linux > sys_fork

Author
Thread Post new topic Reply to topic
jInuQ



Joined: 26 Jun 2003
Posts: 48
Location: USA - NV
jInuQ 05 Jul 2003, 06:52
Okay from what the docs say sys_fork take a pt_regs struct. This look right:

struc pt_regs ebx, ecx, edx, esi, edi, ebp, eax, xds, xes, orig_eax, eip, xcs, eflags, esp ,xss
{

.ebx dd ebx
.ecx dd ecx
.edx dd edx
.esi dd esi
.edi dd edik
.ebp dd ebp
.eax dd eax
.xds dd xds
.orig_eax dd orig_eax
.eip dd eip
.xcs dd xcs
.eflags dd eflags
.esp dd esp
.xss dd xss

}

How then does one use the sys_fork function to fork a process?

_________________
jInuQ

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."
- Antoine de Saint Exupery
Post 05 Jul 2003, 06:52
View user's profile Send private message Visit poster's website AIM Address Reply with quote
bazik



Joined: 28 Jul 2003
Posts: 34
Location: .de
bazik 31 Jul 2003, 12:20
The correct pt_regs should look like this:

Code:
struc pt_regs
{
  .ebx            dd 0
        .ecx            dd 0
        .edx            dd 0
        .esi            dd 0
        .edi            dd 0
        .ebp            dd 0
        .eax            dd 0
        .xds            dd 0
        .xes            dd 0
        .orig_eax       dd 0
        .eip            dd 0
        .xcs            dd 0
        .eflags         dd 0
        .esp            dd 0
        .xss            dd 0    

}
    


About the filling the structure... there is not much information about this. I'd say the best you can do is runing a recursive grep for "sys_fork" and/or "pt_regs" on the linux source tree. I bet you find usable info there. Smile
Post 31 Jul 2003, 12:20
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.