lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100818221721.GA2667@redhat.com>
Date:	Wed, 18 Aug 2010 18:17:22 -0400
From:	Dave Jones <davej@...hat.com>
To:	Joe Perches <joe@...ches.com>
Cc:	apw@...onical.com, Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: add memset checks to checkpatch.pl

On Wed, Aug 18, 2010 at 02:57:59PM -0700, Joe Perches wrote:
 > > I'm all for improving my shoddy perl where possible, but this doesn't seem to actually
 > > catch any of the test cases I wrote.  (it's also missing a } )
 > 
 > I intend never to be a perl monk.
 > 
 > I notice the missing { before the elsif after I sent it.
 > Oh well.
 > 
 > I just typed it in the emailer, so it's not tested at all.
 > Also it's missing a $ after 1 in the second $memset_size test.

still didn't catch anything for me.

 > What are your test cases anyway?

memset(foo, 0, 10);
memset(foo, 10, 0);
memset(foo, 1, 10);
memset(foo, 10, 1);

 > Likely $Lval isn't matching things like
 > sizeof(*foo) so this isn't checked:
 > 
 > 	memset(foo, bar, sizeof(*foo));

I chose to just ignore any non integer arguments to keep things simple.

	Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ