All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: SELinux@tycho.nsa.gov
Subject: Re: [PATCH 00/11] Two bug fixes & misc code cleanup fixes
Date: Mon, 23 Jan 2012 11:30:49 -0500	[thread overview]
Message-ID: <4F1D8B39.4040905@redhat.com> (raw)
In-Reply-To: <1327333281-4223-1-git-send-email-berrange@redhat.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/23/2012 10:41 AM, Daniel P. Berrange wrote:
> I was looking at the libselinux code and noticed that it did not 
> use much more besides '-Wall' for its default compilation flags. As
> an experiment to see if there were any lurking bugs, I modified the
> Makefile for libselinux to add about 30 other GCC supported 
> warnings.  This patch series is the result. I found 2 real bugs, 
> one potential use of unitialized variable in an OOM scenario, and
> the other a (benign) format string mistake that meant the user
> would not be told which flag was invalid.
> 
> At the same time I fixed const-correctness in several internal and
> public APIs, added more printf format validation annotations, 
> removed old style function declarations & removed some dead code.
> 
> One warning item that I didn't tackle here is to reduce the
> maximum stack usage. With the -Wframe-larger-than flag I had to set
> the libselinux stack size to 32kb, which is getting very excessive 
> IMHO. Most of the excessive stack usage is due to many PATH_MAX 
> declarations, the remainders due to a couple of large structs 
> placed on the stack. All of these are probably better off in the
> heap long term
> 
> Hopefully the first 9 patches are fairly easily accepted. I did not
> know what todo about the last 2 patches which actually add the
> extra CFLAGS warnings. In most projects I would have imported 
> GNULIBs m4 macros for detecting support of compiler flags, but 
> since none of the selinux libraries use autoconf, I don't see a 
> good way/place to detect what compiler flags can be used.
> 
> 
> -- This message was distributed to subscribers of the selinux
> mailing list. If you no longer wish to subscribe, send mail to
> majordomo@tycho.nsa.gov with the words "unsubscribe selinux"
> without quotes as the message.
> 
> 

I have added all of your patches to the libselinux-2.1.9-3.fc17
in Fedora/Rawhide.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8dizkACgkQrlYvE4MpobPxlQCfefRzBAjs8+R7DeIO2/CiJmLA
RKAAnjFmjKjEj8CUEO2rTO0Ir3GvyIA/
=/68v
-----END PGP SIGNATURE-----

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  parent reply	other threads:[~2012-01-23 16:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 15:41 [PATCH 00/11] Two bug fixes & misc code cleanup fixes Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 01/11] Remove jump over variable declaration Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 02/11] Ensure there is a prototype for 'matchpathcon_lib_destructor' Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 03/11] Fix old style function definitions Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 04/11] Fix const-correctness Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 05/11] Remove unused flush_class_cache method Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 06/11] Add prototype decl for destructor Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 07/11] Add more printf format annotations Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 08/11] Add printf format attribute annotation to die() method Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 09/11] Fix const-ness of parameters & make usage() methods static Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 10/11] Enable many more gcc warnings for libselinux/src/ builds Daniel P. Berrange
2012-01-23 15:41 ` [PATCH libselinux 11/11] Enable many more gcc warnings for libselinux/utils builds Daniel P. Berrange
2012-01-23 16:30 ` Daniel J Walsh [this message]
2012-01-23 18:13 ` [PATCH 12/11] Change annotation on include/selinux/avc.h to avoid upsetting SWIG Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F1D8B39.4040905@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=berrange@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.