From: Markus Armbruster <armbru@redhat.com>
To: Rodrigo Rebello <rprebello@gmail.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH v2 1/1] configure: use appropriate code fragment for -fstack-protector checks
Date: Thu, 12 Nov 2015 17:10:41 +0100 [thread overview]
Message-ID: <87wptnfbb2.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1447337068-2448-1-git-send-email-rprebello@gmail.com> (Rodrigo Rebello's message of "Thu, 12 Nov 2015 12:04:28 -0200")
Rodrigo Rebello <rprebello@gmail.com> writes:
> The check for stack-protector support consisted in compiling and linking
> the test program below (output by function write_c_skeleton()) with the
> compiler flag -fstack-protector-strong first and then with
> -fstack-protector-all if the first one failed to work:
>
> int main(void) { return 0; }
>
> This caused false positives when using certain toolchains in which the
> compiler accepted -fstack-protector-strong but no support was provided
> by the C library, since for this stack-protector variant the compiler
> emits canary code only for functions that meet specific conditions
> (local arrays, memory references to local variables, etc.) and the code
> fragment under test included none of them (hence no stack protection
> code generated, no link failure).
>
> This fix changes the test program used for -fstack-protector checks to
> include a function that meets conditions which cause the compiler to
> generate canary code in all variants.
>
> Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: Rodrigo Rebello <rprebello@gmail.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/1] configure: use appropriate code fragment for -fstack-protector checks
Date: Thu, 12 Nov 2015 17:10:41 +0100 [thread overview]
Message-ID: <87wptnfbb2.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1447337068-2448-1-git-send-email-rprebello@gmail.com> (Rodrigo Rebello's message of "Thu, 12 Nov 2015 12:04:28 -0200")
Rodrigo Rebello <rprebello@gmail.com> writes:
> The check for stack-protector support consisted in compiling and linking
> the test program below (output by function write_c_skeleton()) with the
> compiler flag -fstack-protector-strong first and then with
> -fstack-protector-all if the first one failed to work:
>
> int main(void) { return 0; }
>
> This caused false positives when using certain toolchains in which the
> compiler accepted -fstack-protector-strong but no support was provided
> by the C library, since for this stack-protector variant the compiler
> emits canary code only for functions that meet specific conditions
> (local arrays, memory references to local variables, etc.) and the code
> fragment under test included none of them (hence no stack protection
> code generated, no link failure).
>
> This fix changes the test program used for -fstack-protector checks to
> include a function that meets conditions which cause the compiler to
> generate canary code in all variants.
>
> Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
next prev parent reply other threads:[~2015-11-12 16:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 14:04 [Qemu-trivial] [PATCH v2 1/1] configure: use appropriate code fragment for -fstack-protector checks Rodrigo Rebello
2015-11-12 14:04 ` [Qemu-devel] " Rodrigo Rebello
2015-11-12 16:10 ` Markus Armbruster [this message]
2015-11-12 16:10 ` Markus Armbruster
2015-11-29 10:44 ` [Qemu-trivial] " Michael Tokarev
2015-11-29 10:44 ` [Qemu-devel] " Michael Tokarev
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=87wptnfbb2.fsf@blackfin.pond.sub.org \
--to=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=rprebello@gmail.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.