Newbie: where are the DKI function docs?

Previous thread: replacing ioctl operations by Straub, Michael on Thursday, February 16, 2006 - 11:34 am. (10 messages)

Next thread: RE: replacing ioctl operations by Straub, Michael on Thursday, February 23, 2006 - 11:14 am. (8 messages)
From: Jorge Barreto
Date: Thursday, July 23, 2009 - 10:49 am

Read book's of Operating Systems, Linux Kernel, Unix, Computer
Architecture
and for programming read book's about the C Language, C specifications
learn to program in some functional language, perl or python to try to
figure out some code ramifications, and build code checking tools .
 Also learn mathematic, you wile be amaze how you can simplify thing's.
If you don't want this path go to the try and erro. ;)  

_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: Feng,Ddong
Date: Sunday, June 18, 2006 - 9:50 am

While reading the source code, I encounter the following code fragement
in do_exit(),

tsk->flags |= PF_EXITING;

/*
 * Make sure we don't try to process any timer firings
 * while we are already exiting.
 */
tsk->it_virt_expires = cputime_zero;
tsk->it_prof_expires = cputime_zero;
tsk->it_sched_expires = 0;


After set PF_EXITING to tsk->flags, the kernel changes the values of
other three variables without locking any lock. For my understanding,
that means another piece of kernel code, in another process-context, has
no means to rely on those variables correctly. For example, I find the
following code fragement in process_timer_rebalance():


if (likely(!(t->flags & PF_EXITING))) {
	ticks = cputime_add(virt_ticks(t), left);
	if (cputime_eq(t->it_virt_expires,
		       cputime_zero) ||
	    cputime_gt(t->it_virt_expires, ticks)) {
		t->it_virt_expires = ticks;
	}
}


As above, we can see that  process_timer_rebalance() try to get reliable
value of it_virt_expires by checking t->flags first. But unfortunately,
because the variable is protected by no locks, nothing can prevent the
following execution sequence from happening:


1. process_timer_rebalance() checks t->flags and finds the bit is not
set.
2. process_timer_rebalance() then checks t->it_virt_expires and finds it
is not zero.
3. do_exit() set PF_EXITING to tsk->flags (tsk == t here).
4. do_exit() set all three variables to zero.
5. process_timer_rebalance() still considers the process is *NOT* in the
existing status and set it_virt_expires to a non-zero value.

After step 5, we are in a unhealthful status, where a process is in the
existing status but its it_virt_expires is, however, non-zero.

Does my analysis has anything missed or mis-understood, or the kernel
has good reason to do in that way?


_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: mmc mmc
Date: Monday, March 8, 2010 - 3:33 am

--001636e1f9380b8d1d0481479aa2
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I am new to kernel development. As a part of my project, I am now working on
linux kernel MMC drivers.
I have good understanding of the MMC/ SD  specifications. can somebody guide
me on how to understand the linux MMC Host controller driver?
I know of PL-180 Host controller and various registers and interrupts of
this controller.

I am trying to understand the driver code. Can somebody guide me on this?

Thanks,
Aparna.

--001636e1f9380b8d1d0481479aa2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>Hi,</div>
<div>=A0</div>
<div>I am new to kernel development. As a part of my project, I am now work=
ing on linux kernel MMC drivers.</div>
<div>I have good understanding of the MMC/ SD=A0 specifications. can somebo=
<div>I know of PL-180 Host controller and various registers and interrupts =
of this controller. </div>
<div>=A0</div>
<div>I am trying to understand the driver code. Can somebody guide me on th=
is?</div>
<div>=A0</div>
<div>Thanks,</div>
<div>Aparna.</div>

--001636e1f9380b8d1d0481479aa2--
From: biswa.nayak
Date: Monday, June 4, 2007 - 12:27 am

Hi
I am currently trying to understand the boot sequence of Linux.

In the kernel, the 'init' thread after the system is setup for
the user processes it tries to spawn the first user process
using 'kernel_execve'

Now to test this I have written a small module, which when inserted
will spawn a user process from my home directory. 

Now, when I compile the module I get error messages that 

WARNING: "kernel_execve" [/c/test/skel.ko] undefined!

Why is this happening? Even after I exported the symbol 'kernel_execve'
in the file 
<linux>/arch/i386/kernel/sys_i386.c
I am still seeing the same message.

Is something else going in the back ground which I don't understand?

Your help will be highly appreciated.

Thanks
Biswa



The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: Bruce Korb
Date: Saturday, February 18, 2006 - 9:38 am

Hi,

I've Googled around but been unable to find them.  It looks like
they've mostly been marked with ``^/\*\*+'' comments in the source,
but I don't see any place where they have actually been processed
and assembled.  So, if it has been done, I'd like a pointer and
if it hasn't been done, I'm proposing to write a perl script to
fix the deficiency.  Hints/suggestions?

Thanks - Bruce
_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: Lalit Mishra
Date: Friday, September 15, 2006 - 10:01 am

Hello ppl, 
   i am new to kernel programming and am working on
some file system basics. I found out about
file_system_type structure keeping list of registered
file system. but couldnt find out how to access the
start of this list..can u help me out plzz..


		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: Randy.Dunlap
Date: Saturday, February 18, 2006 - 3:00 pm

kernel-doc can be generated from the Documentation/DocBook/ files
and kernel source tree files by running "make *docs" at the top-level
of the kernel source tree.  "make help" says:

Documentation targets:
  Linux kernel internal documentation in different formats:
  xmldocs (XML DocBook), psdocs (Postscript), pdfdocs (PDF)
  htmldocs (HTML), mandocs (man pages, use installmandocs to install)

You can find some kernel version of these at
  http://kernelnewbies.org/documents/
although I have no idea what kernel version is there or whether
it is updated often.  I recommend something like "make mandocs"
or "make htmldocs" in your own source tree.

so there are already scripts to process kernel-doc.

---
~Randy
_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: Bruce Korb
Date: Saturday, February 18, 2006 - 3:32 pm

Thanks, Randy,

I had already found that page and not found functions that
I knew to be doc'ed.  I didn't know about the "make *docs"
stuff.  Thanks! - Bruce
_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: Sam Ravnborg
Date: Monday, June 4, 2007 - 1:39 am

Please post your code + Makefile + command used to build the module.
Did you build the modified kernel? From the warning is does not like this.

	Sam
_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: biswa.nayak
Date: Monday, June 4, 2007 - 5:10 am

Please find the attched module named skel.c and Makefile.
Yes My linux version is Linux-2.6.20.4

[biswa@nerdbox test]$ uname -a
Linux nerdbox.nerdbox 2.6.20.4 #1 SMP Sat Jun 2 17:49:20 IST 2007 i686
i686 i386 GNU/Linux

[biswa@nerdbox test]$ cat /proc/kallsyms | grep kernel_execve
c01072ea T kernel_execve

Please let me know if you need any more info

Thanks




The information contained in this electronic message and any attachments to=
 this message are intended for the exclusive use of the addressee(s) and=
 may contain proprietary, confidential or privileged information. If you=
 are not the intended recipient, you should not disseminate, distribute or=
 copy this e-mail. Please notify the sender immediately and destroy all=
 copies of this message and any attachments.=20

WARNING: Computer viruses can be transmitted via email. The recipient=
 should check this email and any attachments for the presence of viruses.=
 The company accepts no liability for any damage caused by any virus=
 transmitted by this email.
=20
[ message continues ]
" title="www.wipro.com">www.wipro.com
From: pradeep singh
Date: Monday, June 4, 2007 - 7:48 am

On 6/4/07, biswa.nayak@wipro.com <biswa.nayak@wipro.com> wrote:
[snip]

/*extern int kernel_execve(const char *filename, char *const argv[],
char *const envp[]);*/

Why is this line commented?
May be i am missing something silly here, but shouldn't this should be
uncommented?

Please CMIIW.

Thanks
--psr

-- 
play the game
_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: biswa.nayak
Date: Monday, June 4, 2007 - 8:58 am

This declaration is no longer required as I am exporting the symbol,


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: Sam Ravnborg
Date: Monday, June 4, 2007 - 8:04 am

That does not look like a kernel you compiled yourself.
Did you really execute make in the <Path_to_linux> dir?
This does not tell is a symbol is exported or not.
Try to look into modules.symvers wich list all exported functions.

	Sam
_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: biswa.nayak
Date: Monday, June 4, 2007 - 9:55 am

[biswa@nerdbox linux-2.6.20.4]$ nm vmlinux | grep kernel_execve
c01072ea T kernel_execve
[biswa@nerdbox linux-2.6.20.4]$ cat /proc/kallsyms | grep kernel_execve
c01072ea T kernel_execve

As 'kernel_execve' symbol is found on vmlinux and the same address
is reflected in kallsyms I believe it should have got exported.

But again, When I checked into Modules.symvars I could not find
kernel_execve in that.

How strange?

What can be the reason?

Thanks for your help 


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
 
www.wipro.com

_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: Shane Volpe
Date: Thursday, July 23, 2009 - 3:18 pm

--0016e64c1ab4ea7df0046f66dee5
Content-Type: text/plain; charset=ISO-8859-1
Jorge,Can you provide a list of recommended books for the topics you
mentioned?
Regards,
Shane

--0016e64c1ab4ea7df0046f66dee5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<div>>>Read book's of Operating Systems, Linux Kernel, Unix, Computer<br>>>Architecture</div>Jorge,<div>Can you provide a list of recommended books for the topics you mentioned?</div><div>Regards,</div><div>

Shane</div>

--0016e64c1ab4ea7df0046f66dee5--
From: Charlie Brady
Date: Thursday, July 23, 2009 - 5:19 pm

If you ask google or amazon, you can get a list of such books, and 
numerous reviews as well.
_______________________________________________
Kernel-mentors mailing list
Kernel-mentors@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors
From: Mohamed Thalib H
Date: Monday, March 8, 2010 - 3:54 am

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
mmc mmc wrote:
<blockquote
 cite="mid:c23793cb1003080233m39938eeavb55668ce36e05883@mail.gmail.com"
 type="cite">
  <div>Hi,</div>
  <div> </div>
  <div>I am new to kernel development. As a part of my project, I am
now working on linux kernel MMC drivers.</div>
  <div>I have good understanding of the MMC/ SD  specifications. can
somebody guide me on how to understand the linux MMC Host controller
driver?</div>
  <div>I know of PL-180 Host controller and various registers and
interrupts of this controller. </div>
  <div> </div>
  <div>I am trying to understand the driver code. Can somebody guide me
on this?</div>
  <div> </div>
  <div>Thanks,</div>
  <div>Aparna.<!-- yyy::X-Propel-ID:gP3j0a38ay90::zzz -->
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Kernel-mentors mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kernel-mentors@selenic.com">Kernel-mentors@selenic.com</a>
<a class="moz-txt-link-freetext" href="http://selenic.com/mailman/listinfo/kernel-mentors">http://selenic.com/mailman/listinfo/kernel-mentors</a>
  </pre>
</blockquote>
<br>
Best way is to look into the existing code and learn from it.<br>
<br>
Hope  you are trying to write a host. take a Host controller already
there and understand it and implement your own.<br>
<br>
<pre class="moz-signature" cols="72">Best Regards,
Mohamed Thalib .H</pre>
<br>
</body>
</html>
Previous thread: replacing ioctl operations by Straub, Michael on Thursday, February 16, 2006 - 11:34 am. (10 messages)

Next thread: RE: replacing ioctl operations by Straub, Michael on Thursday, February 23, 2006 - 11:14 am. (8 messages)