Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 05-05-2004, 03:12 AM   #1
Registered: Jan 2003
Location: Finland
Distribution: ElementaryOS Freya as main, every other ubuntu-based as testing
Posts: 124

Rep: Reputation: 15
moving from 2.4.xx to 2.6.3...

Hi! I updated my mdk into 10, and installed it with kernel 2.6.3.
And now I'm feeling like an idiot. The problem is, that I have done a module in 2.4.xx and Now i decided to re-write it for 2.6.xx. The module I "rewrote" compiles without any problems, i get the correct .ko - file, but...

I get This when loading it:
"insmod: error inserting 'nodir-driver.ko': -1 Unknown symbol in module"
and doing a dmesg shows the symbol is sys_call_table...

So, it seems to me that either:

a) I have no clue that what headers should I include when i want to modify system calls or
b) I have no idea what is the function to load the sys_call_table.

Could somebody who knows more about the subject look at my source and tell me what is wrong. This source only has a part of the entire program, but it doesn't work either...

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/version.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/syscall.h>

MODULE_DESCRIPTION("Partial trojan blocker");
MODULE_AUTHOR("thautane (");

extern void* sys_call_table[];

int (*save_mkdir) (const char *path);

int thereisno_mkdir(const char *path){
return 0;}

static int nodir_init_module(void){
return 0;}

static void nodir_exit_module(void){


The entire lkm, when loaded, blocks (or should block) all users from reading, writing, chdir'ing, su'ing etc...
Old 05-06-2004, 09:59 AM   #2
Senior Member
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36

I think that your real problem is that sys_call_table was an exported symbol in kernel 2.4 whereas it's not in kernel 2.6. So either you hack your kernel to export this symbol... But there's probably a reason if sys_call_table is not anymore an esport symbol in 2.6 release. Or you find the way they use to replace this feature.

Old 06-21-2004, 06:55 AM   #3
Registered: Jan 2003
Location: Finland
Distribution: ElementaryOS Freya as main, every other ubuntu-based as testing
Posts: 124

Original Poster
Rep: Reputation: 15
Hmm, sounds like I really DO have a problem...
Well, If anyone could point me into the right direction, I'd appriciate it.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
help with moving to another hd jclu Linux - Hardware 0 11-30-2005 11:40 AM
moving along so far.... Tbagz Linux - Newbie 3 10-31-2005 05:20 AM
moving from one hd to another katy_c4c Linux - Newbie 3 10-22-2004 03:56 AM
copying/moving stalls when moving a lot of data to a usb stick =X= Linux - Hardware 10 07-30-2004 05:29 AM
Moving up MasterC Linux - General 10 06-06-2002 05:51 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:24 AM.

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