<br><br><div class="gmail_quote">2012/6/22 <span dir="ltr"><<a href="mailto:kernelnewbies-request@kernelnewbies.org" target="_blank">kernelnewbies-request@kernelnewbies.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Send Kernelnewbies mailing list submissions to<br>
<a href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:kernelnewbies-request@kernelnewbies.org">kernelnewbies-request@kernelnewbies.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:kernelnewbies-owner@kernelnewbies.org">kernelnewbies-owner@kernelnewbies.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Kernelnewbies digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: download the source code of some commands (Greg Freemyer)<br>
2. could some current.h files be simplified? (Robert P. J. Day)<br>
3. Re: download the source code of some commands (Wang Lei)<br>
4. Re: download the source code of some commands (??)<br>
5. Re: Kernel Memory (<a href="mailto:michi1@michaelblizek.twilightparadox.com">michi1@michaelblizek.twilightparadox.com</a>)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 21 Jun 2012 10:42:12 -0400<br>
From: Greg Freemyer <<a href="mailto:greg.freemyer@gmail.com">greg.freemyer@gmail.com</a>><br>
Subject: Re: download the source code of some commands<br>
To: ?? <<a href="mailto:wangzhe5004@gmail.com">wangzhe5004@gmail.com</a>><br>
Cc: kernelnewbies <<a href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a>><br>
Message-ID:<br>
<CAGpXXZLM7s_=<a href="mailto:2xWcEDFtSrj_0-EjgP7aP7XNu1XEmZMEhXT53w@mail.gmail.com">2xWcEDFtSrj_0-EjgP7aP7XNu1XEmZMEhXT53w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
On Thu, Jun 21, 2012 at 8:48 AM, ?? <<a href="mailto:wangzhe5004@gmail.com">wangzhe5004@gmail.com</a>> wrote:<br>
> ? Hi all:<br>
> ? ? ?? I want to see some source code of some commands,for<br>
> example,halt,reboot,uptime,and so on.<br>
><br>
> but i don't kown where to download??? can you give me some advice?<br>
><br>
> Thanks in advance!<br>
<br>
You need to figure out how your distro of choice lets you query the<br>
filelist for packages.<br>
<br>
I use openSUSE primarily and it has the Yast tool that lets you do<br>
that in the software management section.<br>
<br>
uptime => coreutils<br>
reboot => aaa_base<br>
halt => aaa_base<br>
<br>
Once you know the package your distro uses you can download the<br>
corresponding source package for it.<br>
<br>
You will have better luck learning the process you need to know by<br>
asking on a distro specific mailing list.<br>
<br>
Greg<br>
<br></blockquote><div>hi, </div><div> you can use the download tool to get the sources code.</div><div> eg: apt-get source ssh (ubuntu)</div><div> you can get ssh source code.</div><div> but, not all !</div><div>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 21 Jun 2012 10:54:59 -0400 (EDT)<br>
From: "Robert P. J. Day" <<a href="mailto:rpjday@crashcourse.ca">rpjday@crashcourse.ca</a>><br>
Subject: could some current.h files be simplified?<br>
To: Kernel Newbies <<a href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a>><br>
Message-ID: <alpine.DEB.2.02.1206211048240.22454@oneiric><br>
Content-Type: TEXT/PLAIN; charset=US-ASCII<br>
<br>
<br>
it *seems* as if a number of current.h files from various<br>
architectures could be simplified. here's <asm-generic/current.h>,<br>
which gives any architecture a generic starting point in defining both<br>
get_current() and current:<br>
<br>
#ifndef __ASM_GENERIC_CURRENT_H<br>
#define __ASM_GENERIC_CURRENT_H<br>
<br>
#include <linux/thread_info.h><br>
<br>
#define get_current() (current_thread_info()->task)<br>
#define current get_current()<br>
<br>
#endif /* __ASM_GENERIC_CURRENT_H */<br>
<br>
and if that's acceptable, any architecture is welcome to simply<br>
include it as, for instance, mips does in <asm/current.h>:<br>
<br>
#include <asm-generic/current.h><br>
<br>
but here's the current.h file for parisc:<br>
<br>
#ifndef _PARISC_CURRENT_H<br>
#define _PARISC_CURRENT_H<br>
<br>
#include <linux/thread_info.h><br>
<br>
struct task_struct;<br>
<br>
static inline struct task_struct * get_current(void)<br>
{<br>
return current_thread_info()->task;<br>
}<br>
<br>
#define current get_current()<br>
<br>
#endif /* !(_PARISC_CURRENT_H) */<br>
<br>
i'm not sure i see why the generic version wasn't adequate for<br>
parisc (apart from the explicit pointer casting). same thing with the<br>
cris architecture and, i'm sure, others.<br>
<br>
is there any reason why some of those current.h files can't just<br>
include the generic one?<br>
<br>
rday<br>
<br>
--<br>
<br>
========================================================================<br>
Robert P. J. Day Ottawa, Ontario, CANADA<br>
<a href="http://crashcourse.ca" target="_blank">http://crashcourse.ca</a><br>
<br>
Twitter: <a href="http://twitter.com/rpjday" target="_blank">http://twitter.com/rpjday</a><br>
LinkedIn: <a href="http://ca.linkedin.com/in/rpjday" target="_blank">http://ca.linkedin.com/in/rpjday</a><br>
========================================================================<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 21 Jun 2012 23:22:49 +0800<br>
From: Wang Lei <<a href="mailto:f3d27b@gmail.com">f3d27b@gmail.com</a>><br>
Subject: Re: download the source code of some commands<br>
To: ?? <<a href="mailto:wangzhe5004@gmail.com">wangzhe5004@gmail.com</a>><br>
Cc: kernelnewbies <<a href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a>><br>
Message-ID: <<a href="mailto:4fe33c55.83da440a.4026.ffffc75b@mx.google.com">4fe33c55.83da440a.4026.ffffc75b@mx.google.com</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
If you use Debian or other distribution with apt package system.<br>
<br>
You can use whereis to locate this command.<br>
[~]$ whereis halt<br>
halt: /sbin/halt /usr/share/man/man5/halt.5.gz /usr/share/man/man8/halt.8.gz<br>
<br>
Then, use dpkg -S to show which package it's included. This one is: sysvinit.<br>
[~]$ dpkg -S /sbin/halt<br>
sysvinit: /sbin/halt<br>
<br>
Now, you can download the source from Debian source, use:<br>
[~]$ apt-get source sysvinit<br>
<br>
Or if you want the original source, use aptitude (or apt-cache) find<br>
it's homepage.<br>
[~]$ aptitude show sysvinit<br>
Package: sysvinit<br>
......<br>
Homepage: <a href="http://savannah.nongnu.org/projects/sysvinit" target="_blank">http://savannah.nongnu.org/projects/sysvinit</a><br>
<br>
At last, get it from there. As for other package systems, I think there<br>
should be a way too. Or you can google.<br>
<br>
On 2012-06-21 20:48:48 +0800, ?? wrote:<br>
> Hi all:<br>
> I want to see some source code of some commands,for<br>
> example,halt,reboot,uptime,and so on.<br>
><br>
> but i don't kown where to download? can you give me some advice?<br>
><br>
> Thanks in advance!<br>
> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br>
--<br>
Regards,<br>
Lei<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Thu, 21 Jun 2012 23:46:21 +0800<br>
From: ?? <<a href="mailto:wangzhe5004@gmail.com">wangzhe5004@gmail.com</a>><br>
Subject: Re: download the source code of some commands<br>
To: Wang Lei <<a href="mailto:f3d27b@gmail.com">f3d27b@gmail.com</a>><br>
Cc: kernelnewbies <<a href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a>><br>
Message-ID:<br>
<<a href="mailto:CAJrRU3XDpS620jOe%2BQ8W%2BsiuGvR3CzzJOHZg3e%2BpWSSU5t0Tuw@mail.gmail.com">CAJrRU3XDpS620jOe+Q8W+siuGvR3CzzJOHZg3e+pWSSU5t0Tuw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="gb2312"<br>
<br>
2012/6/21 Wang Lei <<a href="mailto:f3d27b@gmail.com">f3d27b@gmail.com</a>><br>
<br>
> If you use Debian or other distribution with apt package system.<br>
><br>
> You can use whereis to locate this command.<br>
> [~]$ whereis halt<br>
> halt: /sbin/halt /usr/share/man/man5/halt.5.gz<br>
> /usr/share/man/man8/halt.8.gz<br>
><br>
> Then, use dpkg -S to show which package it's included. This one is:<br>
> sysvinit.<br>
> [~]$ dpkg -S /sbin/halt<br>
> sysvinit: /sbin/halt<br>
><br>
> Now, you can download the source from Debian source, use:<br>
> [~]$ apt-get source sysvinit<br>
><br>
> Or if you want the original source, use aptitude (or apt-cache) find<br>
> it's homepage.<br>
> [~]$ aptitude show sysvinit<br>
> Package: sysvinit<br>
> ......<br>
> Homepage: <a href="http://savannah.nongnu.org/projects/sysvinit" target="_blank">http://savannah.nongnu.org/projects/sysvinit</a><br>
><br>
> At last, get it from there. As for other package systems, I think there<br>
> should be a way too. Or you can google.<br>
><br>
<br>
Thank you very much ! i follow your steps, and download the source code<br>
successfully.<br>
<br>
On 2012-06-21 20:48:48 +0800, ?? wrote:<br>
> Hi all:<br>
> I want to see some source code of some commands,for<br>
> example,halt,reboot,uptime,and so on.<br>
><br>
> but i don't kown where to download? can you give me some advice?<br>
><br>
> Thanks in advance!<br>
<br>
> > _______________________________________________<br>
> > Kernelnewbies mailing list<br>
> > <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> > <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
><br>
> --<br>
> Regards,<br>
> Lei<br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120621/6e586022/attachment-0001.html" target="_blank">http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120621/6e586022/attachment-0001.html</a><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Thu, 21 Jun 2012 17:48:25 +0200<br>
From: <a href="mailto:michi1@michaelblizek.twilightparadox.com">michi1@michaelblizek.twilightparadox.com</a><br>
Subject: Re: Kernel Memory<br>
To: Vijay Chauhan <<a href="mailto:kernel.vijay@gmail.com">kernel.vijay@gmail.com</a>><br>
Cc: <a href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a><br>
Message-ID: <20120621154824.GA2280@grml><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
Hi!<br>
<br>
On 17:57 Thu 21 Jun , Vijay Chauhan wrote:<br>
> Hello,<br>
><br>
> I am newbie.<br>
> It has been said "kernel memory is not pageable"<br>
> What does it mean? There is no concept of kernel virtual address?<br>
><br>
> Any simple explanation will help me to udnerstand.<br>
<br>
The right term is actually "kernel memory is not swappable". Swapping means<br>
writing inactive memory to disk and then using it for something else. Kernel<br>
memory not being swappable is a design decicion made in the early linux days.<br>
Operating systems which swap kernel memory need to isolate everything which<br>
should not be swappd out (e.g. things needed for swap-in, realtime stuff,<br>
security sensitive data, ...). This is quite a bit of work. I also guess it is<br>
pretty pointless nowadays. Installed memory and is getting so huge that virtual<br>
memory developers have a hard time trying to keep cpu-usage overhead for<br>
swapping user space memory low.<br>
<br>
> There is no concept of kernel virtual address?<br>
<br>
Kernel memory uses virtual addresses as well. However, these the entire system<br>
memory is continuously mapped somewhere in the virtual address space. The<br>
drawback is that fragmentation turns allocation of large continuous memory<br>
regions into a game of luck.<br>
<br>
There is also an virtual address area (vmalloc) which is used to dynamically<br>
map multiple scattered pages to a continuous region. But this is rather slow<br>
and rarely used.<br>
<br>
You might want to take a look at: <a href="http://lwn.net/Kernel/LDD3/" target="_blank">http://lwn.net/Kernel/LDD3/</a><br>
<br>
-Michi<br>
--<br>
programing a layer 3+4 network protocol for mesh networks<br>
see <a href="http://michaelblizek.twilightparadox.com" target="_blank">http://michaelblizek.twilightparadox.com</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br>
<br>
End of Kernelnewbies Digest, Vol 19, Issue 43<br>
*********************************************<br>
</blockquote></div><br>