Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756168AbWKVR7H (ORCPT ); Wed, 22 Nov 2006 12:59:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756171AbWKVR7H (ORCPT ); Wed, 22 Nov 2006 12:59:07 -0500 Received: from mx1.redhat.com ([66.187.233.31]:48074 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S1756168AbWKVR7E (ORCPT ); Wed, 22 Nov 2006 12:59:04 -0500 Date: Wed, 22 Nov 2006 12:58:56 -0500 From: Dave Jones To: =?iso-8859-1?Q?P=E1draig?= Brady Cc: Linus Torvalds , Jesper Juhl , Linux Kernel Mailing List , Andrew Morton Subject: Re: Simple script that locks up my box with recent kernels Message-ID: <20061122175856.GH533@redhat.com> Mail-Followup-To: Dave Jones , =?iso-8859-1?Q?P=E1draig?= Brady , Linus Torvalds , Jesper Juhl , Linux Kernel Mailing List , Andrew Morton References: <9a8748490610161545i309c416aja4f39edef8ea04e2@mail.gmail.com> <9a8748490610161613y7c314e64rfdfafb4046a33a02@mail.gmail.com> <9a8748490610231330y65f3e243pe1101d11a28dbbfa@mail.gmail.com> <9a8748490611211646o2c92564dmfe8d6ffdf66228ba@mail.gmail.com> <20061122032512.GE533@redhat.com> <20061122034928.GF533@redhat.com> <45642744.2080109@draigBrady.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <45642744.2080109@draigBrady.com> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1451 Lines: 41 On Wed, Nov 22, 2006 at 10:32:36AM +0000, P?draig Brady wrote: > > Heh, it's amazing how commonplace that mistake is. > > Come back bzero, all is forgiven.. > > It's interesting to do the following on google codesearch > > lang:^(c|c\+\+)$ memset\ *\(.*,\ *0\ *\); > http://tinyurl.com/y47qu4 > > lang:^(c|c\+\+)$ \sif\([^)]*\); > http://tinyurl.com/y4mdbl > > It would be interesting to build > up a suite of these regular expressions. A bunch of people already started gathering these a day or so after codesearch launched.. http://asert.arbornetworks.com/2006/10/static-code-analysis-using-google-code-search/ is a good start. http://www.cipher.org.uk/index.php?p=projects/bugle.project is also somewhat interesting (but from a security bug standpoint only) I've got some crufty shell scripts that I grew that I use from time to time that just grep a bunch of patterns, I've had "put them all together and make one decent one" on my todo for a while. I'll see if I can get to it this week. I've used these occasionally not just to find bugs in the kernel but across a completely unpacked distro source tree. Amazing what turns up sometimes. Dave -- http://www.codemonkey.org.uk - 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/