linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <mcguire@lzu.edu.cn>
To: Zhenwen Xu <helight.xu@gmail.com>
Cc: Jonathan Nell <crtrn13@gmail.com>, linux-c-programming@vger.kernel.org
Subject: Re: Changing syscall table
Date: Thu, 3 Sep 2009 08:40:48 +0200	[thread overview]
Message-ID: <20090903064048.GB1508@opentech.at> (raw)
In-Reply-To: <20090903002650.GA4512@helight>

On Thu, 03 Sep 2009, Zhenwen Xu wrote:

> On Tue, Sep 01, 2009 at 08:57:58PM +0300, Jonathan Nell wrote:
> > I'm trying to wrap the
> > SG_IO ioctl call (i.e. trap it in the kernel) and have that dump the
> > data from (struct sg_io_hdr).dxferp.
> > Having issues with doing the kernel trap in the newer kernel versions
> > though (trying on 2.6.30). The syscall table is now read-only but for
> > some reason my set_memory_rw() call is failing... Any ideas how to do
> > this properly?
> > 
> > Here are the relevant bits of code:
> 
> try read this:
> http://zhwen.org/xlog/2009/03/%e6%88%aa%e8%8e%b7linux%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a8.htm
> 
> here is the demo.
> http://zhwen.org/coding/cat_syscall.c

while this is quit a nice hack I think that meanwhile standard methods like
kprobes or utrace would do the trick without such intrusive code and allow
very flexible analysis of what is going on.

hofrat

  reply	other threads:[~2009-09-03  6:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01 17:57 Changing syscall table Jonathan Nell
2009-09-03  0:26 ` Zhenwen Xu
2009-09-03  6:40   ` Nicholas Mc Guire [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-09-04  0:31 Zhenwen Xu

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=20090903064048.GB1508@opentech.at \
    --to=mcguire@lzu.edu.cn \
    --cc=crtrn13@gmail.com \
    --cc=helight.xu@gmail.com \
    --cc=linux-c-programming@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 NNTP newsgroup(s).