Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758165AbXHSC6Y (ORCPT ); Sat, 18 Aug 2007 22:58:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754657AbXHSC6Q (ORCPT ); Sat, 18 Aug 2007 22:58:16 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:47953 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754686AbXHSC6P (ORCPT ); Sat, 18 Aug 2007 22:58:15 -0400 Date: Sun, 19 Aug 2007 03:57:58 +0100 From: Al Viro To: david@lang.hm Cc: Alan , Kyle Moffett , Marc Perkel , Valdis.Kletnieks@vt.edu, Michael Tharp , LKML Kernel , Lennart Sorensen Subject: Re: Thinking outside the box on file systems Message-ID: <20070819025758.GR21089@ftp.linux.org.uk> References: <763705.7247.qm@web52512.mail.re2.yahoo.com> <1187479581.1608.1.camel@zowie.fnordora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1267 Lines: 28 On Sat, Aug 18, 2007 at 07:03:06PM -0700, david@lang.hm wrote: > >>I suspect you will find it somewhat hard to convince *anybody* on > >>this list to put either a regex engine or a Perl interpreter into the > >>kernel. I doubt you could even get a simple shell-style pattern > >>matcher in. First of all, both of the former chew up enormous gobs > >>of stack space *AND* they're NP-complete. Eh? regex via NFA is O(expression size * string length) time and O(expression size) space. If you can show that regex matching is NP-complete, you've got a good shot at Nevanlinna Prize... Not that it made regex in kernel a good idea, but fair is fair - unless you can show any mentioning of backrefs upthread...[1] > You just can't do such > >>matching even in polynomial time, let alone something that scales > >>appropriately for an OS kernel like, say, O(log(n)). > > > >Already been done. Take a look at "AppArmor" aka "Immunix". > > don't forget the ACPI interpreter. YAProof that bogons follow Boze statistics... - 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/