Re: Download Linus's latest git tree
Hi All, I just want to improve om my approch as my preview approch failed with git merger conflict. So I did some reverse engg. And came up with this approch. # First clone to the current release. git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux cd linux # Added a remote git tree to the .git/config using following command. git remote add stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git # Merge the tags from the stable tree to current tree # this will resolve all the conflict and diff and tags git fetch stable master --tags # After this you will be able to chose to checkout any stable # release using particular tags in different branchs. # checkout the stable release v3.14.4 into stable314y branch. git checkout tags/v3.14.4 -b stable314y # Simpilarly you can checkout v3.10.40 int stable310y branch git checkout tags/v3.10.40 -b stable310y # You local repository will have git branch --list master --this branch point to mainline: 3.15-rc7 * stable310y --this branch point to longterm: 3.10.40 stable314y --this branch point to stable: 3.14.4 tutorial # Note but dont use 'git pull' in these sub branchs # You can switch among these branches. git checkout stable314y -f git describe v3.14.4 git checkout stable310y -f git describe v3.10.40 git checkout master -f git describe v3.15-rc7-40-gcd79bde # Note : You can maintain the kernel in the same linux directory. # Note you can do 'git reset --hard HEAD' only on the *master branch. Please share your thought on this. -Anand Moon On Tuesday, May 27, 2014 10:58 PM, valdis.kletni...@vt.edu valdis.kletni...@vt.edu wrote: On Tue, 27 May 2014 11:28:19 -0500, Victor Rodriguez said: Have you try the git archive instead of git clone? , if you do not need the history this git option rocks That has the same problem as 'clone --depth 1' - you can't bisect using the resulting tree. ___ 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
Can i change address of Master Boot Record
Hello every one ! I was reading the booting process of Linux kernel. I got to know that generally the location of MBR is first sector of the bootable device. I want to know that whether we can change the location (Starting address ) of Master Boot Record or not . Can we do this for Linux and Windows both. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Can i change address of Master Boot Record
On Wed, 28 May 2014 13:28:20 +0530, Saurabh Jain said: I was reading the booting process of Linux kernel. I got to know that generally the location of MBR is first sector of the bootable device. I want to know that whether we can change the location (Starting address ) of Master Boot Record or not . Can we do this for Linux and Windows both. Hint: What piece of software loads the MBR from the disk? And who wrote that software, and what would it take to get them to change it? pgpjuRYCttrdF.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Can i change address of Master Boot Record
For what reason do you want to change it? On Wed, May 28, 2014 at 9:58 AM, Saurabh Jain saurabh4768j...@gmail.com wrote: Hello every one ! I was reading the booting process of Linux kernel. I got to know that generally the location of MBR is first sector of the bootable device. I want to know that whether we can change the location (Starting address ) of Master Boot Record or not . Can we do this for Linux and Windows both. ___ 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: Can i change address of Master Boot Record
Saurabh Jain: Hello every one ! I was reading the booting process of Linux kernel. I got to know that generally the location of MBR is first sector of the bootable device. I want to know that whether we can change the location (Starting address ) of Master Boot Record or not . Can we do this for Linux and Windows both. As far as I understand, you can leave the beginning (first 512 bytes - partition table) of your MBR empty (NULL). Then, the BIOS will look into your partition table for a partition with enabled boot flag. If present it will look there for a boot loader. I don't know if this is something you were looking for. Anyways, you will not be able to change the location of your MBR unless your BIOS explicitly supports that, but I never heard of such options. frukto ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Capturing all writes as fault on a memory mapped page.
Hi I need to capture all writes on page which is memory mapped by the user program. I've tried setting the vm_page_prot by disabling the VM_WRITE flag but even then the page fault occurs only once during the first write. VM_SHARED is set to stop COW in the __do_fault. I was also trying to set_memory_ro(this may not be available for all archs?) however I can't do that while handling the fault since the page table entries are created later after the vm_operations_struct-fault has installed the page for the fault. I'm not having any clues on how to do this. Any help would be really helpful on this. Thanks -- ---P.K.S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Capturing all writes as fault on a memory mapped page.
On Wed, May 28, 2014 at 06:47:24PM +0530, Pranay Srivastava wrote: Hi I need to capture all writes on page which is memory mapped by the user program. For what and what are you going to do with them once you capture them? Are you trying to capture them in the kernel or in userspace? I've tried setting the vm_page_prot by disabling the VM_WRITE flag but even then the page fault occurs only once during the first write. VM_SHARED is set to stop COW in the __do_fault. I was also trying to set_memory_ro(this may not be available for all archs?) however I can't do that while handling the fault since the page table entries are created later after the vm_operations_struct-fault has installed the page for the fault. I'm not having any clues on how to do this. Any help would be really helpful on this. I don't think this is going to be possible, sorry, please go revisit the reason you think you want to do this. greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Capturing all writes as fault on a memory mapped page.
On 5/28/14, Greg KH g...@kroah.com wrote: On Wed, May 28, 2014 at 06:47:24PM +0530, Pranay Srivastava wrote: Hi I need to capture all writes on page which is memory mapped by the user program. For what and what are you going to do with them once you capture them? This is just as an exercise nothing in specific. Currently what I've is a misc_device having a page of memory. I've made it available through mmap to user space programs(again this is just an exercise). Are you trying to capture them in the kernel or in userspace? So after a user space program has done mmap of this page to its address space, I wanted the writes to be captured. Now if i don't set the VM_WRITE in vm_flags then __do_fault sends sends the SEGV and if I do set it then I'm able to get the first fault (read or write access). I've tried setting the vm_page_prot by disabling the VM_WRITE flag but even then the page fault occurs only once during the first write. VM_SHARED is set to stop COW in the __do_fault. I was also trying to set_memory_ro(this may not be available for all archs?) however I can't do that while handling the fault since the page table entries are created later after the vm_operations_struct-fault has installed the page for the fault. I'm not having any clues on how to do this. Any help would be really helpful on this. I don't think this is going to be possible, sorry, please go revisit the reason you think you want to do this. greg k-h Actually trying to do something like if there's a write being done on the page by a task currently then other tasks should wait( was hoping that the fault handler code would be called for write but doesn't happen that way). Yes through write operation I can do with mutex but I was wondering what if this has to be done through mmap of my misc_device then no read/write calls involved so just wanted to see how would I stop multiple writes to my misc_device. Perhaps there are other methods as to how device memory can be mapped to user space? or they aren't at all? Not really sure just reading and trying. -- ---P.K.S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Capturing all writes as fault on a memory mapped page.
On Wed, May 28, 2014 at 07:13:55PM +0530, Pranay Srivastava wrote: Actually trying to do something like if there's a write being done on the page by a task currently then other tasks should wait( was hoping that the fault handler code would be called for write but doesn't happen that way). If you have multiple writers on the same page, why would you want any other writer to wait? That's the joy of mmap, you don't have to worry about any of this from userspace, the kernel backing store handles it all for you automatically. Yes through write operation I can do with mutex but I was wondering what if this has to be done through mmap of my misc_device then no read/write calls involved so just wanted to see how would I stop multiple writes to my misc_device. Either you don't allow multiple opens, or you just live with the mess that userspace is wanting to do here. Perhaps there are other methods as to how device memory can be mapped to user space? or they aren't at all? Not really sure just reading and trying. As you mapped it to userspace, it's now up to the user to deal with any serialization that it wants to enforce, it's out of the hands of your misc driver. good luck, greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Capturing all writes as fault on a memory mapped page.
On 5/28/14, Greg KH g...@kroah.com wrote: On Wed, May 28, 2014 at 07:13:55PM +0530, Pranay Srivastava wrote: Actually trying to do something like if there's a write being done on the page by a task currently then other tasks should wait( was hoping that the fault handler code would be called for write but doesn't happen that way). If you have multiple writers on the same page, why would you want any other writer to wait? That's the joy of mmap, you don't have to worry about any of this from userspace, the kernel backing store handles it all for you automatically. Yes through write operation I can do with mutex but I was wondering what if this has to be done through mmap of my misc_device then no read/write calls involved so just wanted to see how would I stop multiple writes to my misc_device. Either you don't allow multiple opens, or you just live with the mess that userspace is wanting to do here. Perhaps there are other methods as to how device memory can be mapped to user space? or they aren't at all? Not really sure just reading and trying. As you mapped it to userspace, it's now up to the user to deal with any serialization that it wants to enforce, it's out of the hands of your misc driver. Thanks a lot. good luck, greg k-h -- ---P.K.S ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
killed message!
Hi, I created a system call that deals with files - when I try to test the system call . I got a killed message. What this means? Thanks, Nada ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: killed message!
On Wed, 28 May 2014 21:48:04 +0300, Nada Saif said: I created a system call that deals with files - when I try to test the system call . I got a killed message. What this means? It probably means either your system call or your test program is buggy and generating a signal along the way. Do you see anything informative in dmesg? (Also, 'echo 1 /proc/sys/kernel/print-fatal-signals' is your friend, it will give you more info in dmesg if a process is killed by a signa) pgpfln6blDpLp.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
mmap() only version of ptmalloc3 and how to benchmark it
Hello, I am a undergraduate student currently and I am working on a version of ptmalloc3 that uses only mmap() system call to satisfy all types of allocation requests and use of brk() is completely removed/avoided as college project. The memory allocated using mmap() is also backed by a disk file (which helps to reduce swap-in + swap-out time of process but adds a extra overhead). Considering the case where only a single resource intensive and critical application is using this version of ptmalloc for allocation purposes. Rest of the programs are using default implementation. Then in this case this will be saving swap-in + swap-out time but will add disk file read+write overheads and also sync overhead. So considering all these points, is it of any advantage to save on swapping time while having all those extra overheads. Also could you please point out how I can benchmark it and test how my version is working against the original one. Thank you. Kind regards, Aaditya Gavandalkar___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: mmap() only version of ptmalloc3 and how to benchmark it
On Wed, 28 May 2014 12:37:48 -0700, Aaditya Gavandalkar said: So considering all these points, is it of any advantage to save on swapping time while having all those extra overheads. The short answer is it depends. The long answer is it depends. Do you have actual numbers that show a saving in swapping time? If so, how much of a reduction? Is there a difference if you're only slightly into swap (maybe 50M or so), or heavily into swap (multiple gigabytes) but most swap-resident pages are old and inactive (for instance, your Firefox image when you come in in the morning, after it's been forced out to swap by a 2AM backup), or heavily into swap and high activity (in other words, if your system is thrashing)? Which is more important, saving on swapping time because you have an elapsed-time issue (for instance, a backup service that isn't making an allotted time window), or the overhead (if your server is already running at 90% CPU)? And the first question that my boss is going to ask me in this situation is Why doesn't a server that's running a critical application have enough RAM installed so that you don't ever hit swap in the first place? (You want to see painful? An SGI UV system that has 2.7T of RAM (*not* a typo) and it's swapping. Ouch doesn't begin to describe it...) pgpXacU7LRFxY.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
how to detect kernel memory overflow ?
Hello How to detect the kernel memory overflow errors? There are many tools to detect the user mode program memory problems, like the memcheck(Valgrind), is there any tools for the kernel ? The Kmemcheck detects some uses of uninitialized memory, can not detect the overflow errors. Thanks, HeChuan___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: how to detect kernel memory overflow ?
On Thu, 29 May 2014 11:13:09 +0800, RS said: How to detect the kernel memory overflow errors? With a sufficiently recent gcc, you can build the kernel with CONFIG_CC_STACKPROTECTOR=y which will put a canary value on the stack and check it for corruption. pgpsJAUnjB0ke.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re:Re: how to detect kernel memory overflow ?
Hello em, this can protect the stack, so what about the memory buffer allocated through the kmalloc or vmalloc ? Thanks, HeChuan At 2014-05-29 12:01:10,valdis.kletni...@vt.edu wrote: On Thu, 29 May 2014 11:13:09 +0800, RS said: How to detect the kernel memory overflow errors? With a sufficiently recent gcc, you can build the kernel with CONFIG_CC_STACKPROTECTOR=y which will put a canary value on the stack and check it for corruption. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies