Re: sources of linux 'system call'

Joshua Roys <[email protected]>
Newsgroups gmane.linux.assembly
Message-ID <[email protected]>
Lukas wrote:
> Thank You for answer ... i'll read this sources ...
> but actualy i want to know what instructions processor
> recive after int. My goal is to understand better GDT,
> IDT, LDT in Linux, i want to know what's going on when
> i call for example 125 system call (sys_mprotect)
> whitch allow me change acces rights to given memory
> area. Theory i know ( almost everything is writen in
> Intel guides ) but i need practice. By the way if
> smoebody knoe how to change acces rigts to memory
> without system calls, please help :)
> 
> regards
> Lukas

Hello,

Take a look at (for i386): arch/i386/kernel/entry.S
Then find a line like: ENTRY(system_call)
That gets set in the IDT in: arch/i386/kernel/traps.c, near the end of
function trap_init()
Specifically: set_system_gate(SYSCALL_VECTOR, &systen_call), where
SYSCALL_VECTOR is defined to be 0x80
And: include/asm-i386/desc.h has some items that may be of interest to you.

Good luck,

Joshua Roys
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.