From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50354 invoked by alias); 18 Mar 2015 17:13:28 -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 50338 invoked by uid 89); 18 Mar 2015 17:13:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.4 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-ob0-f176.google.com Received: from mail-ob0-f176.google.com (HELO mail-ob0-f176.google.com) (209.85.214.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 18 Mar 2015 17:13:27 +0000 Received: by obdfc2 with SMTP id fc2so37027560obd.3 for ; Wed, 18 Mar 2015 10:13:25 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.92.71 with SMTP id ck7mr46709917oeb.14.1426698805336; Wed, 18 Mar 2015 10:13:25 -0700 (PDT) Received: by 10.202.187.66 with HTTP; Wed, 18 Mar 2015 10:13:25 -0700 (PDT) In-Reply-To: References: <20150318140224.GL1746@tucnak.redhat.com> Date: Wed, 18 Mar 2015 17:13:00 -0000 Message-ID: Subject: Re: [PATCH, libmpx, i386, PR driver/65444] Pass '-z bndplt' when building dynamic objects with MPX From: Ilya Enkovich To: "H.J. Lu" 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/msg00962.txt.bz2 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. Ilya > > -- > H.J.