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: <1284062744.24986.244.camel@Joe-Laptop>
Date:	Thu, 09 Sep 2010 13:05:44 -0700
From:	Joe Perches <joe@...ches.com>
To:	Mike Frysinger <vapier.adi@...il.com>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [rfc patch] treewide: Convert "static const char <*> foo[] ="
 to "static const char <*> const foo[] ="

On Thu, 2010-09-09 at 15:50 -0400, Mike Frysinger wrote:
> On Thu, Sep 9, 2010 at 15:48, Joe Perches wrote:
> > On Thu, 2010-09-09 at 15:40 -0400, Mike Frysinger wrote:
> >> On Thu, Sep 9, 2010 at 15:33, Joe Perches wrote:
> >> > On Thu, 2010-09-09 at 15:16 -0400, Mike Frysinger wrote:
> >> >> i dont think you even need to check the contents.  just match the base:
> >> >> char foo[]
> >> >> const char *foo[]
> >> >> we want to catch these even if it isnt static, and catching the
> >> >> forward decl would be useful too.
> >> > I think that's not so good.
> >> > There are times when a default is used but then modified.
> >> > For instance:
> >> > drivers/staging/comedi/drivers/comedi_bond.c:           char file[] = "/dev/comediXXXXXX";
> >> how many hits of non-static (i.e. ones that are extern) that should be
> >> const but arent ?
> > Count them and see.
> you already have the #, so it's easier for you to just give it up.

No, I don't have that #.

To determine it, you'll probably have to convert the
non static/non const char */char [] to [static] const.
Likely it might be easiest to see if the compiler complains
about any modifications of const data.

Good luck, do let me know what you find.

--
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