From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53279 invoked by alias); 18 Mar 2015 17:14:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 53254 invoked by uid 89); 18 Mar 2015 17:14:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-oi0-f42.google.com Received: from mail-oi0-f42.google.com (HELO mail-oi0-f42.google.com) (209.85.218.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 18 Mar 2015 17:14:42 +0000 Received: by oifl3 with SMTP id l3so12109309oif.0 for ; Wed, 18 Mar 2015 10:14:40 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.208.22 with SMTP id h22mr1123116oig.78.1426698880562; Wed, 18 Mar 2015 10:14:40 -0700 (PDT) Received: by 10.76.134.102 with HTTP; Wed, 18 Mar 2015 10:14:40 -0700 (PDT) In-Reply-To: References: <20150318140224.GL1746@tucnak.redhat.com> Date: Wed, 18 Mar 2015 17:14:00 -0000 Message-ID: Subject: Re: [PATCH, libmpx, i386, PR driver/65444] Pass '-z bndplt' when building dynamic objects with MPX From: "H.J. Lu" To: Ilya Enkovich Cc: Jakub Jelinek , Richard Biener , GCC Patches , Uros Bizjak Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00963.txt.bz2 On Wed, Mar 18, 2015 at 10:13 AM, Ilya Enkovich wrote: > 2015-03-18 19:45 GMT+03:00 H.J. Lu : >> On Wed, Mar 18, 2015 at 9:14 AM, Ilya Enkovich wrote: >>> 2015-03-18 17:42 GMT+03:00 H.J. Lu : >>>> On Wed, Mar 18, 2015 at 7:31 AM, H.J. Lu wrote: >>>> >>>> MPX is a security feature. Knowing leaving a door open is a >>>> bad idea. >>> >>> Instrumented binary used with legacy libraries is a supported usage >>> model. Each user determines his own level of security. >>> >> >> It doesn't mean we should leave a door open. Are we supposed to >> detect this with MPX: >> >> [hjl@skylakeclient bug-1]$ cat x.c >> #include >> >> int >> main () >> { >> char buf[10]; >> memset(buf, 'a', 11); >> return 0; >> } >> [hjl@skylakeclient bug-1]$ >> >> I believe we should, not maybe. We shouldn't silent fail it >> when linker doesn't support -z bndplt. > > It depends on compiler flags and libraries used and is up to user to > decide. User may be warned during libmpx configuration. > What is "USER"? The one who build GCC may not be same person who uses GCC. -- H.J.