From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82044 invoked by alias); 18 Mar 2015 16:45:22 -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 82029 invoked by uid 89); 18 Mar 2015 16:45:21 -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-f49.google.com Received: from mail-oi0-f49.google.com (HELO mail-oi0-f49.google.com) (209.85.218.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 18 Mar 2015 16:45:21 +0000 Received: by oier21 with SMTP id r21so41438340oie.1 for ; Wed, 18 Mar 2015 09:45:19 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.198.76 with SMTP id w73mr27006756oif.74.1426697119083; Wed, 18 Mar 2015 09:45:19 -0700 (PDT) Received: by 10.76.134.102 with HTTP; Wed, 18 Mar 2015 09:45:18 -0700 (PDT) In-Reply-To: References: <20150318140224.GL1746@tucnak.redhat.com> Date: Wed, 18 Mar 2015 16:45: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/msg00959.txt.bz2 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: >>> On Wed, Mar 18, 2015 at 7:02 AM, Jakub Jelinek wrote: >>>> >>>> Yeah, I agree, the configure check is a reasonable thing to do. >>>> >>> >>> We should either always pass -z bndplt to linker or disable >>> MPX. >>> >> >> 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. -- H.J.