[lkml]   [2000]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Function calls not permitted in kernel code
    On Wed, 20 Sep 2000, Mark James wrote:

    > That is, can a kernel module open and read files or sockets,
    > call libc functions, start processes?

    kernel code is, as userspace one, just a code to be executed by the CPU,
    I suspect you knew that already ;) Therefore, it can do absolutely
    anything the human tells it to. Even calling "libc functions" as long as
    you implement the desired libc functionality in the kernel yourself - most
    of what is needed is there already, e.g. sprintf() etc.

    Having said that, doing things like opening files and sockets is usually
    frowned upon and rightly so, except in special cases like khttpd and such.

    > (1) Get a user process to do the work, communicating
    > with the kernel via /proc or some other way.

    some other way may be by means of system calls. System calls are the most
    natural (by definition) way of communicating between userspace and kernel.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:38    [W:0.020 / U:8.188 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site