LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-22-2004, 08:33 AM   #1
appas
Member
 
Registered: Jul 2004
Posts: 72

Rep: Reputation: 15
Command to pass the address of sys_call_table to a module


Hi,

I am writing a linux module which should intercept File system calls. I am trying to use sys_call_table which is not exported in my kernel 2.4.20 version.
I have an alternate to overcome the above problem by passing the address of sys_call_table obtained from System.map.I want to know how to pass the address of sys_call_table and assign the same to local variable in my module.
 
Old 07-22-2004, 12:13 PM   #2
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
overwriting function pointers in table is not very reliable, better to use function hijacking. http://www.u-e-b-i.com/silvio/kernel-hijack.txt but if u want to pass params to a module, see here: http://www.xml.com/ldd/chapter/book/ch02.html#t6
 
Old 07-23-2004, 01:52 AM   #3
appas
Member
 
Registered: Jul 2004
Posts: 72

Original Poster
Rep: Reputation: 15
Thank you and it works but when i include some printk statements in the code, the output was not written to the /var/log/messages sometimes. Is there any specific reason for this kind of behaviour.
 
Old 07-23-2004, 12:30 PM   #4
infamous41md
Member
 
Registered: Mar 2003
Posts: 804

Rep: Reputation: 30
other than the obvious, is you syslog configured to output properly, i donno...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I pass a module parameter? maerong Debian 2 02-07-2005 07:33 AM
how to pass kernel module options (cx8800, ATI Tv Wonder pro) johnford Linux - Hardware 3 11-16-2004 08:23 PM
Can you su and enter pass in same command Onemessedupjedi Slackware 3 11-19-2003 09:48 PM
pass by address between functions Xiangbuilder Programming 2 10-10-2003 06:54 AM
Mandrake 9.1 does not pass checking module dependency during boot after installation Middelburg Linux - Newbie 1 06-20-2003 10:56 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration