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: <202405152023.67ED1BD7@keescook>
Date: Wed, 15 May 2024 20:24:52 -0700
From: Kees Cook <keescook@...omium.org>
To: "Dr. David Alan Gilbert" <linux@...blig.org>
Cc: linux-kernel@...r.kernel.org, nathan@...nel.org,
	luc.vanoostenryck@...il.com
Subject: Re: thoughts wanted on dead code hunting?

On Thu, May 16, 2024 at 12:40:40AM +0000, Dr. David Alan Gilbert wrote:
> * Kees Cook (keescook@...omium.org) wrote:
> > // Options: --recursive-includes
> > @find@
> > struct to_be_removed INSTANCE;
> > struct to_be_removed *POINTER;

Oops, I missed this line:

@@

> > 
> > (
> > *       INSTANCE
> > |
> > *       POINTER
> > )
> > 
> > 
> > (I bet this could be improved, but it should be a usable example.)
> 
> Hmm, now if I could use coccinelle it would be more tolerant of coding
> style and slight variations than my script.
> However, trying that tiny example, I get:
>   File "play.cocci", line 10, column 1, charpos = 141
>     around = '',
>     whole content = )
> 
> so it seems to be objecting to something at the end of the file?

Sorry, yes, missed the "@@" between the identifiers and the code pattern
to match.

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ