From mboxrd@z Thu Jan 1 00:00:00 1970 From: j.neuschaefer@gmx.net (Jonathan =?utf-8?Q?Neusch=C3=A4fer?=) Date: Wed, 19 Dec 2012 21:52:48 +0100 Subject: sysfs: pass function pointers to kernel (not just a value through attribute) In-Reply-To: References: Message-ID: <20121219205248.GD3158@debian.debian> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Mon, Dec 17, 2012 at 10:11:46AM -0500, Terry Hsu wrote: > Hello everyone, > > I am looking for some mechanism for userspace tasks to pass certain > functions to kernel and let the kernel execute these functions on behalf of > userspace tasks. I know that sysfs can be used with kobject embedded into > internal kernel structure to access kernel variables. But is there anyway > for userspace tasks to pass a function to kernel to execute through sysfs? > > PS: adding syscall in the kernel can certainly satisfy my needs but it is > less favorable because the new kernel service I want to add is not that > general to be added as a new syscall. > > Thanks in advance! > T You might want to use plain old kernel modules, after all. Greetings, Jonathan Neusch?fer