From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NQtNd-0005kM-5G for qemu-devel@nongnu.org; Fri, 01 Jan 2010 21:06:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NQtNY-0005j9-NG for qemu-devel@nongnu.org; Fri, 01 Jan 2010 21:06:12 -0500 Received: from [199.232.76.173] (port=44124 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQtNY-0005j6-KF for qemu-devel@nongnu.org; Fri, 01 Jan 2010 21:06:08 -0500 Received: from mail-gx0-f223.google.com ([209.85.217.223]:47347) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NQtNY-0001Uk-8L for qemu-devel@nongnu.org; Fri, 01 Jan 2010 21:06:08 -0500 Received: by gxk23 with SMTP id 23so15120708gxk.2 for ; Fri, 01 Jan 2010 18:06:06 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <87k4w39zra.fsf@lechat.rtp-net.org> References: <1262223266-19191-1-git-send-email-kirill@shutemov.name> <1262223266-19191-2-git-send-email-kirill@shutemov.name> <1262223266-19191-3-git-send-email-kirill@shutemov.name> <1262223266-19191-4-git-send-email-kirill@shutemov.name> <1262223266-19191-5-git-send-email-kirill@shutemov.name> <87k4w39zra.fsf@lechat.rtp-net.org> Date: Sat, 2 Jan 2010 04:06:06 +0200 Message-ID: Subject: Re: [Qemu-devel] [PATCH 14/14] Add -fstack-protector-all to CFLAGS From: "Kirill A. Shutemov" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Arnaud Patard Cc: qemu-devel@nongnu.org On Thu, Dec 31, 2009 at 12:58 PM, Arnaud Patard wrote: > "Kirill A. Shutemov" writes: > Hi, > >> -fstack-protector-all emit extra code to check for buffer overflows, >> such as stack smashing attacks. =C2=A0This is done by adding a guard >> variable to functions with vulnerable objects. >> >> Signed-off-by: Kirill A. Shutemov >> --- >> =C2=A0configure | =C2=A0 =C2=A01 + >> =C2=A01 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=3D"-Wall -Wundef -Wendif-labels -Wwrite-st= rings -Wmissing-prototypes $ >> =C2=A0QEMU_CFLAGS=3D"-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" >> =C2=A0QEMU_CFLAGS=3D"-D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE= _SOURCE $QEMU_CFLAGS" >> =C2=A0QEMU_CFLAGS=3D"-D_FORTIFY_SOURCE=3D2 $QEMU_CFLAGS" >> +QEMU_CFLAGS=3D"-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. Thanks. Will be fixed.