Re: can anyone tell me which function to call to pause the kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Mon, May 16, 2016 at 7:36 AM, walkerlala <ablacktshirt@xxxxxxxxx> wrote:
On 2016年05月16日 01:36, Mulyadi Santosa wrote:


On Thu, May 12, 2016 at 9:55 PM, walkerlala <ablacktshirt@xxxxxxxxx
<mailto:ablacktshirt@xxxxxxxxx>> wrote:

    I successfully insert some function into the kernel code and make it
    execute when the kernel start up, but I just can't make the kernel stop
    executing. Are there any functions which can pause the kernel so that I
    prompt the user, and let the user input a command(maybe a comment to
    display the current time. Something like a shell would do) and
    interact ?
    (I had checked the "sys_***" functions in this page:
    http://docs.cs.up.ac.za/programming/asm/derick_tut/syscalls.html
       but just can't find a proper one )

    _______________________________________________
    Kernelnewbies mailing list
    Kernelnewbies@xxxxxxxxxxxxxxxxx <mailto:Kernelnewbies@xxxxxxxxxxxxxxxxx>
    http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Hi...

sounds like what kgdb does. But not sure if it is still maintained or not.

btw, kernel can not be paused, actually. if you really need that, you
need to run linux kernel inside virtual machine and pause the virtual
machine. But doing that, you will also pause user space too :)

--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com <http://the-hydra.blogspot.com>
training: mulyaditraining.blogspot.com <http://mulyaditraining.blogspot.com>

Hi, thanks for reply.

I know using a debugger or virtual machine would help a little bit, but that's not interactive any more. What I want is just a shell-like "interactive" kernel (may be I am a little naive to think that ?)

Why the kernel cannot be stopped ? I think, now that if the kernel can be interrupted, then why can't it be stopped by some mechanisms ?

Regards,



Hi...

please add kernelnewbies to cc: list too next time :)

Kernel can't be stopped, because it's actually servicing event mostly generated by hardware (interrupts etc) or user space (syscall etc). So unless you stop these two aspects to raise events, basically kernel will still do its works.


--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux