Re: execute a user process in the kernel

From: Dag-Erling Smørgrav (des_at_des.no)
Date: 09/24/04

  • Next message: Christian S.J. Peron: "fixes for ipfw and pf lock ordering issues"
    To: Robert Watson <rwatson@freebsd.org>
    Date: Fri, 24 Sep 2004 21:20:21 +0200
    
    

    Robert Watson <rwatson@freebsd.org> writes:
    > Well, we have kproc/kthread APIs, but none of that is semantically
    > compatible with the notion of execve(), which is a very user-centric
    > concept ("replace the address space with a mapping of binary <x>"). You
    > could fudge together a related notion, though, involving loadable kernel
    > modules that have a main() routine run from a thread. That said, the
    > notion of simply running user code in kernel (as has been pointed out) is
    > fraught with peril, primarily because the kernel is basically one big
    > program with many special requirements, and user applications are written
    > with the assumption that they are the only program, not running in the
    > context of another program.

    I believe the OP actually wanted the kernel to spawn a userland
    process, but I may have misunderstood.

    DES

    -- 
    Dag-Erling Smørgrav - des@des.no
    _______________________________________________
    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: Christian S.J. Peron: "fixes for ipfw and pf lock ordering issues"

    Relevant Pages

    • Re: execute a user process in the kernel
      ... > the kernel with a process context it can use for other stuff. ... > You could, of course, write a kernel API for creating processes from ... notion of simply running user code in kernel is ...
      (freebsd-hackers)
    • Re: [Patch] Support UTF-8 scripts
      ... > whole point of my patch - I would not propose a kernel patch to ... The last time I handed execve() a script as a ... >> kernel config files ever. ... nothing about how to execute a text file - the kernel should return ...
      (Linux-Kernel)
    • Re: Direct Linux syscalls
      ... > and Sysenter instructions actually reside in their own page. ... I commented them out and did a kernel build and sure enough, ... I had commented out the execve one ... glibc, which are the version called by user code. ...
      (comp.os.linux.development.apps)
    • How to intercept execve system call...?
      ... I'm trying to intercept "execve" system call with the following ... function...I am using with linux-2.6.8.1 kernel for it ... asmlinkage int new_execve ... -> uid); ...
      (comp.os.linux.development.system)
    • Re: Blueflops ate my X
      ... :In execve but not in the kernel (I presume if the kernel had ... In addition to being the name of a glibc function, execve is also an int ... appropriate kernel source code to prove it. ...
      (alt.lang.asm)