Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754345AbYGGMhS (ORCPT ); Mon, 7 Jul 2008 08:37:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753220AbYGGMhE (ORCPT ); Mon, 7 Jul 2008 08:37:04 -0400 Received: from nf-out-0910.google.com ([64.233.182.190]:49519 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752824AbYGGMhC (ORCPT ); Mon, 7 Jul 2008 08:37:02 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=KdZE3SBBbYcySLPgyqUCyU9LUA2UJbAo55bzDt/uTnl6/yjeQtD9/RDnBlwhUY+8DT hCaOLH7zFkjxSuhgb3HNBinNpem+Cw2/hWbIqGRVj4tz1ZJxDkFXtn06ekZ8ygkHFhon Ik6kwYPB/80ZPHHhjAvGJfooHpY4BLxFjlfKM= Message-ID: Date: Mon, 7 Jul 2008 08:36:58 -0400 From: "Jinkai Gao" To: "Bart Van Assche" Subject: Re: Suggestion: LKM should be able to add system call for itself Cc: linux-kernel@vger.kernel.org, "Arjan van de Ven" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1698 Lines: 32 On Mon, Jul 7, 2008 at 4:40 AM, Bart Van Assche wrote: > On Mon, Jul 7, 2008 at 7:09 AM, Jinkai Gao wrote: >> LKM(loadable kernel module) was first introduced for drivers. Users >> rarely need to talk to the modules directly. If does, several methods >> are available now, such as /proc file, interruption, etc. However, >> these interfaces are predefined, which makes the communication between >> user space and kernel space quite restricted. > > Did you already have a look at e.g. http://lwn.net/Kernel/LDD3/ for > suggestions of alternatives for communication between userspace and > kernel modules ? Alternatives to system calls are e.g. ioctl's, memory > mapped I/O and sockets. Yes, all kinds of alternatives exist. But they are alternatives anyway, which are tricky ways to do things when you can't find a reasonable ways. Actually,to communication between userspace and kernel modules, all I need is a interface with two parameters, all the system calls can be implemented out of that. So basically you can write every system call using something like ioctl. But ioctl is not designed for generic purpose after all. Why the number of system calls is growing? because the kernel is growing. why we don't use the alternatives to implement the new need for system calls? Because it doesn't make any sense. We can't ignore the kernel modules' need for system calls just because they are loadable. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/