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 121047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:54:29+00:00 2026-05-11T03:54:29+00:00

New to Linux programming in general. I am trying to communicate with a kernel

  • 0

New to Linux programming in general.

I am trying to communicate with a kernel module via shared memory, but cannot call the functions used in user apps such as shmget(); I have installed kernel-headers and kernel-devel, and included , to the kernel module source, but the headers do not contain any functions.

Is there a standard way of using shared memory in the kernel?

Also, any tips on how to use sockets in the same situation will be of great help.

Using Distro: CentOS 5.2 kernel: 2.6.18-92.1.22.e15

Thanks in advance.

//Added// To clarify, I am trying to make a demo that has common features of a typical embedded linux project. The final goal being porting it to LynxOS to see what kind of troubles may occur when doing so on larger projects.

Currently the main features of the demo is multi-process, pipes, message ques, shared-memory, sockets, multi-threads.

It has an user app and a loadable kernel module communicating with each other. pipes and messages between two processes within the user app, and shared-memory and sockets between the user app and kernel module.

If I am doing something plain off-course, please tell me.

  • 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. 2026-05-11T03:54:29+00:00Added an answer on May 11, 2026 at 3:54 am

    Your purpose does not look very clear to me. Shared memory is not a way to communicate between user space and kernel space. If you want to have access to some kernel allocated memory, one way to go is to implement the mmap system call.

    If you really need to write some kernel code, a recommended reading is : linux device driver third edition, and chapter 15 is the one you are looking for.

    Once you have shared memory, you probably will need a way to do some synchronisation, ie working on one part within the kernel, while using another part in user space. An example of userspace / kernel sharing of memory is the V4L2 API. An more friendly explanation can be found in the LWN series about it.

    However, if you were more specific in what you want to do, you would receive more specific help on the way to do it, if you really need a kernel module, which kernel code you could have a look at and so on.

    For the socket thing, I don’t know enough, but you should google for linux + kernel + netlink. It is used to communicate with the kernel from user space via ‘standard’ socket call, but I have really no idea on how to use it in a module.

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

Sidebar

Ask A Question

Stats

  • Questions 94k
  • Answers 94k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Better solutions exist, I'm sure, but I'll give it a… May 11, 2026 at 6:47 pm
  • Editorial Team
    Editorial Team added an answer You could use server side code to set the root… May 11, 2026 at 6:47 pm
  • Editorial Team
    Editorial Team added an answer Edit: It wasn't quite there last time I evaluated it,… May 11, 2026 at 6:47 pm

Related Questions

I am new to Windows and Visual Studio. I have a strong background in
I am currently working in C/C++ in a Unix environment and am new to
For my Programming 102 class we are asked to deliver C code that compiles
I am new to programming. I'm studying Computer Science, and programming is probably going

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.