Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754599AbZIVAPl (ORCPT ); Mon, 21 Sep 2009 20:15:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754623AbZIVAPk (ORCPT ); Mon, 21 Sep 2009 20:15:40 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:60513 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754599AbZIVAPi (ORCPT ); Mon, 21 Sep 2009 20:15:38 -0400 To: Linus Torvalds Cc: Jamie Lokier , Evgeniy Polyakov , Eric Paris , David Miller , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, viro@zeniv.linux.org.uk, alan@linux.intel.com, hch@infradead.org References: <1252703626.2305.50.camel@dhcp231-106.rdu.redhat.com> <20090911212731.GA19901@shareable.org> <1252705902.2305.83.camel@dhcp231-106.rdu.redhat.com> <20090912094110.GB24709@ioremap.net> <20090914001759.GB30621@shareable.org> <20090914140720.GA8564@ioremap.net> <1252955295.2246.35.camel@dhcp231-106.rdu.redhat.com> <20090915201620.GB32192@ioremap.net> <1253051699.5213.18.camel@dhcp231-106.rdu.redhat.com> <20090916120523.GA12830@ioremap.net> <20090916122723.GE29359@shareable.org> From: ebiederm@xmission.com (Eric W. Biederman) Date: Mon, 21 Sep 2009 17:15:28 -0700 In-Reply-To: (Linus Torvalds's message of "Thu\, 17 Sep 2009 09\:40\:16 -0700 \(PDT\)") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-XM-SPF: eid=;;;mid=;;;hst=in01.mta.xmission.com;;;ip=76.21.114.89;;;frm=ebiederm@xmission.com;;;spf=neutral X-SA-Exim-Connect-IP: 76.21.114.89 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-DCC: XMission; sa02 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Linus Torvalds X-Spam-Relay-Country: X-Spam-Report: * -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 T_TM2_M_HEADER_IN_MSG BODY: T_TM2_M_HEADER_IN_MSG * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa02 1397; Body=1 Fuz1=1 Fuz2=1] * 0.1 XMSolicitRefs_0 Weightloss drug * 0.0 XM_SPF_Neutral SPF-Neutral * 0.4 UNTRUSTED_Relay Comes from a non-trusted relay Subject: Re: fanotify as syscalls X-SA-Exim-Version: 4.2.1 (built Thu, 25 Oct 2007 00:26:12 +0000) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1341 Lines: 29 Linus Torvalds writes: > Quite frankly, I have _never_ever_ seen a good reason for talking to the > kernel with some idiotic packet interface. It's just a fancy way to do > ioctl's, and everybody knows that ioctl's are bad and evil. Why are fancy > packet interfaces suddenly much better? For working with the networking stack there are a lot of advantages because netlink is the interface to everything in the network stack. There are nice things like the packet to create a new interface is the same packet the kernel sends everyone to report a new interface etc. netlink also seems to get the structured data thing right. You can parse the packet even if you don't understand everything. Each tag is well defined like a syscall, taking exactly one kind of argument. Which avoids the worst failure of ioctl in that you can't even parse everything, and the argument may be a linked list in the calling process or something else atrocious. All of that said syscalls are good, and I would not recommend netlink to anything not in the network stack. Eric -- 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/