linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-rt-users@vger.kernel.org, Clark Williams <williams@redhat.com>
Subject: Re: support compilation with hardening flags
Date: Tue, 16 Oct 2012 01:03:56 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1210160103040.6335@tycho> (raw)
In-Reply-To: <1346615170-25310-1-git-send-email-u.kleine-koenig@pengutronix.de>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 3319 bytes --]

This is a good patch, but once again your subject line and description 
kinda sucks. I'm fixing it up

Signed-off-by: John Kacur <jkacur@redhat.com>

On Sun, 2 Sep 2012, Uwe Kleine-König wrote:

> For Debian 7.0 (aka wheezy) packages it's recommended to use several
> hardening flags, the default on amd64 being:
> 
> 	CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
> 	CPPFLAGS=-D_FORTIFY_SOURCE=2
> 	LDFLAGS=-Wl,-z,relro
> 
> This patch doesn't fix all warnings but at least makes all programs compile
> again by not using char *variables as printf format strings.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  src/pmqtest/pmqtest.c         |    4 ++--
>  src/ptsematest/ptsematest.c   |    4 ++--
>  src/sigwaittest/sigwaittest.c |    4 ++--
>  src/svsematest/svsematest.c   |    4 ++--
>  4 files changed, 8 insertions(+), 8 deletions(-)
> 
> --- a/src/ptsematest/ptsematest.c
> +++ b/src/ptsematest/ptsematest.c
> @@ -389,12 +389,12 @@
>  					(int) ((receiver[i].sumdiff / receiver[i].samples) + 0.5),
>  					receiver[i].maxdiff);
>  				if (receiver[i].error[0] != '\0') {
> -					printf(receiver[i].error);
> +					printf("%s", receiver[i].error);
>  					errorlines++;
>  					receiver[i].error[0] = '\0';
>  				}
>  				if (sender[i].error[0] != '\0') {
> -					printf(sender[i].error);
> +					printf("%s", sender[i].error);
>  					errorlines++;
>  					receiver[i].error[0] = '\0';
>  				}
> --- a/src/sigwaittest/sigwaittest.c
> +++ b/src/sigwaittest/sigwaittest.c
> @@ -561,12 +561,12 @@
>  					    receiver[i].samples) + 0.5),
>  					    receiver[i].maxdiff);
>  				if (receiver[i].error[0] != '\0') {
> -					printf(receiver[i].error);
> +					printf("%s", receiver[i].error);
>  					receiver[i].error[0] = '\0';
>  					errorlines++;
>  				}
>  				if (sender[i].error[0] != '\0') {
> -					printf(sender[i].error);
> +					printf("%s", sender[i].error);
>  					sender[i].error[0] = '\0';
>  					errorlines++;
>  				}
> --- a/src/svsematest/svsematest.c
> +++ b/src/svsematest/svsematest.c
> @@ -646,12 +646,12 @@
>  					    receiver[i].samples) + 0.5),
>  					    receiver[i].maxdiff);
>  				if (receiver[i].error[0] != '\0') {
> -					printf(receiver[i].error);
> +					printf("%s", receiver[i].error);
>  					receiver[i].error[0] = '\0';
>  					errorlines++;
>  				}
>  				if (sender[i].error[0] != '\0') {
> -					printf(sender[i].error);
> +					printf("%s", sender[i].error);
>  					sender[i].error[0] = '\0';
>  					errorlines++;
>  				}
> --- a/src/pmqtest/pmqtest.c
> +++ b/src/pmqtest/pmqtest.c
> @@ -512,12 +512,12 @@
>  					(int) ((receiver[i].sumdiff / receiver[i].samples) + 0.5),
>  					receiver[i].maxdiff);
>  				if (receiver[i].error[0] != '\0') {
> -					printf(receiver[i].error);
> +					printf("%s", receiver[i].error);
>  					errorlines++;
>  					receiver[i].error[0] = '\0';
>  				}
>  				if (sender[i].error[0] != '\0') {
> -					printf(sender[i].error);
> +					printf("%s", sender[i].error);
>  					errorlines++;
>  					receiver[i].error[0] = '\0';
>  				}
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

      reply	other threads:[~2012-10-15 23:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-02 19:46 support compilation with hardening flags Uwe Kleine-König
2012-10-15 23:03 ` John Kacur [this message]

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=alpine.LFD.2.02.1210160103040.6335@tycho \
    --to=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=williams@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).