[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 14/14] Add -fstack-protector-all to CFLAGS
From: |
Rtp |
Subject: |
Re: [Qemu-devel] [PATCH 14/14] Add -fstack-protector-all to CFLAGS |
Date: |
Thu, 31 Dec 2009 11:58:01 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
"Kirill A. Shutemov" <address@hidden> writes:
Hi,
> -fstack-protector-all emit extra code to check for buffer overflows,
> such as stack smashing attacks. This is done by adding a guard
> variable to functions with vulnerable objects.
>
> Signed-off-by: Kirill A. Shutemov <address@hidden>
> ---
> configure | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/configure b/configure
> index 0cdcdb3..16b70d8 100755
> --- a/configure
> +++ b/configure
> @@ -98,6 +98,7 @@ QEMU_CFLAGS="-Wall -Wundef -Wendif-labels -Wwrite-strings
> -Wmissing-prototypes $
> QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
> QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> $QEMU_CFLAGS"
> QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS"
> +QEMU_CFLAGS="-fstack-protector-all $QEMU_CFLAGS"
afaik not all arches out there are supporting
-fstack-protector-all (to be more precise, some have no stack protector
support at all). iirc, gcc will emit a warning and still compile
but would be nice to avoid a warning.
Arnaud
Re: [Qemu-devel] [PATCH 10/14] vl.c: fix warning with _FORTIFY_SOURCE, malc, 2009/12/30