creat all the dentry objects in memory when mount a fs?
when a new unlike-Unix filesystem mounted on my Linux system , will it creat all the dentry objects in the meory , or will it creat only needed, and is the same to inode objects ? So , if all the dentry objects created , I think it must consume a large memory.___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: for interested folks, i'll announce new kernel tutorials via twitter
i agree sending on this list is a better option with some tag. so that organizing it would be much easier. Thanks On Mon, Mar 18, 2013 at 10:58 AM, Rohan Puri rohan.pur...@gmail.com wrote: On Sun, Mar 17, 2013 at 7:07 PM, Robert P. J. Day rpj...@crashcourse.cawrote: as i don't want to seem like i'm spamming this list with notes about new, posted kernel tutorials, people who want to stay on top of these are welcome to follow me on twitter at @rpjday. everything written and posted will be freely available (creative commons license), and even after it's incorporated into future training courses, even those courses will be released under the CC so you'll never lose access to any of it. so feel free to play along. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies Hi Robert, Its fine with me also, by sending it on this list, I think lots of people would be benefited. - Rohan ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- G B Rakesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Memory allocations in linux for processes
Hi all, As I have read, whenever we execute a program, the memory is allocated in different sections viz stack, text and data segment. But, since we have used loader and linker the three allocations will happen for them too. But when I ran a program and did pmap pid, I saw several other fields which I have no idea of. What is the [anon] and what is it doing here ? Why the memory is being implemented for it and there are so many of them ? And also the stack ( 3rd last element), is it the process stack?? Can somebody please explain. Thanking you all in advance. 5448: ./a.out 0040 4K r-x-- /home/n.pokhrel/Personal/mywork/a.out 0060 4K r /home/n.pokhrel/Personal/mywork/a.out 00601000 4K rw--- /home/n.pokhrel/Personal/mywork/a.out 7f57f5e18000 1512K r-x-- /lib/libc-2.11.1.so 7f57f5f92000 2044K - /lib/libc-2.11.1.so 7f57f6191000 16K r /lib/libc-2.11.1.so 7f57f6195000 4K rw--- /lib/libc-2.11.1.so 7f57f6196000 20K rw---[ anon ] 7f57f619b000128K r-x-- /lib/ld-2.11.1.so 7f57f6396000 12K rw---[ anon ] 7f57f63b8000 8K rw---[ anon ] 7f57f63ba000 4K r /lib/ld-2.11.1.so 7f57f63bb000 4K rw--- /lib/ld-2.11.1.so 7f57f63bc000 4K rw---[ anon ] 7fffa2f37000 84K rw---[ stack ] 7fffa2fa 4K r-x--[ anon ] ff60 4K r-x--[ anon ] total ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Re: for interested folks, i'll announce new kernel tutorials via twitter
Mrs, Good morning. Yes, I agree with Rohan.In my opinion, if someone has any problem in receiving your message, I strong suggest that he/she delete it. Simple like that. I´m interested in your e-mails and tutorials and you shouldn´t stop sending them because everewhere there are strange people who see problems where there isn´t one. Have a nice day. Alexandre Borges (br.linkedin.com/in/aleborges) On Seg 18/03/13 03:01 , rakesh Bhaskar everfriendlyrak...@gmail.com sent: i agree sending on this list is a better option with some tag. so that organizing it would be much easier. Thanks On Mon, Mar 18, 2013 at 10:58 AM, Rohan Puri wrote: On Sun, Mar 17, 2013 at 7:07 PM, Robert P. J. Day wrote: as i don't want to seem like i'm spamming this list with notes about new, posted kernel tutorials, people who want to stay on top of these are welcome to follow me on twitter at @rpjday. everything written and posted will be freely available (creative commons license), and even after it's incorporated into future training courses, even those courses will be released under the CC so you'll never lose access to any of it. so feel free to play along. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca [1] Twitter: http://twitter.com/rpjday [2] LinkedIn: http://ca.linkedin.com/in/rpjday [3] ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies [4] Hi Robert, Its fine with me also, by sending it on this list, I think lots of people would be benefited. - Rohan ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies [5] -- G B Rakesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: signals handling: kill() successful, but nothing delivered
On Mon, 18 Mar 2013 06:50:25 +0100, mic...@michaelblizek.twilightparadox.com said: Hi! On 06:52 Fri 08 Mar , mic...@michaelblizek.twilightparadox.com wrote: ./a.out `ps a|grep wget|grep -v grep To save the double grep, you can do something like this: ps a | grep '[w]get' | ... Figuring out why that works is left as an exercise for the reader... pgpJxOfEdOhxH.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: do_initcalls
On Mon, 18 Mar 2013, ishare wrote: On Sun, Mar 17, 2013 at 04:11:54PM +0100, Tobias Boege wrote: On Sun, 17 Mar 2013, ishare wrote: for (call = __initcall_start; call __initcall_end; call++) (*call)(); I want to know where are these function point assigned by specified function ? thanks! As per include/asm-generic/vmlinux.lds.h and your arch's vmlinux.lds.S (I actually only looked at x86's), the __initcall_{start,end} variables are the start and end of the __initcall ELF section which contains all the sub-level sections. Functions can be put into these sections when they are given to one of the *_initcall macros from include/linux/init.h. I have configure kernel supporting rom filesystem ,and register it by module_init(init_romfs_fs) , but why the function : init_romfs_fs not be called from (*call)() ? thanks! This is strange - *unless* you build romfs as a module. Have again a look at the aforementioned include/linux/init.h. There's a fairly big comment on the procedure: /** * module_init() - driver initialization entry point * @x: function to be run at kernel boot time or module insertion * * module_init() will either be called during do_initcalls() (if * builtin) or at module insertion time (if a module). There can only * be one per module. */ Regards, Tobi ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: do_initcalls
On Mon, Mar 18, 2013 at 05:35:29PM +0100, Tobias Boege wrote: On Mon, 18 Mar 2013, ishare wrote: On Sun, Mar 17, 2013 at 04:11:54PM +0100, Tobias Boege wrote: On Sun, 17 Mar 2013, ishare wrote: for (call = __initcall_start; call __initcall_end; call++) (*call)(); I want to know where are these function point assigned by specified function ? thanks! As per include/asm-generic/vmlinux.lds.h and your arch's vmlinux.lds.S (I actually only looked at x86's), the __initcall_{start,end} variables are the start and end of the __initcall ELF section which contains all the sub-level sections. Functions can be put into these sections when they are given to one of the *_initcall macros from include/linux/init.h. I have configure kernel supporting rom filesystem ,and register it by module_init(init_romfs_fs) , but why the function : init_romfs_fs not be called from (*call)() ? thanks! This is strange - *unless* you build romfs as a module. Have again a look at the aforementioned include/linux/init.h. There's a fairly big comment on the procedure: /** * module_init() - driver initialization entry point * @x: function to be run at kernel boot time or module insertion * * module_init() will either be called during do_initcalls() (if * builtin) or at module insertion time (if a module). There can only * be one per module. */ Does this mean it chould not be called during do_initcalls if I config it as a module ? If this ,how to change it to be builtin module? what is called module insertion time? Is that time I explicitely call some insert function? thanks! 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: programme header
On Mon, Mar 18, 2013 at 03:02:02PM -0700, Ian Lance Taylor wrote: On Sun, Mar 17, 2013 at 1:54 AM, ishare june.tune@gmail.com wrote: when product a .so liberary , if there is not a programme header in the linker script file, will the linker automaticlly generate a deault one for use ? Yes. If I write the programme header manully , need I write it before writing section command ? No. I am linking my kernel by a link script. its contens is as below: * VSYSCALL_BASE = 0xe000; SECTIONS { . = VSYSCALL_BASE + SIZEOF_HEADERS; .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. */ . = VSYSCALL_BASE + 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 } 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 */ } *** I think it will work ,but ld report that No enough room for programme header,what is the reason? what should I do ? thanks! Ian ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: for interested folks, i'll announce new kernel tutorials via twitter
On Sun, 17 Mar 2013 09:37:53 -0400 (EDT) Robert P. J. Day rpj...@crashcourse.ca wrote: as i don't want to seem like i'm spamming this list with notes about new, posted kernel tutorials, people who want to stay on top of these are welcome to follow me on twitter at @rpjday. everything written and posted will be freely available (creative commons license), and even after it's incorporated into future training courses, even those courses will be released under the CC so you'll never lose access to any of it. so feel free to play along. rday Hi Robert, First thank you for your tutorials and your work! I think it will be more useful to have announcement on this list also. Since this list is for kernel newbies and not for only important kernel announcements, please thing. I think most people on this list will be at least interested in what you're doing. (especially considering the fact that there are not many tutorials on kernel development) Best regards and good luck with your work! Leonid V. Fedorenchik ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: programme header
On Tue, 19 Mar 2013 09:38:49 +0800, ishare said: I am linking my kernel by a link script. its contens is as below: I think it will work ,but ld report that No enough room for programme header,what is the reason? what should I do ? The first thing you do is ask yourself why you're using a link script of your own, when most architectures come with a working link script already. The second thing you do is *read the script* - there's a big copmment in there: /* 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. */ Hope that helps. pgpNxO3hcuU3n.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: programme header
On Mon, Mar 18, 2013 at 10:41:45PM -0400, valdis.kletni...@vt.edu wrote: On Tue, 19 Mar 2013 09:38:49 +0800, ishare said: I am linking my kernel by a link script. its contens is as below: I think it will work ,but ld report that No enough room for programme header,what is the reason? what should I do ? The first thing you do is ask yourself why you're using a link script of your own, when most architectures come with a working link script already. The second thing you do is *read the script* - there's a big copmment in there: /* 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. */ because I need to generate a .so for sysenter used thanks! Hope that helps. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: programme header
On Tue, 19 Mar 2013 12:44:36 +0800, ishare said: because I need to generate a .so for sysenter used And that solves what problem for you, exactly? Consider that most architectures that use sysenter manage to do so without having to worry about a .so for it (or if they really do need one, they already create a .so). So what problem are you trying to solve by using a .so? pgplXadb05EFh.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: kernel build error
On Mon, Mar 18, 2013 at 11:21:52AM +0700, Mulyadi Santosa wrote: On 3/17/13, Kumar amit mehta gmate.a...@gmail.com wrote: I'm facing a kernel build issue with the latest kernel on my machine. It seem like a configuration issue, and I haven't been able to resolve it for sometime, hence need your help. The error message is as below: error snip ERROR: copy_from_user_overflow [net/core/pktgen.ko] undefined! ERROR: copy_from_user_overflow [fs/binfmt_misc.ko] undefined! ERROR: copy_from_user_overflow [drivers/staging/cxt1e1/cxt1e1.ko] undefined! ERROR: copy_from_user_overflow [drivers/isdn/icn/icn.ko] undefined! ERROR: copy_from_user_overflow [drivers/isdn/hardware/avm/b1.ko] undefined! error snip Looks like a .h (header) file is missing on those files (icn, pktgen etc). A header that defines copy_from_user_overflow() for sure. Maybe grep can help. grep for copy_from_user_overflow gives me this: amit@ubuntu:~/linux-next/linux-next$ grep -ri copy_from_user_overflow * arch/s390/include/asm/uaccess.h:extern void copy_from_user_overflow(void) arch/s390/include/asm/uaccess.h:copy_from_user_overflow(); arch/tile/include/asm/uaccess.h:extern void copy_from_user_overflow(void) arch/tile/include/asm/uaccess.h:copy_from_user_overflow(); arch/parisc/include/asm/uaccess.h:extern void copy_from_user_overflow(void) arch/parisc/include/asm/uaccess.h:copy_from_user_overflow(); arch/x86/include/asm/uaccess_32.h:extern void copy_from_user_overflow(void) arch/x86/include/asm/uaccess_32.h: copy_from_user_overflow(); drivers/vfio/pci/vfio_pci_config.c: * with count of 1/2/4 and hits copy_from_user_overflow without this. lib/usercopy.c:void copy_from_user_overflow(void) lib/usercopy.c:EXPORT_SYMBOL(copy_from_user_overflow); I've been happily building kernel for previous releases and this issue seem to have creeped up recently, therefore I looked into the changelogs and found that recently there has been some modification in the arch/x86/Kconfig $ git blame --since=3.weeks -- arch/x86/Kconfig 7cb72f24 (Stephen Boyd 2013-03-10 21:55:49 +1100 23) select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS -- gives me some pointer $ git log 7cb72f24 snip To simplify the rewording, consolidate the text into lib/Kconfig.debug and modify it there to be more explicit about when you should say N to this config. While we're doing this, remove all the copy_from_user_overflow() code that's duplicated many times and place it into lib/ so that any architecture supporting this option can get the function for free. snip snip from lib/Kconfig.debug config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS bool config DEBUG_STRICT_USER_COPY_CHECKS bool Strict user copy size checks depends on ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS depends on DEBUG_KERNEL !TRACE_BRANCH_PROFILING help Enabling this option turns a certain set of sanity checks for user copy operations into compile time failures. The copy_from_user() etc checks are there to help test if there are sufficient security checks on the length argument of the copy operation, by having gcc prove that the argument is within bounds. If unsure, say N. snip from lib/Kconfig.debug As I've mentioned before, copy_from_user_overflow is defined and exported in lib/usercopy.c and my .config file has CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS set to 'y' snip from .config amit@ubuntu:~/linux-next/linux-next$ grep CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS .config CONFIG_ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS=y snip from .config I've not been able to figure out the required header file so far. Thanks, Amit ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies