execute a user process in the kernel

From: Gordon David (kylincsos_at_hotmail.com)
Date: 09/22/04

  • Next message: Ryan Sommers: "Re: jump from kernel to loader"
    To: freebsd-hackers@freebsd.org
    Date: Wed, 22 Sep 2004 08:49:11 +0000
    
    

    Hello,

    I have a question. Anyone would like to tell me how to execute a user
    process or shell script in the kernel?

    As we know, the kernel forks a process named initproc and executes
    /sbin/init, etc. If I want to execute a user level process, such as a
    simple printf("Hello world") in a driver, what shall I do?

    Thanks

    Gordon

    _________________________________________________________________
    享用世界上最大的电子邮件系统— MSN Hotmail。 http://www.hotmail.com

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Ryan Sommers: "Re: jump from kernel to loader"

    Relevant Pages

    • Re: yet another Forth: vmForth
      ... and MidLevel and HLL all Integrated in the Kernel. ... VM assembler and simulator from within the simulator for testing :-) ... higher level Forth constructs, like jz/jnz, lit, execute, call and jump. ... Compiles VM assembler mnemonics into the VM memory. ...
      (comp.lang.forth)
    • Re: [Full-Disclosure] Linux Exec Shield (was: Linux (in)security)
      ... > Speaking about kernel hardening, I was wondering if anyone on the list could ... > comment on Ingo Molnar's Exec Shield Linux kernel patches. ... Linux kernel you can execute any data inside a process's memory or overwrite ... From a security point of view ...
      (Full-Disclosure)
    • Re: Hibernation considerations
      ... ACPI calls needed in the second and third cases above? ... be done from within a kexec'd hibernation kernel. ... * execute the _PTS global control method ...
      (Linux-Kernel)
    • Re: [PATCH 0/2] add new notifier function ,take3
      ... panic so that remote node can initiate failover ... job harder as one needs to pass all the required data to second kernel. ... So it will not left to user whether he should execute the code after ... Things should be more reliable in second kernel. ...
      (Linux-Kernel)
    • Re: 5.2-CURRENT: ldd /boot/kernel/kernel generates signal 6 (ABRT) ?
      ... The kernel actually has a bogus loader, /red/herring, ... The kernel ELF image activator sees this and tries to execute ... Usually invalid binaries won't have a correct ELF header and will error ...
      (freebsd-current)