general_protection result to die

2013-02-26 Thread horseriver
hi;
  
 does general_protection trap necessarily result to die ?
 
  when executing this instruction : mov(%eax),%gs  ,$ip turns to be 
general_protection.  
  
  then it comes to debug()

  I have no clue for what has happend leads kernel to  go here . it denotes 
what?
 
  Are there some adices here?
  
thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: relocatable modules' symbols

2013-02-24 Thread horseriver
On Sun, Feb 24, 2013 at 04:00:37PM +0700, Mulyadi Santosa wrote:
 On Sat, Feb 23, 2013 at 6:45 AM, horseriver horseriv...@gmail.com wrote:
  hi:
 
I have built vmlinux at the top dir of kernel source ,then I use objdump 
  to look into
its section information.I find the statup_32 which is the start routine 
  of kernel ,
locats at 0xc010. I know the 0x10 is the defined address for 
  locating
protect-mode code .But which I can not understand is the 0xc prefix 
  .where does it come from?
 
 If my guess is right, that's because kernel mode code start at
 0xc00 a.k.a a bit above 3 GiB on x86 32 bit machine

  I have find this answer .
  It is defined in lds script file . 

here is the code :
  SECTIONS
  {
  . = 0xC000 + 0x10;
  /* read-only */
  _text = .;/* Text and read-only data */
 
 
  why use 0xC000 as its start ? why not  just  use 0x10 only ?
  if use 0xC000,every linked symbole will be prefixed by 0xc , what is the 
purpose ?

thanks!



-- 
 regards,
 
 Mulyadi Santosa
 Freelance Linux trainer and consultant
 
 blog: the-hydra.blogspot.com
 training: mulyaditraining.blogspot.com

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to receive msgs in a channel?

2013-02-24 Thread horseriver
On Sun, Feb 24, 2013 at 11:47:50AM +, Mark Cunningham wrote:
 Just type and press enter. By default it goes to the room not one person.
 
  I do as you say.
  after I type enter , it said: Cannot send to channel
  I am join as a guest .does this matter?
  

 Mark
 
 On Sun, Feb 24, 2013 at 2:02 AM, horseriver horseriv...@gmail.com wrote:
 
 
   I can see a list of users in that room ,but receive none msgs for a long 
  time .
   how to send message to this room ?not just to one member.
 
  thanks!
 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


relocatable modules' symbols

2013-02-23 Thread horseriver
hi:

  I have built vmlinux at the top dir of kernel source ,then I use objdump to 
look into
  its section information.I find the statup_32 which is the start routine of 
kernel ,
  locats at 0xc010. I know the 0x10 is the defined address for locating 
  protect-mode code .But which I can not understand is the 0xc prefix .where 
does it come from?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


setup code

2013-02-22 Thread horseriver
hi 

  I am confused on booting from grub's rescue mode .

  As we know ,before the kernel start ,the setup code, which is from setup.S 
,will be  executed at front.
  If boot from rescue mode , will grub also load setup code and execute it ? or 
grub execute its own code doing 
  the same work as setup ? then jump to kernel-start directly?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


gdtr value

2013-02-18 Thread horseriver
hi:)

  The gdtr reg saves the base address of gdt , whether is this address a linear 
address or phisical address ?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


exception before start_idt

2013-02-14 Thread horseriver
hi:)

i am debuging my kernel .
Before the idt_setup of protect-mode , Is it normal that one page_fault 
exception occures?

As I step into this  instruction : lss stack_start,%esp , vm fire an 
page_fault exception,
But at the intr vector check step, as the intr-table has not been setup . 
so it gives this :

 interrupt(): vector must be within IDT table limits, IDT.limit 
= 0x0.

How to resolve this issure?
thanks!


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: MAX limit of file descriptor

2013-02-10 Thread horseriver


 thanks!

 Actually , my question comes from network performance ,I want to know ,in per 
second ,the 
 maximum of tcp connections that can be dealed with by my server.
 
 How can I do the test and calculate the connection  number , Is it possible 
that my server 
 can deal with 10k tcp connections per second?

 what is the relationship between this and throughput rate?

 Is there document that tells the best optimization of this ?
 




___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


MAX limit of file descriptor

2013-02-09 Thread horseriver
hi:)

   In one process ,what is the max number of opening file descriptor ?
   Can it be set to infinite ?
  
   In network programing ,what is the essential for  the maximum of connections 
   dealed per second 

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


hd controller

2013-02-07 Thread horseriver
hi:)

   I am curious about how hd controller work .
   When user am reaing/writing hd ,it was implemented by sending command
   to hd controller's special port.Then ,how does the controller know
   a new command has received?

   In this procedure , what work does the hd driver do ?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: hard disk dirver

2013-02-06 Thread horseriver
On Wed, Feb 06, 2013 at 02:35:47AM -0500, valdis.kletni...@vt.edu wrote:
 On Wed, 06 Feb 2013 05:37:41 +0800, horseriver said:
After grub load kernel and initrd , it get around root filesystem 
  mounting ,
but failed with no finding root device ,from which kernel and initrd have 
  been
located .
 
ls /dev/ ;  there is no disk device node  .
 
Why?
 
 Any number of possible reasons, anything from an improperly configured
 kernel, to a misbuilt initrd, to a root= parameter that points 

  root = ?   You mean the aasignment at grub command line  ?

  thanks!





___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: hard disk dirver

2013-02-06 Thread horseriver
hi:)

   I have a newbie question about hard ware.
   At booting stage,kernel need to detect the hard device before mount it,
   does this work  need pci's surport?

   At loading stage ,boot loader need to move binaries from hard disk partition
   to ram,does this work need pci's surport?

thanks! 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


When does the /dev/sda1 node comes into being ?

2013-02-05 Thread horseriver
hi:)

  During booting period .every device will have a node at /dev/ folder.
  what is the detail of ths procedure?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: hard disk dirver

2013-02-05 Thread horseriver
 
  Thanks for your reply!

  After grub load kernel and initrd , it get around root filesystem mounting ,
  but failed with no finding root device ,from which kernel and initrd have 
been 
  located .
  
  ls /dev/ ;  there is no disk device node  .  

  Why?  


  

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


print log

2013-02-04 Thread horseriver
hi:)

   When kernel booting,there are a serial log printed on the screen,
   like this:  Initial network ...
   can I redirect these logs into a logfile?How can I do ?

Thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: print log

2013-02-04 Thread horseriver
On Mon, Feb 04, 2013 at 09:41:51AM +0100, Grzegorz Dwornicki wrote:
 1. Look in /var/log for dmesg, kernel.log or kmsg. These files cn be
 created by syslog and one of them might contain this information.
 
 2. Use dmesg command and grep it like this: dmesg | grep Initial Network
  myfile.txt

   Thanks!
   If I booting from bochs ,can I redirect these logs to the host OS? 
  

 4 lut 2013 09:25, horseriver horseriv...@gmail.com napisał(a):
 
  hi:)
 
 When kernel booting,there are a serial log printed on the screen,
 like this:  Initial network ...
 can I redirect these logs into a logfile?How can I do ?
 
  Thanks!
 
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 

 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: open image file

2013-02-04 Thread horseriver
hi:)

  I have a image file ,after I input this command:
  
  **
  sh losetup /dev/loop0 xx.img 
  sh  mount -t tmpfs /dev/loop0 /mnt 

  **


 I find no content under /mnt ,But this image file contains a bootloader.
 What is the reason ? How can I check out the file tree structure  of this 
image ?

thanks!


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: open image file

2013-02-04 Thread horseriver
hi:

  It is not a cpio archive , so that command can not work .
   
  its file system type is tmpfs.
  
thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


open image file

2013-02-03 Thread horseriver
hi:

  Is there mothod to look into a image file ?
  How can I know its filesystem?
  
  I have mounted my fd0 to /mnt with -t tmpfs ,but I find 
  nothing under /mnt.How can I touch the files in image?


thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


newbie's question

2013-02-03 Thread horseriver
hi:)

  I use fdisk to add a new partion on a image file. 
  I find the start of partion 1 is alwayes set to 63 by default.
  That means partion 1 start at 63*512=32256 byte.
  
  Here is my question: 

  1.  The region from 512th bytes to 32256th bytes will do what ?
  Why partion 1 don't follow MSR's location ?

  2.  The image's magic number is at which offset ?  

Thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Boot from hard disk?

2013-02-01 Thread horseriver
hi:)

   When boot from hard disk , is  GURB  at the MBR  a  must ?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to make a bootable hard disk image?

2013-01-31 Thread horseriver

Thanks!

 If I just only want to make a bootable hard disk image ,how can I do?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


How to make a bootable hard disk image?

2013-01-30 Thread horseriver
hi:)

   I want to boot kernel from hard disk image ,because i am using a virtual 
machine .
   How to make this bootable image   ? 
   After I  make it ,how do I put kernel Image into this image?


thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: GRUB question

2013-01-28 Thread horseriver
On Mon, Jan 28, 2013 at 12:05:35PM +0530, Mandeep Sandhu wrote:
 On Mon, Jan 28, 2013 at 2:07 AM, horseriver horseriv...@gmail.com wrote:
  hi:)
 
Is /boot/initrd.img a root filesystem? what is the filetype of it?
 
 Yes, it's a rootfs with minimal stuff needed for booting a workable
 system. why does this matter. doing 'file /boot/initrd.img' on my
 system shows its a gzip compressed file.
 
 
Can I put initrd.img in a floppy to boot system ?
 
 I think you can. Provided you have the floppy driver compiled into your 
 kernel.

  Thanks!

  Does this /boot/initrd.img file come out when building kernel ?   
  how to build it?

 
 CMIIW.
 
 -mandeep
 
 
 
  thanks!
 
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 
 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: GRUB question

2013-01-28 Thread horseriver
On Mon, Jan 28, 2013 at 03:07:13PM +0700, Mulyadi Santosa wrote:
 On Mon, Jan 28, 2013 at 5:10 AM, horseriver horseriv...@gmail.com wrote:
Does this /boot/initrd.img file come out when building kernel ?
how to build it?
 
 you use your distro supplied /sbin/mkinitrd or /sbin/mkinitramfs
  
  Thanks!

  I mean its content is from where ? 
  After /sbin/mkinitrd , what stuff is needed to  fill it ?  
 

 
 -- 
 regards,
 
 Mulyadi Santosa
 Freelance Linux trainer and consultant
 
 blog: the-hydra.blogspot.com
 training: mulyaditraining.blogspot.com
 
 ___
 Kernelnewbies mailing list
 Kernelnewbies@kernelnewbies.org
 http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


method to get backtrace of kernel function?

2013-01-28 Thread horseriver
hi:

   Is there method for getting bt of a kernel functions?
   
thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: GRUB question

2013-01-28 Thread horseriver
 
 Of course, an initrd on floppy is kind of silly, because you still need to
 find someplace else to fit the actual kernel - which hasn't fit on a floppy
 for quite some time.
  
  Do  we must  need initrd.img  to boot system ?

 
Does this /boot/initrd.img file come out when building kernel ?
how to build it?
 
 Your system should have either 'mkinitrd' or 'dracut' to build the
 initrd image. Some older systems will have 'mkinitramfs'.

  I know how to make a initrd image file , but put what data into it?


Thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


use of EXPORT_SYMBOL()

2013-01-28 Thread horseriver
hi:)

   In kernel code ,what is the use of EXPORT_SYMBOL()?
   Does it export a function to user application ,
   so this function can be used in user application ?


thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


GRUB question

2013-01-27 Thread horseriver
hi:)

  Is /boot/initrd.img a root filesystem? what is the filetype of it?

  Can I put initrd.img in a floppy to boot system ?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


How to know the default mail delivery agent ?

2013-01-25 Thread horseriver
hi:
  
  I have to know the default mail delivery agent on my system to configure mail 
client.
  Is there mothod?

  
  How  mail delivery agent work for receiving mails?

thanks! 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


question on debug

2013-01-22 Thread horseriver
hi:

   I am debuging kernel with gdb , when it comes into a page_fault exception 
,how 
   to get to know how does that address come out ? 
   It is the same to ask : which code is using that address , causing the 
page_fault exception?


thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: what is the difference between the two command?

2013-01-21 Thread horseriver
On Sun, Jan 20, 2013 at 09:07:15AM -0800, Ian Lance Taylor wrote:
 On Sat, Jan 19, 2013 at 1:30 PM, horseriver horseriv...@gmail.com wrote:
  On Sat, Jan 19, 2013 at 09:47:53PM -0800, Ian Lance Taylor wrote:
  On Fri, Jan 18, 2013 at 10:19 PM, horseriver horseriv...@gmail.com wrote:
   hi:
  
  Here are two command for producting one .so file :
  
  1. gcc  -nostdlib -Wl,-T,vsyscall.lds vsyscall-int80.o -o 
   vsyscall-int80.so
  
  2. ld  -T vsyscall.lds vsyscall-int80.o -o vsyscall-int80.so
 
  There is no substantive difference between these commands.  There are
  various minor differences that probably don't matter.  Use the -v
  option when invoking gcc to see precisely how it invokes the linker.
 
  In particular, invoking the linker via the gcc driver will cause some
  C++-specific operations to occur when needed, but since you aren't
  using C++ in this case they won't happen.
 
  Thanks!
 
 I have a weird problem here!
 
 When I type the 1  to make vsyscall-int80.so ,ld report error: Not 
  enough room for program headers, try linking with -N
 
 But,When I type 2  to make vsyscall-int80.so,it works successfully.
 
  What is the reason?
 
 I don't know.  Run the complete gcc command with the -v option and you
 will see precisely how it invokes the linker.

   gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' 
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs 
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-4.4 --enable-shared --enable-multiarch 
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib 
--without-included-gettext --enable-threads=posix 
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc 
--enable-targets=all --with-arch-32=i586 --with-tune=generic 
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu 
--target=i486-linux-gnu
Thread model: posix

which option make the two commands different? 

Thanks!

 
 Ian

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: why is this result ?

2013-01-19 Thread horseriver
On Sat, Jan 19, 2013 at 09:15:23AM +0100, Jędrzej Dudkiewicz wrote:
  Because it's not possible to have an object with nonzero size.  The
  address of every object must be unique, so they have to be separated by
  one byte anyway.
 
thanks!
Here I do not define a object of type A ,just do sizeof operation to a A 
  struct ,not a specified object.
So if I defined A a , does  sizeof(a) have the same mean with sizeof(A)  ?
what does the sizeof operator essentially?
 
 Yes, sizeof(a) and sizeof(A) are identical. I understand sizeof(expr)
 as tell me how many bytes I need to store result of expression expr
.
When a is stored in one bytes, what is the mean or use of that byte data?

 -- 
 Jędrzej Dudkiewicz
 
 I really hate this damn machine, I wish that they would sell it.
 It never does just what I want, but only what I tell it.

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Where this come out?

2013-01-19 Thread horseriver
hi:

  I am linking a .so from one .o file with my specified linker script.
  In this linker script file , I do not use SIZEOF_HEADERS,but ld still
  report this error :
  
  Not enough room for program headers, try linking with -N


  I really can not understand .
  Any advice is appreciated !

Thanks!  

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Where this come out?

2013-01-19 Thread horseriver
On Sat, Jan 19, 2013 at 10:53:26PM +0700, Mulyadi Santosa wrote:
 On Sat, Jan 19, 2013 at 12:19 PM, horseriver horseriv...@gmail.com wrote:
  hi:
 
I am linking a .so from one .o file with my specified linker script.
In this linker script file , I do not use SIZEOF_HEADERS,but ld still
report this error :
 
Not enough room for program headers, try linking with -N
 
 you linker script ... can that be written down here, please? we are
 not some sort of mind reader, you know?

 Here is the script :

 VSYSCALL_BASE = 0xe000;

SECTIONS
{
  . = VSYSCALL_BASE ;

  .hash   : { *(.hash) }:text
  .dynsym : { *(.dynsym) }
  .dynstr : { *(.dynstr) }
  .gnu.version: { *(.gnu.version) }
  .gnu.version_d  : { *(.gnu.version_d) }
  .gnu.version_r  : { *(.gnu.version_r) }

  /* This linker script is used both with -r and with -shared.
 For the layouts to match, we need to skip more than enough
 space for the dynamic symbol table et al.  If this amount
 is insufficient, ld -shared will barf.  Just increase it here.  */
  .  = 0x400;

  .text   : { *(.text) }:text =0x90909090

  .eh_frame_hdr   : { *(.eh_frame_hdr) }:text :eh_frame_hdr
  .eh_frame   : { KEEP (*(.eh_frame)) } :text
  .dynamic: { *(.dynamic) } :text :dynamic
  .useless: {
  *(.got.plt) *(.got)
  *(.data .data.* .gnu.linkonce.d.*)
  *(.dynbss)
  *(.bss .bss.* .gnu.linkonce.b.*)
  } :text
}

/*
 * We must supply the ELF program headers explicitly to get just one
 * PT_LOAD segment, and set the flags explicitly to make segments read-only.
 */
PHDRS
{
  text PT_LOAD FILEHDR PHDRS FLAGS(5); /* PF_R|PF_X */
  dynamic PT_DYNAMIC FLAGS(4); /* PF_R */
  eh_frame_hdr 0x6474e550; /* PT_GNU_EH_FRAME, but ld doesn't match the name */
}

/*
 * This controls what symbols we export from the DSO.
 */
VERSION
{
  LINUX_2.6 {
global:
__kernel_vsyscall;
__kernel_sigreturn;
__kernel_rt_sigreturn;

local: *;
  };
}

/* The ELF entry point can be used to set the AT_SYSINFO value.  */
ENTRY(__kernel_vsyscall);

Thanks!

 
 
 -- 
 regards,
 
 Mulyadi Santosa
 Freelance Linux trainer and consultant
 
 blog: the-hydra.blogspot.com
 training: mulyaditraining.blogspot.com

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: what is the difference between the two command?

2013-01-19 Thread horseriver
On Sat, Jan 19, 2013 at 09:47:53PM -0800, Ian Lance Taylor wrote:
 On Fri, Jan 18, 2013 at 10:19 PM, horseriver horseriv...@gmail.com wrote:
  hi:
 
 Here are two command for producting one .so file :
 
 1. gcc  -nostdlib -Wl,-T,vsyscall.lds vsyscall-int80.o -o 
  vsyscall-int80.so
 
 2. ld  -T vsyscall.lds vsyscall-int80.o -o vsyscall-int80.so
 
 There is no substantive difference between these commands.  There are
 various minor differences that probably don't matter.  Use the -v
 option when invoking gcc to see precisely how it invokes the linker.
 
 In particular, invoking the linker via the gcc driver will cause some
 C++-specific operations to occur when needed, but since you aren't
 using C++ in this case they won't happen.

Thanks!

   I have a weird problem here!
   
   When I type the 1  to make vsyscall-int80.so ,ld report error: Not enough 
room for program headers, try linking with -N
   
   But,When I type 2  to make vsyscall-int80.so,it works successfully.

What is the reason?

   gcc -v
   Using built-in specs.
   Target: i486-linux-gnu 
   Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.5-8' 
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs 
--enable-languages=c,c++,fortran,ob  jc,obj-c++ --prefix=/usr 
--program-suffix=-4.4 --enable-shared --enable-multiarch 
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib 
--without-includ  ed-gettext --enable-threads=posix 
--with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-  objc-gc 
--enable-targets=all --with-arch-32=i586 --with-tune=generic 
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu 
--target=i486-linux-gnu
  Thread model: posix
  gcc version 4.4.5 (Debian 4.4.5-8)
  
   
   


 
 Ian

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to wake_up the wait_queue of a socket?

2013-01-18 Thread horseriver
On Fri, Jan 18, 2013 at 10:18:19AM +0800, Peter Teoh wrote:
 essentially, when the packet arrive, it will be assigned to the correct
 process based on IP address + port matching, and then the corresponding
 process's blocked scheduling status will be changed to continue execution,
 so that when the scheduler next selection of runnable process will pick him
 out for continue execution.   The process will then pick his data up from
 the network queue.
 

  Thanks!

  If there is no event occured on one socket descriptor  , 
  will the poll operation on this socket descriptor be blocked ?   
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 
 
 
 
 -- 
 Regards,
 Peter Teoh

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: working of fork and exec

2013-01-18 Thread horseriver
In my opinion ,  fork and exec is based on independent  task environment for 
per process ,
which is corresponding to task_struct .

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


how to get outsated mail ?

2013-01-18 Thread horseriver
hi:
  If I subscribed a mail list at date x , how can I get those mail dated  
before x ?

  can I request maillist server to send those mail to my mail address ?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: how to get outsated mail ?

2013-01-18 Thread horseriver
On Fri, Jan 18, 2013 at 10:26:12PM -0800, Dave Hylands wrote:
 Hi,
 
 On Fri, Jan 18, 2013 at 10:53 AM, horseriver horseriv...@gmail.com wrote:
 
  hi:
If I subscribed a mail list at date x , how can I get those mail dated
  before x ?
 
can I request maillist server to send those mail to my mail address ?
 
 Archives are located here:
 http://lists.kernelnewbies.org/pipermail/kernelnewbies/
Thanks!
can I get these mail into my mail client?

 
 --
 Dave Hylands
 Shuswap, BC, Canada
 http://www.davehylands.com

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


socket state after accept() return

2013-01-18 Thread horseriver
hi:
  
  For one socket , which has been returned by accept() call  , does its sk_state
  is  assuredly  already  TCPF_ESTABLISHED ?  


thanks! 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


what is the function of do_softirq() ?

2013-01-16 Thread horseriver
hi:

   what is the function of do_softirq()?

   It is called by ksoftirqd() ,which is setup by :  kernel_thread(ksoftirqd, 
hcpu, CLONE_KERNEL) ;


thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Does driver wake_up a wait_queue on a socket file?

2013-01-16 Thread horseriver
hi:
  
  When an net IRQ on a socket reached,  does  the  driver  wake_up socket's   
wait_queue at once ?


thanks! 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


what is the function of tcp_prequeue ?

2013-01-16 Thread horseriver
hi:

  what is the function of tcp_prequeue ?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: How to wake_up the wait_queue of a socket?

2013-01-15 Thread horseriver
On Tue, Jan 15, 2013 at 12:25:10PM -0500, valdis.kletni...@vt.edu wrote:
 On Mon, 14 Jan 2013 17:50:03 +0800, horseriver said:
 
 When one datagram has reached , How to wake_up the wait_queue of that 
  socket ?
 
 Please clarify your question - I'm not sure which of the following you mean:
 
 1) How does the kernel wake up the waiting process when a datagram
 arrives?

  This is my mean !
  
  Thanks 


___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: what does this do ?

2013-01-14 Thread horseriver
On Sun, Jan 13, 2013 at 09:27:45PM -0800, Dave Hylands wrote:
 Hi,
 
 On Sun, Jan 13, 2013 at 11:29 AM, horseriver horseriv...@gmail.com wrote:
 
  hi:
 
In kernel code . some function is defined  by
  __attribute__((__section__(.initcall level .init)))
 
what does this do ?
 
 It puts the address of the function in a linker section named
 .initcallX.init where X is replaced by the level.
 
 These functions are called in order to initialize various subsystems and
 drivers during kernel bootup.

  Thanks!

  Another question:
  
  __attribute__((regparm(3)));  what does this do ?



 
 --
 Dave Hylands
 Shuswap, BC, Canada
 http://www.davehylands.com

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



Re: what does this do ?

2013-01-14 Thread horseriver
On Mon, Jan 14, 2013 at 07:20:46AM -0800, Ramesh.P wrote:
 Hi,
 
 
 On Sun, Jan 13, 2013 at 8:50 PM, horseriver horseriv...@gmail.com wrote:
 
  On Sun, Jan 13, 2013 at 09:27:45PM -0800, Dave Hylands wrote:
   Hi,
  
   On Sun, Jan 13, 2013 at 11:29 AM, horseriver horseriv...@gmail.com
  wrote:
   
hi:
   
  In kernel code . some function is defined  by
__attribute__((__section__(.initcall level .init)))
   
  what does this do ?
  
   It puts the address of the function in a linker section named
   .initcallX.init where X is replaced by the level.
  
   These functions are called in order to initialize various subsystems and
   drivers during kernel bootup.
 
Thanks!
 
Another question:
 
__attribute__((regparm(3)));  what does this do ?
 

  Thank You!

   what the use of doing like this ?  why  tell gcc  to  pass param like this ?

 
 
 It causes the compiler to pass the argument (3 in this case) to be passed
 in registers (like EAX, ECX and EDX) instead of stack.
 
 Thanks,
 Ramesh
 
 
 
 
 
   --
   Dave Hylands
   Shuswap, BC, Canada
   http://www.davehylands.com
 
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: what does this do ?

2013-01-14 Thread horseriver
On Mon, Jan 14, 2013 at 02:44:11PM +, Anuz Pratap Singh Tomar wrote:
 On Mon, Jan 14, 2013 at 4:50 AM, horseriver horseriv...@gmail.com wrote:
 
  On Sun, Jan 13, 2013 at 09:27:45PM -0800, Dave Hylands wrote:
   Hi,
  
   On Sun, Jan 13, 2013 at 11:29 AM, horseriver horseriv...@gmail.com
  wrote:
   
hi:
   
  In kernel code . some function is defined  by
__attribute__((__section__(.initcall level .init)))
   
  what does this do ?
  
   It puts the address of the function in a linker section named
   .initcallX.init where X is replaced by the level.
  
   These functions are called in order to initialize various subsystems and
   drivers during kernel bootup.
 
Thanks!
 
Another question:
 
__attribute__((regparm(3)));  what does this do ?
 
 
 
  A simple google search should have answered this
 http://ohse.de/uwe/articles/gcc-attributes.html
 
 Synopsis
 
 regparm (NUMBER) Found in versions: 2.7-3.4 Description:
 
  Functions that take a variable number of
  arguments will continue to be passed all of their arguments on the
  stack.
 
  what does this mean?
 
 
 
   --
   Dave Hylands
   Shuswap, BC, Canada
   http://www.davehylands.com
 
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 
 
 
 
 -- 
 Thank you
 Warm Regards
 Anuz

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: where is the build rule for kernel's subdirs?

2013-01-14 Thread horseriver
On Mon, Jan 14, 2013 at 08:32:57AM -0800, Randy Dunlap wrote:
 On 01/13/13 20:33, horseriver wrote:
  hi:
  
 How does   kbuild   build objects for subdirs of kernel source ? 
 
 It goes into subdirs recursively.
 
 
 From top-level Makefile:
 
 # Objects we will link into vmlinux / subdirs we need to visit
 init-y:= init/
 drivers-y := drivers/ sound/ firmware/
 net-y := net/
 libs-y:= lib/
 core-y:= usr/
 
 
 Then each subdir's Makefile has its own rules.

  I do not think so !

  every makefile in these subdirs only have defined obj files ,but not 
contained build rules .

  Thanks!
 
 -- 
 ~Randy

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: build rules for subdirs in kernel source

2013-01-14 Thread horseriver
On Mon, Jan 14, 2013 at 10:44:28PM +0530, Vivek Gautam wrote:
 Hi,
 
 
 On Mon, Jan 14, 2013 at 10:36 AM, horseriver horseriv...@gmail.com wrote:
  hi:
 
 How to build targets for every subdirs of kernel ?
 
 
 Is it the Makefile you want to look for.
 Make is the same linux utility to build a project consisting of multiple 
 files.
 
 for example :  drivers/*
 
 So we club the directories / subdirectories or files in the Makefile
 in order to compile (build them)
 Something like this:
 
 http://lxr.free-electrons.com/source/drivers/Makefile
 
 I do not find the rules for build subdir's target
 
 
 Individual sub directories or files may be built based on some kernel
 config defined in Kconfig
 
 
  thanks!
 
 Hope this explains some of your doubts.

  Yeah!:)

  What is the use of scripts/makefile.build ?

  Thanks!

 
 --
 Thanks  Regards
 Vivek

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


How to wake_up the wait_queue of a socket?

2013-01-14 Thread horseriver
hi:

   When one datagram has reached , How to wake_up the wait_queue of that socket 
?

Thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


what mail list can discuss linux network details?

2013-01-13 Thread horseriver
hi:

  Is there some mail list for discussion of network details?


thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


what does this do ?

2013-01-13 Thread horseriver
hi:

  In kernel code . some function is defined  by  
__attribute__((__section__(.initcall level .init)))

  what does this do ?


thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: what does this do ?

2013-01-13 Thread horseriver
On Sun, Jan 13, 2013 at 09:27:45PM -0800, Dave Hylands wrote:
 Hi,
 
 On Sun, Jan 13, 2013 at 11:29 AM, horseriver horseriv...@gmail.com wrote:
 
  hi:
 
In kernel code . some function is defined  by
  __attribute__((__section__(.initcall level .init)))
 
what does this do ?
 
 It puts the address of the function in a linker section named
 .initcallX.init where X is replaced by the level.

   why .initcall and level do not connect  together with ## ?
   As I know , precompiler use ## to connect two strings


  Thanks!   
 
 These functions are called in order to initialize various subsystems and
 drivers during kernel bootup.
 
 --
 Dave Hylands
 Shuswap, BC, Canada
 http://www.davehylands.com

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: compile linux kernel 2.6.0 failed

2013-01-13 Thread horseriver
On Wed, Jan 02, 2013 at 08:57:04AM -0800, Ian Lance Taylor wrote:
 On Wed, Jan 2, 2013 at 1:16 AM, horseriver horseriv...@gmail.com wrote:
 
I am compiling 2.6.0 kernel with gcc 4.4.5 and link with ld 2.20 version.
 
when linking .so , output this error :
 
/usr/bin/ld: arch/i386/kernel/vsyscall-int80.so: Not enough room for 
  program headers, try linking with -N
 
does gcc generate the program headers ? why not enough room for it ?
 
I guess it is because gcc version is not compitable with ld version
 
is there some advice ?
 


 It is more likely to  be an issue of compatibility between the kernel's 
 linker script and
 the version of ld that you are using.

you mean the vmlinux.lds which is in the arch/i386/kernel directory  , does not 
compitable with /usr/ld which I'm using ?


thanks!


 
 I don't know why this fails for you, but since GNU binutils 2.23 has
 been released, I would recommend trying that.  Alternatively, since
 2.6.0 is relatively old, trying using an older version of the GNU
 binutils.
 
 Ian

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


for a socket file , what does file-f_op-poll() do ?

2013-01-11 Thread horseriver
hi:

  for a socket file point , what will this function do ?

  file-f_op-poll();   ///poll is declared  in the file-operations struct .

  but I do not find this function's definition .

  Is there some advice?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


where is the build rules for drivers/* ?

2013-01-10 Thread horseriver
hi:

  when building kernel , kbuild will work into every subdirs .
 
  for example:  drivers/acpi directory ,there is a makefile , which construct 
all  object files 
  ,but where is the building rules for these file? how kbuild build them out ?

  Is script/makefile.build doing this work?
  

thanks!
 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: internel implemention of file operation

2013-01-10 Thread horseriver
hi:

  these two wayes of operating one file :

  1.use open/write interface call .

  2.mmap this file into memory , then access this memory area and do r/w . 

  what is the essential difference between this teo wayes?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: internel implemention of file operation

2013-01-10 Thread horseriver
On Fri, Jan 11, 2013 at 12:39:26PM +0530, Rajat Sharma wrote:

 Default read/write inerfaces are better suited for sequential read/write
 within your program. Although you can seek to any location within the file,
 you still have overhead to issue system calls to get data. However mmap
 allows you to map a section of file into program address space. 

  Default read/write inerfaces does not move file's data to process address 
space ?

  when  r/w a file descript which returnd by open() , how do the file data move 
from one place to another place ?

  For each time the write function being  called  , will kernel  call 
filesystem's driver's write  to respond  ??
  In my opinion,kernel will passed a  buffer's head address  which is passed 
form user-layer into driver,then driver will fill this buffer with file's
  data which is got by filesystem's read operation ?

  Am I right?   
  
  Thanks! 
 
 
 -Rajat
 
 
 On Fri, Jan 11, 2013 at 2:44 AM, horseriver horseriv...@gmail.com wrote:
 
  hi:
 
these two wayes of operating one file :
 
1.use open/write interface call .
 
2.mmap this file into memory , then access this memory area and do r/w .
 
what is the essential difference between this teo wayes?
 
  thanks!
 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: what is the difference between poll and epoll ?

2013-01-10 Thread horseriver
On Fri, Jan 11, 2013 at 07:36:04AM +0800, Peter Teoh wrote:
 Read this (classic answer):
 
 http://stackoverflow.com/questions/4093185/whats-the-difference-between-epoll-poll-threadpool
 
 and from below:
 
 http://stackoverflow.com/questions/4039832/select-vs-poll-vs-epoll
 
 Which will bring you to:
 
 http://daniel.haxx.se/docs/poll-vs-select.html
 and
 http://www.kegel.com/c10k.html
 
 and the three are explained in depth here:
 
 http://www.makelinux.net/ldd3/chp-6-sect-3
 
 The difference are also explained here:
 
 http://www.winddisk.com/2012/03/28/epoll%E4%B8%8Eselectpoll%E7%9A%84%E5%8C%BA%E5%88%AB/
 
 and comes with a pictorial diagram as u have requested.

Thanks! Very Great!

 
 On Tue, Jan 8, 2013 at 4:35 AM, horseriver horseriv...@gmail.com wrote:
 
  hi:
 
 I know epoll is event triger model ,but I do not know internel
 
 surpport for it .
 
 is there some illustration for  epoll's frame or internel
  implementation?
 
  thanks!
 
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 
 
 
 
 -- 
 Regards,
 Peter Teoh

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: /usr/ld Not enough room for program headers

2013-01-09 Thread horseriver
On Wed, Jan 09, 2013 at 08:51:36PM +0800, Peter Teoh wrote:
 On Wed, Jan 9, 2013 at 6:36 AM, horseriver horseriv...@gmail.com wrote:
 
  On Wed, Jan 09, 2013 at 01:28:12PM +0800, Peter Teoh wrote:
   On Sun, Jan 6, 2013 at 11:17 AM, horseriver horseriv...@gmail.com
  wrote:
  
  VSYSCALL_BASE = 0xe000;
 
  SECTIONS
  {
. = VSYSCALL_BASE ;
 
.hash   : { *(.hash) }:text
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.gnu.version: { *(.gnu.version) }
.gnu.version_d  : { *(.gnu.version_d) }
.gnu.version_r  : { *(.gnu.version_r) }
 
 
 
 I suspect something wrong with VSYSCALL_BASE + value here.
 
 look at this:
 
 http://marcbug.scc-dc.com/svn/repository/trunk/linuxkernel/linux-2.6.16-mcemu/arch/x86_64/ia32/vsyscall.lds
 
 and doing a diff with your ld script, there is not much diff, except for
 the VSYSCALL_BASE + SIZEOF_HEADER

thanks!

I do not understand what this error /usr/ld Not enough room for program 
headers really mean ?

if I add SIZEOF_HEADER , this error is still reproted ,

when ld link files , does it only need a ld-script file ? or more than one 
ld-script files ?


 

 
 portion.
 
 Read here to understand how SIZEOF_HEADER is calculated:
 
 http://www.math.utah.edu/docs/info/ld_3.html#SEC13
 
 Not sure why do u want to shift the whole section by SIZEOF_HEADER down in
 bytes?
 
 -- 
 Regards,
 Peter Teoh

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


what is the difference between poll and epoll ?

2013-01-07 Thread horseriver
hi:

   I know epoll is event triger model ,but I do not know internel 

   surpport for it .

   is there some illustration for  epoll's frame or internel implementation?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: /usr/ld Not enough room for program headers

2013-01-06 Thread horseriver
On Fri, Jan 04, 2013 at 11:34:24AM +0400, Игорь Пашев wrote:
 2013/1/4 horseriver horseriv...@gmail.com
 
  Not enough room for program headers
 



 Try to search the Web for this. E. g.:
 http://lists.gnu.org/archive/html/bug-gnu-utils/2002-08/msg00176.html

thanks!

in my compile option. I have specifiedmy ld-script file ,and there is no 
SIZEOF_HEADER in that file ,


but where this error come from ?




___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: what is SYSCALL in arch/i386/kernel/Makefile

2013-01-06 Thread horseriver
On Sun, Jan 06, 2013 at 01:01:47PM +0100, richard -rw- weinberger wrote:

 On Sat, Jan 5, 2013 at 6:12 PM, horseriver horseriv...@gmail.com wrote:
  hi:
 
   In arch/i386/kernel/Makefile , there is a SYSCALL , what is it ?
 
 Nobody can help you without providing more information.
 Current kernels don't have arch/i386/kernel/Makefile.
 i386 and x86_64 got merged a long time ago
 

thanks !

when make in my arch/i386/kernel dir , gcc need to build a .so file ,
 it calls ld to link ,but failed with this error :

 not enough room for program headers ,I know it is due to SIZEOF_HEADER 
buidin function,

 but I do not know how to fix it

 ld has been told to link with specilized ld-script ,which not use 
SIZEOF_HEADER.

 so I feel it is confusing

 appreciate for helps!
 -- 
 Thanks,
 //richard

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


what is SYSCALL in arch/i386/kernel/Makefile

2013-01-05 Thread horseriver
hi:

 In arch/i386/kernel/Makefile , there is a SYSCALL , what is it ?

thank!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


question about compilation in directory linux-2.6.0\arch\i386\kernel

2013-01-04 Thread horseriver
hi:


 in the makefile ,I can not find link options for vsyscall-int80.so,

 I want to add a option for ld 

 how can I do this  ?

 thank!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


what is SYSCALL in kernel makefile

2013-01-04 Thread horseriver
hi:

  In arch/i386/kernel/Mkaefile :

  quiet_cmd_syscall = SYSCALL $@
 
  what does this mean ?
 
  I can not fins SYSCALL's definition

  any advice is appreciate!


thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: internel implemention of file operation

2013-01-03 Thread horseriver
On Thu, Jan 03, 2013 at 01:16:06PM +0530, Rajat Sharma wrote:

  will it be maped with vm_area struct ?
 Yes if it is accessed via mmap system call.

you know that , in the struct vm_area_struct,there is a struct 
vm_operations_struct * vm_ops;

in this vm_operations_struct , there are open/close functions ,  are there 
necessary  relations between file 

operations and this struct ?

thanks!

 
  what is the relation between page-cache and file operation?
 file operations for data access like read/write will look into page-cache
 first before going to disk.
 
 -Rajat
 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


compile linux kernel 2.6.0 failed

2013-01-02 Thread horseriver
hi:
   I am compiling 2.6.0 kernel with gcc 4.4.5 and link with ld 2.20 version.

my host os is 2.6.32 kernel .

   when linking .so , output this error :

   /usr/bin/ld: arch/i386/kernel/vsyscall-int80.so: Not enough room for program 
headers, try linking with -N

   does gcc generate the program headers ? why not enough room for it ?

   I guess it is because gcc version is not compitable with ld version

   is there some advice ?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


internel implemention of file operation

2013-01-02 Thread horseriver
hi:

  when one file is opened , does its  data be put into memory ? and all 
operation on this file

  will be implemented by operation on its mapping memory area ?

thanks!

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: internel implemention of file operation

2013-01-02 Thread horseriver
On Thu, Jan 03, 2013 at 12:48:01PM +0530, Rajat Sharma wrote:
 Never heard of page-cache?

will it be maped with vm_area struct ?
what is the relation between page-cache and file operation?

thanks!

 
 
 On Thu, Jan 3, 2013 at 12:29 PM, horseriver horseriv...@gmail.com wrote:
 
  hi:
 
when one file is opened , does its  data be put into memory ? and all
  operation on this file
 
will be implemented by operation on its mapping memory area ?
 
  thanks!
 
  ___
  Kernelnewbies mailing list
  Kernelnewbies@kernelnewbies.org
  http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
 

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies