Menu

Welcome to Open Discussion

2008-03-07
2013-04-02
  • Nobody/Anonymous

    Welcome to Open Discussion

     
    • Gaurav Nanda

      Gaurav Nanda - 2009-02-17

      hello maon,

      I have also been exploring cryoPID and faced a few problems.

      1. I am using

      "Linux s******  2.4.21-53.ELsmp #1 SMP Mon Dec 3 13:54:07 EST 2007 i686 athlon i386 GNU/Linux"

      and i faced a lot of problems compling the .5.9 version given by author himself.But i made it compile once doing some changes
      I downloaded your version also,it has the same problems.

      E.g :-> 1)We  have to include "sys/ptrace.h" on top of other includes, otherwise error is there.
      2)There is not any structure "user_desc" in my distribution so i changed its name to "modify_ldt_ldt_s"

      (Even im not sure that i should have made those changes or not, as im new to linux.)
      But those same changes i have to make with your code also.

      2. One more important thing, i noticed changes you made in cp_w_vma.c, even i am not aware why author(bernard) has added ..

        if (vma->start >= TRAMPOLINE_ADDR && vma->start <= TRAMPOLINE_ADDR+PAGE_SIZE) {
          fprintf(stderr, "     Ignoring map - looks like resumer trampoline.\n");
          return 0;
          }
          if (vma->start >= RESUMER_START && vma->start <= RESUMER_END) {
          fprintf(stderr, "     Ignoring map - looks like resumer.\n");
          return 0;
          }
      Can u explain how this "trampoline address", "resumer address" work?

      3. Then most important problem i have faced in my kernel is that ...

      It freezes perfectly but when you try to resume the process, message is
      "Killed"(Only under a particular case*)
      And i guess reason is that it does not get the starting address of its heap.

      *Particular case
      When in maps file, notice 3rd line(00955000-00958000 rw-p 00000000 00:00 0) appears between the two.

      00822000-00952000 r-xp 00000000 08:09 224592     /lib/tls/libc-2.3.2.so
      00952000-00955000 rw-p 0012f000 08:09 224592     /lib/tls/libc-2.3.2.so
      00955000-00958000 rw-p 00000000 00:00 0
      00ac0000-00ad5000 r-xp 00000000 08:09 433319     /lib/ld-2.3.2.so
      00ad5000-00ad6000 rw-p 00015000 08:09 433319     /lib/ld-2.3.2.so

      But if this appears as,

      00822000-00952000 r-xp 00000000 08:09 224592     /lib/tls/libc-2.3.2.so
      00952000-00955000 rw-p 0012f000 08:09 224592     /lib/tls/libc-2.3.2.so
      00ac0000-00ad5000 r-xp 00000000 08:09 433319     /lib/ld-2.3.2.so
      00ad5000-00ad6000 rw-p 00015000 08:09 433319     /lib/ld-2.3.2.so
      00955000-00958000 rw-p 00000000 00:00 0

      or some other combination then it will work fine..You can trace this easily in code where he is assigning a value to offset.

      Hey i will really appreciate if you can help, as im in beggining phase of learning phase of linux and cryopid both. :)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.