DragonFly BSD
DragonFly kernel List (threaded) for 2006-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: syscall/sysmsg overview


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Jun 2006 09:39:57 -0700 (PDT)

:I've been digging around in the code here:
:
:/usr/src/share/examples/kld/syscall/module
:
:trying to learn more about the new syscall messaging infrastructure.
:I realize the code is old and outdated.  I have read the information
:available at www.dragonflybsd.org with regard to the new sysmsg work.
:I don't quite understand how a sysmsg is constructed or where exactly.
:...
:call.  Any pointers to places in the code I can read to learn more
:would also be helpful.  I've looked at /sys/i386/i386/trap.c and the
:sys{msg,union,proto}.h header files.
:
:Also any information with regard to adding syscalls via KLD would be a
:boon as well.  I have a hacked up version of the example that passes
:data from userland to the kernel and back again but I feel this isn't
:quite right.  
:
:Joe

    Heh.  I just ripped most of it out.  The structural infrastructure is
    still there, but it's no longer 'messaged'.

    Basically just look at any existing system call.  For example,
    sys_utimes() in kern/vfs_syscalls.c.

    Any pointers supplies by userland, for example a pointer to a timeval,
    must be copied into kernel space before the kernel can safely access
    it.  You also need to avoid declaring large structures or buffers 
    on the kernel stack, so for example you would have to malloc() that
    1024 byte buffer in your example.

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



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