From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 64A1F13800E for ; Wed, 25 Jul 2012 15:09:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 092B4E0205; Wed, 25 Jul 2012 15:09:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B9003E0205 for ; Wed, 25 Jul 2012 15:09:39 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 966191B46DB for ; Wed, 25 Jul 2012 15:09:36 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 582AAE5436 for ; Wed, 25 Jul 2012 15:09:35 +0000 (UTC) From: "Magnus Granberg" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Magnus Granberg" Message-ID: <1343228954.ae04161720b0a88f4e4e5612056efc879575e005.zorry@gentoo> Subject: [gentoo-commits] proj/hardened-gccpatchset:master commit in: upstream/ X-VCS-Repository: proj/hardened-gccpatchset X-VCS-Files: upstream/Wformat.patch upstream/config_all.patch upstream/config_i386.patch X-VCS-Directories: upstream/ X-VCS-Committer: zorry X-VCS-Committer-Name: Magnus Granberg X-VCS-Revision: ae04161720b0a88f4e4e5612056efc879575e005 X-VCS-Branch: master Date: Wed, 25 Jul 2012 15:09:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3ba5faa9-af9d-4c0b-bfa9-fa33a81f6e28 X-Archives-Hash: b0722c3716c81c21874e6510855d17f3 commit: ae04161720b0a88f4e4e5612056efc879575e005 Author: Magnus Granberg gentoo org> AuthorDate: Wed Jul 25 15:09:14 2012 +0000 Commit: Magnus Granberg gentoo org> CommitDate: Wed Jul 25 15:09:14 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-gccpatchset.git;a=commit;h=ae041617 Update the upstream patches --- upstream/Wformat.patch | 45 ++++++++++++++++++++++++++++++++++++++++++++ upstream/config_all.patch | 10 +++++--- upstream/config_i386.patch | 37 +++++++++++++++++++++++++++-------- 3 files changed, 79 insertions(+), 13 deletions(-) diff --git a/upstream/Wformat.patch b/upstream/Wformat.patch new file mode 100644 index 0000000..be0b07a --- /dev/null +++ b/upstream/Wformat.patch @@ -0,0 +1,45 @@ +--- a/gcc/c-family/c-common.c 2012-02-13 21:12:54.000000000 +0100 ++++ b/gcc/c-family/c-common.c 2012-07-09 23:17:18.375234684 +0200 +@@ -202,7 +202,19 @@ int warn_unknown_pragmas; /* Tri state v + /* Warn about format/argument anomalies in calls to formatted I/O functions + (*printf, *scanf, strftime, strfmon, etc.). */ + ++#ifdef ENABLE_ESPF ++int warn_format = 1; ++#else + int warn_format; ++#endif ++ ++/* Warn about possible security problems with format functions. */ ++ ++#ifdef ENABLE_ESPF ++int warn_format_security = 1; ++#else ++int warn_format_security; ++#endif + + /* C/ObjC language option variables. */ + +--- a/gcc/c-family/c-common.h 2011-12-20 21:44:13.000000000 +0100 ++++ b/gcc/c-family/c-common.h 2012-07-09 23:16:33.355233344 +0200 +@@ -594,6 +594,9 @@ extern int warn_unknown_pragmas; /* Tri + + extern int warn_format; + ++/* Warn about possible security problems with format functions. */ ++ ++extern int warn_format_security; + + /* C/ObjC language option variables. */ + +--- a/gcc/c-family/c.opt 2012-02-06 11:31:18.000000000 +0100 ++++ b/gcc/c-family/c.opt 2012-07-09 22:07:11.449109322 +0200 +@@ -392,7 +392,7 @@ C ObjC C++ ObjC++ Var(warn_format_contai + Warn about format strings that contain NUL bytes + + Wformat-security +-C ObjC C++ ObjC++ Var(warn_format_security) Warning ++C ObjC C++ ObjC++ Warning + Warn about possible security problems with format functions + + Wformat-y2k diff --git a/upstream/config_all.patch b/upstream/config_all.patch index f3af62d..f7c8e9b 100644 --- a/upstream/config_all.patch +++ b/upstream/config_all.patch @@ -1,6 +1,6 @@ --- a/gcc/config/linux.h 2011-07-07 17:38:34.000000000 +0200 -+++ b/gcc/config/linux.h 2012-07-06 17:09:54.414853750 +0200 -@@ -104,3 +104,29 @@ see the files COPYING3 and COPYING.RUNTI ++++ b/gcc/config/linux.h 2012-07-09 14:24:08.599281404 +0200 +@@ -104,3 +104,31 @@ see the files COPYING3 and COPYING.RUNTI /* Whether we have sincos that follows the GNU extension. */ #undef TARGET_HAS_SINCOS #define TARGET_HAS_SINCOS (OPTION_GLIBC || OPTION_BIONIC) @@ -15,18 +15,20 @@ +#endif +#ifdef ENABLE_ESPF_SSP +#define ESPF_GCC_SSP_SPEC \ -+ "%{nostdlib|nodefaultlibs|fno-stack-protector| \ ++ "%{nostdlib|nodefaultlibs|fno-stack-protector|freestanding| \ + fstack-protector|fstack-protector-all:;:-fstack-protector}" +#else +#define ESPF_GCC_SSP_SPEC "" +#endif +#ifdef ENABLE_ESPF_FORTIFY +#define ESPF_CPP_UNIQUE_OPTIONS_SPEC \ -+ "%{D_FORTIFY_SOURCE|D_FORTIFY_SOURCE=*|U_FORTIFY_SOURCE:;:-D _FORTIFY_SOURCE=2}" ++ "%{D_FORTIFY_SOURCE|D_FORTIFY_SOURCE=*|U_FORTIFY_SOURCE:;:-D_FORTIFY_SOURCE=2}" +#else +#define ESPF_CPP_UNIQUE_OPTIONS_SPEC "" +#endif +#define ESPF_DRIVER_SELF_SPECS \ + ESPF_GCC_PIE_SPEC, \ + ESPF_GCC_SSP_SPEC ++#define ESPF_EXTRA_SPECS \ ++ { "espf_cpp_unique_options", ESPF_CPP_UNIQUE_OPTIONS_SPEC } +#endif diff --git a/upstream/config_i386.patch b/upstream/config_i386.patch index c6632c9..58ceebe 100644 --- a/upstream/config_i386.patch +++ b/upstream/config_i386.patch @@ -18,22 +18,41 @@ +#ifdef ENABLE_ESPF +#define DRIVER_SELF_SPECS ESPF_DRIVER_SELF_SPECS +#endif +--- a/gcc/config/i386/gnu-user.h 2011-05-05 14:32:50.000000000 +0200 ++++ b/gcc/config/i386/gnu-user.h 2012-07-09 14:28:38.726289455 +0200 +@@ -93,9 +93,16 @@ along with GCC; see the file COPYING3. + "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" + + #undef SUBTARGET_EXTRA_SPECS ++#if def ENABLE_ESPF + #define SUBTARGET_EXTRA_SPECS \ + { "link_emulation", GNU_USER_LINK_EMULATION },\ +- { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } ++ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }, \ ++ ESPF_EXTRA_SPECS ++#else ++#define SUBTARGET_EXTRA_SPECS \ ++ { "link_emulation", GNU_USER_LINK_EMULATION },\ ++ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER } ++#endif + + #undef LINK_SPEC + #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ --- a/gcc/config/i386/i386.h 2011-11-24 23:11:12.000000000 +0100 -+++ b/gcc/config/i386/i386.h 2012-07-06 17:30:46.694891067 +0200 -@@ -620,10 +620,17 @@ enum target_cpu_default - #define SUBTARGET_EXTRA_SPECS - #endif ++++ b/gcc/config/i386/i386.h 2012-07-09 14:21:24.575276517 +0200 +@@ -617,13 +617,16 @@ enum target_cpu_default + Do not define this macro if it does not need to do anything. */ + #ifndef SUBTARGET_EXTRA_SPECS +#ifdef ENABLE_ESPF -+#define ESPF_EXTRA_SPECS \ -+ { "espf_cpp_unique_options", ESPF_CPP_UNIQUE_OPTIONS_SPEC } ++#define SUBTARGET_EXTRA_SPECS ESPF_EXTRA_SPECS +#else -+#define ESPF_EXTRA_SPECS { "", "" } + #define SUBTARGET_EXTRA_SPECS + #endif +#endif -+ + #define EXTRA_SPECS \ { "cc1_cpu", CC1_CPU_SPEC }, \ -+ ESPF_EXTRA_SPECS, \ SUBTARGET_EXTRA_SPECS -