LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff.Fellin@rflelect.com
To: mmeswani@utep.edu
Cc: linuxppc-dev@ozlabs.org,
	linuxppc-dev-bounces+jeff.fellin=rflelect.com@ozlabs.org
Subject: Re: Intercept System call using Kernel  module is 2.6 kernel
Date: Tue, 6 Jun 2006 13:02:55 -0400	[thread overview]
Message-ID: <OF75C056A0.F5AF360E-ON85257185.005D288B@teal.com> (raw)

                                                                                                                                     
                      "Meswani, Mitesh" <mmeswani@utep.edu>                                                                          
                      Sent by:                                             To:       <linuxppc-dev@ozlabs.org>                       
                      linuxppc-dev-bounces+jeff.fellin=rflelect.com        cc:                                                       
                      @ozlabs.org                                          Subject:  Intercept System call using Kernel  module is   
                                                                            2.6 kernel                                               
                                                                                                                                     
                      06/06/2006 12:25                                                                                               
                                                                                                                                     
                                                                                                                                     










>Hello


>I am attempting to run some user code with kernel space permission. I am
using the ppc64 kernel version >2.6.16-rc4-3-ppc64 for IBM Power5
processors.
>In this kernel module I am trying to implement a function that can be
called from user space.
>
>I have found through various posts that using unused system calls and
replacing them temporarily can acheive this >objective.
>
>This is what I am doing, but its not working, please bear with the
slightly long code that follows:
>
>1) since the 2.6 kernel does not export sys_call_table, I grep it from the
boot image
First sign what you are doing is not a good idea. There are better methods
of this
1) device driver interface with read/write/ioctl interface
2) procfs files from a module/driver
3) sysfs files from a module/driver

SNIP
>
>The problem is that when I execute my user app I expect to see two things:
 >a) I should see a message in the log "Executing mitesh_func..." and
> b) A return value of 2
>However I get an error value -1 returned.
An indication of thinking of system calls vs other methods is wrong!.

>Any help and ideas are highly appreciated.
Don't add your own or hijack system calls

Thank you in advance,
Mitesh
 _______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

             reply	other threads:[~2006-06-06 17:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-06 17:02 Jeff.Fellin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-06 17:14 Intercept System call using Kernel module is 2.6 kernel Jenkins, Clive
     [not found] <C26C730943E01145B4F89E37FE0A022002BBC7A2@itdsrvmail02.utep.edu>
2006-06-06 16:25 ` Meswani, Mitesh
2006-06-06 17:48   ` Arnd Bergmann

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=OF75C056A0.F5AF360E-ON85257185.005D288B@teal.com \
    --to=jeff.fellin@rflelect.com \
    --cc=linuxppc-dev-bounces+jeff.fellin=rflelect.com@ozlabs.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mmeswani@utep.edu \
    /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