[libvirt] [PATCH] Remove ssp buffer size setting

Martin Kletzander mkletzan at redhat.com
Fri Jun 6 11:00:20 UTC 2014


On Fri, Jun 06, 2014 at 11:40:24AM +0200, Ján Tomko wrote:
>This option only makes sense with -fstack-protector.
>With -fstack-protector-all, even functions with buffers
>smaller than this are protected.
>
>https://bugzilla.redhat.com/show_bug.cgi?id=1105456
>---
> m4/virt-compile-warnings.m4 | 8 --------
> 1 file changed, 8 deletions(-)
>
>diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
>index 574fbc4..ebc931d 100644
>--- a/m4/virt-compile-warnings.m4
>+++ b/m4/virt-compile-warnings.m4
>@@ -171,14 +171,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
>        dnl be great overhead in adding -fstack-protector-all instead
>        dnl wantwarn="$wantwarn -fstack-protector"
>        wantwarn="$wantwarn -fstack-protector-all"
>-       wantwarn="$wantwarn --param=ssp-buffer-size=4"

It would be nice to keep that line in here with the explanation that
-fstack-protector-all does not make use of that param.

>-       dnl Even though it supports it, clang complains about
>-       dnl use of --param=ssp-buffer-size=4 unless used with
>-       dnl the -c arg. It doesn't like it when used with args
>-       dnl that just link together .o files. Unfortunately
>-       dnl we can't avoid that with automake, so we must turn
>-       dnl off the following clang specific warning
>-       wantwarn="$wantwarn -Wno-unused-command-line-argument"

Why do you also remove this line?

>        ;;
>        *-*-freebsd*)
>        dnl FreeBSD ships old gcc 4.2.1 which doesn't handle

Also, out of the context of this patch, doesn't that param need to be
added to the freebsd version since it uses -fstack-protector only?

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140606/a9fb2e3c/attachment-0001.sig>


More information about the libvir-list mailing list