linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joshua Roys <TheReader06@comcast.net>
To: Lukas <blurrpp@yahoo.com>
Cc: linux-assembly@vger.kernel.org
Subject: Re: sources of linux 'system call'
Date: Thu, 13 Sep 2007 14:47:37 -0400	[thread overview]
Message-ID: <46E985C9.1020909@comcast.net> (raw)
In-Reply-To: <248508.35182.qm@web50302.mail.re2.yahoo.com>

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

      reply	other threads:[~2007-09-13 18:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-08 16:08 sources of linux 'system call' Lukas
2007-09-08 16:40 ` Joshua Roys
2007-09-13 17:52   ` Lukas
2007-09-13 18:47     ` Joshua Roys [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46E985C9.1020909@comcast.net \
    --to=thereader06@comcast.net \
    --cc=blurrpp@yahoo.com \
    --cc=linux-assembly@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).