kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: cyberax82@gmail.com (Ravishankar)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Hooking a system call.
Date: Mon, 26 Mar 2012 21:00:07 +0530	[thread overview]
Message-ID: <CAO_LctT5bJYfxcQLKr6pACryLUg4KCWxzK1jhnk4==ufnwebOg@mail.gmail.com> (raw)
In-Reply-To: <CA+CftcGKroq9U2CU6YwQGGFRhd6s99-AhpGmz9JTm+C=VkuhVw@mail.gmail.com>

>
> >>how can I make system_call_table address to writable so that one can
> change to >>customized system call.
>
>
> Like this:
      unsigned int level;
      pte_t *pte = lookup_address(sys_call_table, &level);
      if(pte->pte &~ _PAGE_RW) pte->pte |= _PAGE_RW;

An awesome example of pretty much what you're trying to do can be found
here:
https://github.com/fpletz/kernelroll
Enjoy :D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120326/d594205d/attachment.html 

  parent reply	other threads:[~2012-03-26 15:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26  4:45 Hooking a system call V.Ravikumar
2012-03-26  7:48 ` Mulyadi Santosa
2012-03-26  8:14   ` V.Ravikumar
2012-03-26  8:27     ` Mulyadi Santosa
2012-03-26 13:04       ` Peter Senna Tschudin
2012-03-26 13:43     ` Javier Martinez Canillas
2012-03-26 15:30     ` Ravishankar [this message]
2012-03-26 19:33       ` richard -rw- weinberger
2012-03-26 20:22     ` Fredrick
2012-03-28  3:46   ` V.Ravikumar
2012-03-28  6:10     ` rohan puri

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='CAO_LctT5bJYfxcQLKr6pACryLUg4KCWxzK1jhnk4==ufnwebOg@mail.gmail.com' \
    --to=cyberax82@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 NNTP newsgroup(s).