Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4612090
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:21:25+00:00 2026-05-22T01:21:25+00:00

I have downloaded kernel 2.6.38-5 and want to add a system call. I did

  • 0

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

  1. I have added my system call to system call table;

    <src folder>/arc/x86/kernel/syscall_table_32.S
    
    .long sys_mycall
    
  2. I have added the system call number;

    <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;

    <src follder>/include/linux/syscalls.h
    
    asmlinkage long sys_mycall(long input);
    
  4. And, here is my system call;

    asmlinkage long sys_mycall(long input) {
        return (input * 2);
    }
    
  5. I have edited the Makefiles too.

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

What should I do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:21:26+00:00Added an answer on May 22, 2026 at 1:21 am

    On x86, system call number 244 is already taken by get_thread_area(), which takes as first argument a pointer to a struct user_desc:

    int get_thread_area(struct user_desc *u_info);
    

    You are passing a number instead of a pointer, the kernel is trying to interpret it as a pointer, it’s determining that it points outside of your process, and returning -EFAULT.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After I have downloaded a gingerbread system build using the following commands, how do
I have downloaded ffmpeg lib file and complied it for armv7. I added ffmpeg
I have downloaded Android source code but I don't find the Kernel Directory in
I have a fc14 32 bit system with 2.6.35.13 custom compiled kernel. When I
i have downloaded a sonata admin bundle, and have placed in /var/www/Symfony/vendor/symfony/src/Symfony/Bundle , and
Earlier I have downloaded Linux kernel from the git repository. Now I am trying
I have downloaded facebook-java-api-3.0.2-bin from http://code.google.com/p/facebook-java-api/ for connecting to face book.I want to use
I have downloaded the following file: rawdata_2001.text and I have the following perl code:
I have downloaded Android source code (2.2 froyo) but it doesn't have the kernel
I have written a Linux kernel module, which I included in a kernel downloaded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.