Date: Mon, 14 Jun 2004 19:15:58 +0200 From: =?iso-8859-1?Q?Jos=E9_Nicol=E1s_Castellano?= <jncastellano@noconname.org> To: "ari edelkind" <edelkind-freebsd-hackers@episec.com>, <freebsd-hackers@freebsd.org> Subject: Re: freebsd asm Message-ID: <005001c45233$42d8f120$0200a8c0@peron> References: <003801c45207$01ddfa70$0200a8c0@peron> <20040614164040.GN14968@episec.com>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- > ... which doesn't exit, therefore your program accesses memory addresses > that aren't meant to supply program code, and it crashes. > > Freebsd system calls are generally accessed using interrupt vector 0x80. > The function that deals with this interrupt in the kernel expects the > number of the system call in eax, and it expects the program to have > called a function along the way. Thus, it's looking for the following > stack structure: > > [RRRR][DDDD][SSSS][NNNN] > > RRRR: return address, inserted by 'call' instruction > DDDD: descriptor vector > SSSS: string address > NNNN: number of bytes to write. > > ... > > You can find the necessary system call numbers in > /usr/include/sys/syscall.h . Tnaks a lot! i understand all perfectly ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005001c45233$42d8f120$0200a8c0>