LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 10-27-2009, 11:34 AM   #1
vrrathod
LQ Newbie
 
Registered: Oct 2009
Posts: 1

Rep: Reputation: 0
What is the best method to add system call in linux kernel?


I have added a system call in my custom compiled kernel. Whenever I try to call it, it retuns -1. Ideally it should return a long.
=> most probably the call is not implemented correctly.

Q:1: How do I know if my system call is implemented correctly?
Q:2: Is there any debugging method which I can use?
(I am a windows guy just playing around)

Thanks
vrrathod.
 
Old 10-29-2009, 02:59 PM   #2
mrshanim
Member
 
Registered: Aug 2009
Posts: 30

Rep: Reputation: 16
returning -1 is error code, your user program is not able to reach your system call function.

I doubt that you followed all the steps properly?
Also make sure about syscall nubmer, and macro for syscall.

Can you post your code for better understanding.

Shanim
 
Old 10-30-2009, 02:37 AM   #3
resetreset
Senior Member
 
Registered: Mar 2008
Location: India
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,127

Rep: Reputation: 47
Can you tell us exactly what you DID, Mr. Rathod?

I love people who add system calls, and do other cool hackerly things, to Linux
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a system call in 2.6.x kernel SungWon Chung Linux - Kernel 2 11-26-2007 10:32 PM
how to add a system call to the linux baran_6566 Linux - Newbie 1 10-15-2007 05:26 AM
I want add my own system call using LKM (loadable kernel module)... raga4223688 Linux - Software 1 03-07-2007 08:21 AM
Add New System Call in RH9 kernel-2.4.20-8 kamal_h_mehta Programming 0 04-08-2006 09:51 AM
how to add another system call in to the kernel?? Pratik H Pandya Programming 1 03-26-2006 03:02 AM


All times are GMT -5. The time now is 09:35 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration