Re: Where does kernel store per task file position?
Correct :) On Wed, Jan 30, 2013 at 12:01 PM, Pranay Kumar Srivastava < pranay.shrivast...@hcl.com> wrote: > > > > -Original Message- > > From: Rajat Sharma [mailto:fs.ra...@gmail.com] > > Sent: Wednesday, January 30, 2013 11:16 AM > > To: Pranay Kumar Srivastava > > Cc: kernelnewbies@kernelnewbies.org > > Subject: Re: Where does kernel store per task file position? > > > > > I'm still not able to figure out where exactly is the position of file > stored per > > task_struct. > > struct file * itself is per process (task_struct) so file->f_pos is file > position per > > process, if thats what you are looking for. I hope you haven't assumed > that > > struct file itself is unique for a file, i.e. per inode? Then that > assumption is > > wrong. > > -Rajat > > [Pranay Kumar Srivastava] That really was a stupid question, it says right > there get_empty_filp() in do_sys_open. For forks the inherited file have > common struct file [Correct?] but for the files opened after fork in > child/parent will not have shared struct file[Correct?]. So the same > dentry can be pointed to by multiple struct file[Correct?] that's why > there's an increment of dentry while doing lookup[Correct?]. > > Thanks a lot! > > > > On Tue, Jan 29, 2013 at 6:38 PM, Pranay Kumar Srivastava > > wrote: > > Hi Everyone, > > > > I was trying to find out where does Linux store per process file > position? > > Since struct file is allocated once when the file is first opened > > (get_empty_filp() via do_sys_open) .I looked at these, > > > > Copy_process--->copy_files-->dup_fd it seemed to allocate only (struct > > file*) > > > > struct files_struct , but I couldn't find any field that is actually > being used to > > store the file position. > > > > > > I'm still not able to figure out where exactly is the position of file > stored per > > task_struct. Secondly even if this was being saved does the kernel > changes > > f_pos of struct file whenever a (read/write) is done? I don't that > happens > > [Correct?]. > > > > Regards, > > Pranay Kumar Srivastava > > > > > > ::DISCLAIMER:: > > > -- > > -- > > > > The contents of this e-mail and any attachment(s) are confidential and > > intended for the named recipient(s) only. > > E-mail transmission is not guaranteed to be secure or error-free as > > information could be intercepted, corrupted, lost, destroyed, arrive > late or > > incomplete, or may contain viruses in transmission. The e mail and its > > contents (with or without referred errors) shall therefore not attach any > > liability on the originator or HCL or its affiliates. > > Views or opinions, if any, presented in this email are solely those of > the > > author and may not necessarily reflect the views or opinions of HCL or > its > > affiliates. Any form of reproduction, dissemination, copying, disclosure, > > modification, distribution and / or publication of this message without > the > > prior written consent of authorized representative of HCL is strictly > > prohibited. If you have received this email in error please delete it > and notify > > the sender immediately. > > Before opening any email and/or attachments, please check them for > viruses > > and other defects. > > > > > -- > > -- > > > > > > ___ > > 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: Where does kernel store per task file position?
> -Original Message- > From: Rajat Sharma [mailto:fs.ra...@gmail.com] > Sent: Wednesday, January 30, 2013 11:16 AM > To: Pranay Kumar Srivastava > Cc: kernelnewbies@kernelnewbies.org > Subject: Re: Where does kernel store per task file position? > > > I'm still not able to figure out where exactly is the position of file > > stored per > task_struct. > struct file * itself is per process (task_struct) so file->f_pos is file > position per > process, if thats what you are looking for. I hope you haven't assumed that > struct file itself is unique for a file, i.e. per inode? Then that assumption > is > wrong. > -Rajat [Pranay Kumar Srivastava] That really was a stupid question, it says right there get_empty_filp() in do_sys_open. For forks the inherited file have common struct file [Correct?] but for the files opened after fork in child/parent will not have shared struct file[Correct?]. So the same dentry can be pointed to by multiple struct file[Correct?] that's why there's an increment of dentry while doing lookup[Correct?]. Thanks a lot! > > On Tue, Jan 29, 2013 at 6:38 PM, Pranay Kumar Srivastava > wrote: > Hi Everyone, > > I was trying to find out where does Linux store per process file position? > Since struct file is allocated once when the file is first opened > (get_empty_filp() via do_sys_open) .I looked at these, > > Copy_process--->copy_files-->dup_fd it seemed to allocate only (struct > file*) > > struct files_struct , but I couldn't find any field that is actually being > used to > store the file position. > > > I'm still not able to figure out where exactly is the position of file stored > per > task_struct. Secondly even if this was being saved does the kernel changes > f_pos of struct file whenever a (read/write) is done? I don't that happens > [Correct?]. > > Regards, > Pranay Kumar Srivastava > > > ::DISCLAIMER:: > -- > -- > > The contents of this e-mail and any attachment(s) are confidential and > intended for the named recipient(s) only. > E-mail transmission is not guaranteed to be secure or error-free as > information could be intercepted, corrupted, lost, destroyed, arrive late or > incomplete, or may contain viruses in transmission. The e mail and its > contents (with or without referred errors) shall therefore not attach any > liability on the originator or HCL or its affiliates. > Views or opinions, if any, presented in this email are solely those of the > author and may not necessarily reflect the views or opinions of HCL or its > affiliates. Any form of reproduction, dissemination, copying, disclosure, > modification, distribution and / or publication of this message without the > prior written consent of authorized representative of HCL is strictly > prohibited. If you have received this email in error please delete it and > notify > the sender immediately. > Before opening any email and/or attachments, please check them for viruses > and other defects. > > -- > -- > > > ___ > 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: Where does kernel store per task file position?
> I'm still not able to figure out where exactly is the position of file stored per task_struct. struct file * itself is per process (task_struct) so file->f_pos is file position per process, if thats what you are looking for. I hope you haven't assumed that struct file itself is unique for a file, i.e. per inode? Then that assumption is wrong. -Rajat On Tue, Jan 29, 2013 at 6:38 PM, Pranay Kumar Srivastava < pranay.shrivast...@hcl.com> wrote: > Hi Everyone, > > I was trying to find out where does Linux store per process file position? > Since struct file is allocated once when the file is first opened > (get_empty_filp() via do_sys_open) .I looked at these, > > Copy_process--->copy_files-->dup_fd it seemed to allocate only (struct > file*) > > struct files_struct , but I couldn't find any field that is actually being > used to store the file position. > > > I'm still not able to figure out where exactly is the position of file > stored per task_struct. Secondly even if this was being saved does the > kernel changes f_pos of struct file whenever a (read/write) is done? I > don't that happens [Correct?]. > > Regards, > Pranay Kumar Srivastava > > > ::DISCLAIMER:: > > > > The contents of this e-mail and any attachment(s) are confidential and > intended for the named recipient(s) only. > E-mail transmission is not guaranteed to be secure or error-free as > information could be intercepted, corrupted, > lost, destroyed, arrive late or incomplete, or may contain viruses in > transmission. The e mail and its contents > (with or without referred errors) shall therefore not attach any liability > on the originator or HCL or its affiliates. > Views or opinions, if any, presented in this email are solely those of the > author and may not necessarily reflect the > views or opinions of HCL or its affiliates. Any form of reproduction, > dissemination, copying, disclosure, modification, > distribution and / or publication of this message without the prior > written consent of authorized representative of > HCL is strictly prohibited. If you have received this email in error > please delete it and notify the sender immediately. > Before opening any email and/or attachments, please check them for viruses > and other defects. > > > > > > ___ > 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: guides to board files -> device-tree and Android -> mainline?
On Tue, 2013-01-29 at 15:51 +0100, Thomas Petazzoni wrote: > No, there is no automated tool, because it is not possible to do that > automatically. The device drivers used by your board must have a Device > Tree binding, and writing the Device Tree source cannot directly be > done from the C board file. It requires human knowledge and > intervention. I see, is there at least a guide for the conversion? > Could you be more specific about the platform you would look to convert > to the Device Tree? Where is the existing source code? Many devices with an ARM SoC and or an Android kernel aren't fully supported by mainline. The devices that I own in this situation are the OpenMoko FreeRunner (gta02) and the Samsung Galaxy S (galaxysmtd). gta02: git://git.openmoko.org/git/kernel.git git://github.com/shr-distribution/linux.git galaxysmtd (and a bunch of other devices): git://gitorious.org/replicant/kernel_samsung_aries.git -- bye, pabs http://bonedaddy.net/pabs3/ signature.asc Description: This is a digitally signed message part ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: thread concurrent file operation
On Tue, 29 Jan 2013 18:25:19 +0100, Karaoui mohamed lamine said: > This function is supposed to return the file reference, does do the locking? Refcounting only, no locking provided by fdget. > It seems that i can't find the lock instruction( with all those rcu > instructions, i am little lost), can you guide me throught ? Because it isn't there. Concurrent writes can happen - that's why lockf() exists, so that multiple programs that want to scribble on the same file can do their locking. pgp1kBIaAjp4k.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: thread concurrent file operation
2013/1/29 Tobias Boege > On Tue, 29 Jan 2013, Karaoui mohamed lamine wrote: > > Hello, > > > > I was looking at how a syscall read/write was done, and i found this : > > > > > >loff_t pos = file_pos_read(f.file); > >ret = vfs_read(f.file, buf, count, &pos); > >file_pos_write(f.file, pos); > >fdput(f); > >... > > > > My questions are : > > > > Where did the locking go? I would have imaginated something like : > > > > > >*lock(f);* > >loff_t pos = file_pos_read(f.file); > >ret = vfs_read(f.file, buf, count, &pos); > >file_pos_write(f.file, pos); > >fdput(f); > >*unlock(f);* > >... > > > > If multiple threads try to read/write at the same time, they could > > read/write at the same offset ? > > > > Look some lines above: > > struct fd f = fdget(fd); > This function is supposed to return the file reference, does do the locking ? It seems that i can't find the lock instruction( with all those rcu instructions, i am little lost), can you guide me throught ? > > Regards, > Tobi > > > ___ > 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: thread concurrent file operation
On Tue, 29 Jan 2013 16:56:02 +0100, Tobias Boege said: > Look some lines above: > > struct fd f = fdget(fd); That creates a reference, not a lock. It basically assures that the system doesn't reap and reclaim that fd out from under the code. (In other words, it's managing lifetime, not concurrency). pgpedFhCsKnu5.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: thread concurrent file operation
On Tue, 29 Jan 2013 16:35:13 +0100, Karaoui mohamed lamine said: > If multiple threads try to read/write at the same time, they could > read/write at the same offset ? > > If my understanding are correct, is this POSIX compliant ? You might want to ponder why the lockf() syscall exists at all.. :) pgpkHBmPf1NvG.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: GRUB question
On Tue, 29 Jan 2013 04:06:39 +0800, horseriver said: > > > 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 ? If your kernel is able to find the root filesystem without any assistance, based on just the built-in drivers and the root= kernel commandline value, you don't need an initrd. However, most distros build basically an 'allmodconfig', which means the required drivers for devices and filesystems are modules and need to be loaded before the root filesystem can be mounted. Also, if you use root-on-LVM or similar, you will need an initrd to issue the LVM command to start up the disks. > > 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? You put in what's needed to get your root filesystem mounted and get /sbin/init or whatever started. This will, of course, depend on your exact hardware, disk, and kernel configuration (my system only needs to do the LVM thing, as all drivers are built-in. Your system will probably differ). pgpyeslyH07L8.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: thread concurrent file operation
On Tue, 29 Jan 2013, Karaoui mohamed lamine wrote: > Hello, > > I was looking at how a syscall read/write was done, and i found this : > > >loff_t pos = file_pos_read(f.file); >ret = vfs_read(f.file, buf, count, &pos); >file_pos_write(f.file, pos); >fdput(f); >... > > My questions are : > > Where did the locking go? I would have imaginated something like : > > >*lock(f);* >loff_t pos = file_pos_read(f.file); >ret = vfs_read(f.file, buf, count, &pos); >file_pos_write(f.file, pos); >fdput(f); >*unlock(f);* >... > > If multiple threads try to read/write at the same time, they could > read/write at the same offset ? > Look some lines above: struct fd f = fdget(fd); Regards, Tobi ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
thread concurrent file operation
Hello, I was looking at how a syscall read/write was done, and i found this : loff_t pos = file_pos_read(f.file); ret = vfs_read(f.file, buf, count, &pos); file_pos_write(f.file, pos); fdput(f); ... My questions are : Where did the locking go? I would have imaginated something like : *lock(f);* loff_t pos = file_pos_read(f.file); ret = vfs_read(f.file, buf, count, &pos); file_pos_write(f.file, pos); fdput(f); *unlock(f);* ... If multiple threads try to read/write at the same time, they could read/write at the same offset ? If my understanding are correct, is this POSIX compliant ? thanks. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: guides to board files -> device-tree and Android -> mainline?
Dear Paul Wise, On Tue, 29 Jan 2013 09:43:28 +0800, Paul Wise wrote: > > If you want to add the board itself and it is ARM based, then you have > > to create a device tree file. I think the older board files are no > > more accepted in the mainline kernel. > > I'm aware of that, my question was how do I convert existing board files > to device tree files? Is there an automated tool, or a guide for that? No, there is no automated tool, because it is not possible to do that automatically. The device drivers used by your board must have a Device Tree binding, and writing the Device Tree source cannot directly be done from the C board file. It requires human knowledge and intervention. Could you be more specific about the platform you would look to convert to the Device Tree? Where is the existing source code? Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux Kernel Networking document (free, 178 pages doc)
Hi, Thanks for the link, great document to study. 2013/1/29 Gabor Podri > Hi Rami, > > it is great stuff. Thank you for sharing it! > > regards, > podri > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > -- Atentamente. Luis Valdes luisvalde...@gmail.com (0994) 205 781 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Where does kernel store per task file position?
Hi Everyone, I was trying to find out where does Linux store per process file position? Since struct file is allocated once when the file is first opened (get_empty_filp() via do_sys_open) .I looked at these, Copy_process--->copy_files-->dup_fd it seemed to allocate only (struct file*) struct files_struct , but I couldn't find any field that is actually being used to store the file position. I'm still not able to figure out where exactly is the position of file stored per task_struct. Secondly even if this was being saved does the kernel changes f_pos of struct file whenever a (read/write) is done? I don't that happens [Correct?]. Regards, Pranay Kumar Srivastava ::DISCLAIMER:: The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
RE: use of EXPORT_SYMBOL()
You can use method signed by EXPORT_SYMBOL(xxx) on other modules (something like public method on module that other module can import and use it) -Original Message- From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of horseriver Sent: Monday, January 28, 2013 11:43 PM To: kernelnewbies@kernelnewbies.org Subject: use of EXPORT_SYMBOL() 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 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux Kernel Networking document (free, 178 pages doc)
Hi Rami, it is great stuff. Thank you for sharing it! regards, podri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: method to get backtrace of kernel function?
On 2013-01-29 14:21:24 (+0700), Mulyadi Santosa wrote: > > Can this function be used in user application? > > no. But I guess I see quite similar function provided by glibc/gcc. > Forgot the function name though, sorry... > backtrace() http://www.gnu.org/software/libc/manual/html_node/Backtraces.html -- Kristof ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: use of EXPORT_SYMBOL()
On Tue, Jan 29, 2013 at 8:31 AM, Mulyadi Santosa wrote: > On Tue, Jan 29, 2013 at 2:58 PM, Adel Qodmani wrote: > > And you're allowed to use it in Kernel modules too? I mean I can expose a > > function in a kernel module that I am building by using EXPORT_SYMBOL? > > technically, yes, you're allowed to export symbol(s) in your kernel > module. Of course, during compiling, module that uses that exported > symbol will be said as using unknown symbol (but since likely you will > use "extern", it will still go on). > > During module linking in kernel space, that "unknown symbol name" will > be resolved. Just like what we see when a program link to function(s) > or variable(s) in dynamic libraries. > > > I think this is explained very well in LDD chapter 1 or 2) and LKD. Kernel modules are in kernel space, so if you export a symbol it is available to the kernel. > -- > 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 > -- Thank you Warm Regards Anuz ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: boot linux2.6 in virtual machine
On Mon, Jan 28, 2013 at 11:39 PM, horseriver wrote: > hi:) > > I have compiled a kernel of 2.6 version . there is an bzImage file > generated and I > Which version of 2.6? I am sure you are aware that the current kernel is 3.7.x and thus most of the newer application would support newer version and not older version > have got a initrd.img file here. > initramfs is newer ramdisk, why are you using an older format? > Now ,I want to boot this kernel , Need I have a boot-loader ? Is GRUB > right for this? > Ofcourse, how else would you boot? Grub should do the work. > Need I mount kernel image and initrd.img on /dev/XXX ? If need, when to > do mount them? > you really need to read more about the intended virtual machine and the process itself. It seems you have not done enough research to ask such questions. I would highly suggest that you read either about KVM or Xen, though I would personally go for usermode linux. > > > thanks! > > ___ > 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: Linux Kernel Networking document (free, 178 pages doc)
On Tue, Jan 29, 2013 at 1:14 PM, Mulyadi Santosa wrote: > On Mon, Jan 28, 2013 at 11:53 PM, Rami Rosen wrote: >> Hi everyone, >> You can find here an up to date and detailed document in pdf (178 >> pages) about Linux Kernel Networking; going deep into design and >> implementation details as well as the theory behind it: Though I am not a networking guy but this detailed tome is really good but unfortunately we don't have same for many other systems such as scheduler and workqueues. Probably it is because these systems keep on evolving and there are many LOC added on a daily basis. > > Rami, I really appreciate your open publication. Thumbs up! > > -- > 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
boot linux2.6 in virtual machine
hi:) I have compiled a kernel of 2.6 version . there is an bzImage file generated and I have got a initrd.img file here. Now ,I want to boot this kernel , Need I have a boot-loader ? Is GRUB right for this? Need I mount kernel image and initrd.img on /dev/XXX ? If need, when to do mount them? thanks! ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux Kernel Networking document (free, 178 pages doc)
Thanks Rami. It is helpful for many newbies like me. Regards, Srinidhi On Tue, Jan 29, 2013 at 1:14 PM, Mulyadi Santosa wrote: > On Mon, Jan 28, 2013 at 11:53 PM, Rami Rosen wrote: > > Hi everyone, > > You can find here an up to date and detailed document in pdf (178 > > pages) about Linux Kernel Networking; going deep into design and > > implementation details as well as the theory behind it: > > Rami, I really appreciate your open publication. Thumbs up! > > -- > 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
Re: use of EXPORT_SYMBOL()
On Tue, Jan 29, 2013 at 2:58 PM, Adel Qodmani wrote: > And you're allowed to use it in Kernel modules too? I mean I can expose a > function in a kernel module that I am building by using EXPORT_SYMBOL? technically, yes, you're allowed to export symbol(s) in your kernel module. Of course, during compiling, module that uses that exported symbol will be said as using unknown symbol (but since likely you will use "extern", it will still go on). During module linking in kernel space, that "unknown symbol name" will be resolved. Just like what we see when a program link to function(s) or variable(s) in dynamic libraries. -- 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: use of EXPORT_SYMBOL()
On Tue, Jan 29, 2013 at 9:52 AM, Mulyadi Santosa wrote: > On Tue, Jan 29, 2013 at 3:13 AM, horseriver wrote: > > 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 ? > > So it can be used by kernel modules. > > Think of it like "public" keyword in C++. > > -- > 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 > And you're allowed to use it in Kernel modules too? I mean I can expose a function in a kernel module that I am building by using EXPORT_SYMBOL? ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies