Fedora Linux Support Community & Resources Center
  #1  
Old 14th May 2011, 05:18 PM
merkava Offline
Registered User
 
Join Date: Jul 2010
Location: Tabriz, Iran
Age: 24
Posts: 75
windows_xp_2003firefox
Bad Address when adding system call

Hi guys.

I have downloaded kernel 2.6.38-5 to add a system call.
I did the following steps:

1. I have added my system call to system call table
Code:
<src folder>/arc/x86/kernel/syscall_table_32.S

.long sys_mycall
2. i have added the system cal number in
Code:
<src folder>/include/asm-generic/unistd.h

#define __NR_mycall 244
__SYSCALL(__NR_mycall, sys_mycall)
3. I have added the prototype to syscalls.h
Code:
<src follder>/include/linux/syscalls.h

asmlinkage long sys_mycall(long input);
4. here is my system call
Code:
asmlinkage long sys_mycall(long input)
{

    return (input * 2); 

}
5. I have edited the Makfiles too.

Now after compilation when i use it via syscall() it gives me "BAD ADDRESS" with errno set to 14.

What should i do?
__________________
Best Regards
MERKAVA
Reply With Quote
Reply

Tags
adding, address, bad

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding system call ahsonbol Linux Chat 1 18th November 2007 04:51 AM
trouble with adding a second IP address - Fedora 7 jb8578 Servers & Networking 3 8th November 2007 08:58 PM
"expected specifier-qualifier-list" ERROR while adding a new system call ahm_irf Programming & Packaging 0 30th April 2007 04:49 AM
adding system call fedora core kernel 2.6.18-1.2798 eecsjob Using Fedora 0 3rd March 2007 02:47 AM
Adding new system call into linux dumb Programming & Packaging 1 21st July 2004 12:51 PM


Current GMT-time: 19:14 (Wednesday, 30-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat