LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 05-29-2005, 07:44 AM   #1
donoh
LQ Newbie
 
Registered: Apr 2005
Location: Jo'burg South Africa
Distribution: Ubuntu
Posts: 3

Rep: Reputation: 0
what is and why use PROCFS


Hi,

I'm currently working on an assignment; I have to develop an encryption kernel module. I have read The Linux Kernel Module Programming Guide, but now I've got more questions than I had before.

Before I read the article, I was under the impression that the kernel module uses the procfs to store data written to the /dev/<module name>
I was guessing that this special file was located somewhere in the /proc directory. I knew I was missing something when I couldn’t find it

Now I understand it to be merely a tool to communicate with the user space process. A quote from "The Linux Kernel Module Programming Guide"... "Originally designed to allow easy access to information about processes (hence the name), it is now used by every bit of the kernel which has something interesting to report"

The reason for my confusion
I demo'ed my last assignment (I had used a linked list to store the data that was written to my device). I was told that I should use a procfs instead. (I'm pretty sure I was, but I didn't know it.)

My question is...
Is procfs merely a tool / interface between user space processes and my kernel module? i.e. Is it an interface whereby I can copy the read/written data to/from a buffer in my module?

If so, then I do have to define my own data structures?

Thank You, ANY input would be greatly appreciated.
 
Old 05-30-2005, 01:31 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
http://www.kernelnewbies.org/documen...ide/intro.html
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
LM Sensors Help, Can't access procfs/sysfs file Unable to find i2c bus information; Whiskers Linux - Software 16 11-03-2008 04:58 PM
HostAP and procfs shuuhen Linux - Wireless Networking 1 04-11-2005 01:22 AM
about procfs serji Linux - Software 1 12-04-2003 11:43 PM
procfs nullpt *BSD 1 10-25-2003 03:30 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:56 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration