User space pseudo device driver

From: Abramo Bagnara (abramo@alsa-project.org)
Date: Wed Apr 19 2000 - 12:28:05 EDT

  • Next message: Kurt Roeckx: "Re: Security in general (was Re: Proposal "LUID")"

    I'm investigating the feasibility of an user space pseudo device driver
    realized in this way:

    HOW:
    - a kernel module that register a set of char devices and install a
    fully defined file_operations
    - associated with this set there is another character device
    - polling and reading from this device a daemon get the identification
    info and the file_operations callback arguments (of course other
    callbacks are needed, by example a munmap callback)
    - when ready the daemon will write the answer back
    - the kernel module never pass to daemon the data pointed by user space
    pointer argument of syscalls but it pass the pointer. The daemon will
    read/write the data directly from process user space (I assume using
    /proc/PID/mem)

    WHY:
    - to realize compatibility layer
    - to emulate inexistant devices
    - to test a device driver in a MMU controlled environment
    - to reduce kernel bloat moving more code to user space (?)
    - ...

    PROBLEMS:
    - I've tought to mmap /proc/PID/mem but I see that in 2.2 this was
    deprecated and in 2.3 this chance does not exists (comparing 2.2 and 2.3
    I suppose that this has happened during Al rewrite of fs/proc/base.c).
    Does it exists some alternatives? This opportunity will never reappear?

    I'd like to hear all your comments and consideration.

    -- 
    Abramo Bagnara                       mailto:abramo@alsa-project.org
    

    Opera Unica Via Emilia Interna, 140 Phone: +39.0546.656023 48014 Castel Bolognese (RA) - Italy Fax: +39.0546.656023

    ALSA project is http://www.alsa-project.org sponsored by SuSE Linux http://www.suse.com

    It sounds good!

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Wed Apr 19 2000 - 12:43:37 EDT