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: <20101019114904.GB25371@elte.hu>
Date:	Tue, 19 Oct 2010 13:49:04 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Brian Gitonga Marete <marete@...hnix.com>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] [PERF] (Userspace Tools) Fix a compilation error with
 -fstack-protector and -Werror


* Brian Gitonga Marete <marete@...hnix.com> wrote:

> > OK. Now that I actually look closely at that fragment I can see its useless to 
> > create the automatic arrays. Local string literals would also work (i.e. just 
> > pass `"Yes"' and `"No"' to newtWinChoice). But can also do what you suggested if 
> > it is anticipated that they will be used somewhere else within the file at some 
> > other time -- Currently they are not.
> 
> Oops. Sorry. What I suggested won't work because of the -Wwrite-strings default 
> option. Which actually makes me understand why the original author of the code 
> made it the way it is. Your suggestion of file-scope, static does solve the 
> problem.

Btw., -Wwrite-strings has proven to be a really useful warning in practice, in that 
it ensured that we propagate string immutability/const-ness as widely as possible. 
This resulted is cleaner perf code in the long run.

Here we cannot fix the Newt prototype (it's an existing library outside of our 
control) to take a const so we have to do the (mild) workaround of moving it to file 
scope. (if this becomes common then we'd have to re-evaluate the use of this 
warning)

I think Arnaldo has plans to get rid of the libnewt dependency altogether - that 
might be a fix too.

Thanks,

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