Browse Prior Art Database

Application level services for kernel code Disclosure Number: IPCOM000031044D
Original Publication Date: 2004-Sep-08
Included in the Prior Art Database: 2004-Sep-08
Document File: 1 page(s) / 29K

Publishing Venue



Kernel code sometimes needs to use a service that is run in user space. For example, the kernel or a kernel extension might need to call the gethostbyname libc library call. Instead of creating a complex kernel to user space upward call design, a simple idea to solve this problem.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 77% of the total text.

Page 1 of 1

Application level services for kernel code

A daemon will run in user space listening for requests from the kernel thread (this could be the main kernel or a kernel extension). The kernel submits a request to the daemon, the daemon runs the requested action in user space and responds to the kernel extension.

The kernel could require a wide variety of user-level services. Listed below are some examples:
1. A user-level library routine needs to be run. In this case the kernel must provide in the service request packet, the following info:

     - Name of library routine to call - Arguments to pass to the routine - Name of the library that contains this routine. e.g. libbsd.a. The daemon will probably need to dlopen the library in order to run the requested service The daemon then returns a buffer containing the results of the library call.

2. The kernel might need a shell command to be run. In this case the kernel provides in the service request:

- The shell command to be run along with arguments

The daemon can exec a new shell, run the command and return a buffer containing the output of the shell command to the kernel.

Since the daemon is general-purpose, it can be extended to process any number of service request types from the kernel. In this way kernel processes can execute user-level actions without needing to switch back to user space.

This invention can be implemented using the client-server model. A daemon will be implemented that runs in application space and lis...